# Retrieve a payment

Endpoint: GET /payment/{id}
Version: 1.0.0
Security: JWT

## Path parameters:

  - `id` (string, required)
    The unique identifier for the payment.
    Example: "payt_E602dMzgjpDC"

## Response 200 fields (application/json):

  - `id` (string)
    The unique identifier for the payment.
    Example: "payt_E602dMzgjpDC"

  - `payin_id` (string,null)
    The unique identifier for the payin. This is set only for payments associated to a payin.
    Example: "payin_E602dMzgjpDC"

  - `payin_type` (string,null)
    The type of the payin. This is set only for payments associated to a payin.
    Enum: "payment_link", "orders", "add_funds"

  - `subscription_id` (string,null)
    The unique identifier for the subscription. This is set only for subscription-related payments.
    Example: "sub_68877570b5zeE"

  - `status` (string)
    The status of the payment.
    Enum: "success", "failed", "action_required", "in_progress", "under_review"

  - `payment_currency` (string)
    The currency in which the customer pays. The currency code is in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, AED.
    Example: "AED"

  - `payment_amount` (number)
    The total amount the customer pays in cents (includes customer-borne fees if applicable). For example, 374580 cents is 3,745.80 AED. The currency is determined by the payment_currency field.
    Example: 374580

  - `converted_currency` (string)
    The settlement currency after conversion. The currency code is in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: "USD"

  - `converted_amount` (number)
    The final amount after currency conversion in cents (includes all fees). For example, 102000 cents is $1,020.00. The currency is determined by the converted_currency field.
    Example: 102000

  - `requested_currency` (string)
    The currency that was originally requested by the merchant. The currency code is in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: "USD"

  - `requested_amount` (number)
    The amount originally requested by the merchant in cents, excluding customer-borne fees. For example, 100000 cents is $1,000.00. The currency is determined by the requested_currency field.
    Example: 100000

  - `purpose_code` (string)
    The purpose code of the payment. This should match the purpose code of the payin.
    Example: "S0001"

  - `sender_name` (string)
    The name of the sender.
    Example: "John Doe"

  - `notes` (object)
    Custom field values for this payment. See [Custom Fields](../../../../product-guide/payin/custom-fields).
    Example: {"policy_number":"POL-001"}

  - `error_code` (string)
    The error code for the respective error. Error code mappings can be found in the [product guide](../../../../product-guide/payin/payment#error-codes).
    Example: "PAYMENT_DECLINED"

  - `error_description` (string)
    The merchant-facing error description corresponding to the error code. Operational copy for the merchant. See customer_error_description for the copy meant for the end-customer.
    Example: "The payment attempt was declined. This could be due to issuer rejection, risk assessment, or restrictions on the card or account. The customer should contact their bank or try a different payment method."

  - `customer_error_description` (string,null)
    Customer-facing error copy, written for the merchant to relay to their end-customer. Derives from the same error_code as error_description but targets a different audience. null when there is no error_code, or when the error code has no customer-facing variant (some codes are merchant-only, e.g. ACCOUNT_LOCKED, LOGGED_IN_ELSEWHERE, FUNCTIONALITY_RESTRICTED).
    Example: "Your payment could not be completed. Please try a different payment method or contact your bank."

  - `paid_at` (string,null)
    The timestamp at which the payment was completed. null if the payment has not been paid.
    Example: "2024-12-06T11:38:37.130Z"

  - `fee_bearer` (string)
    The party bearing the fees for the payment.
    Enum: "customer", "merchant", "split"

  - `fee_collection_mode` (string,null)
    When merchant-borne fees are collected. immediate deducts fees up front; deferred invoices them later. null when not applicable.
    Enum: "immediate", "deferred"

  - `created_at` (string)
    The creation timestamp of the payment.
    Example: "2024-12-06T11:38:37.130Z"

  - `updated_at` (string)
    The last update timestamp of the payment.
    Example: "2024-12-06T11:38:37.130Z"

  - `customer_id` (string)
    The unique identifier for the customer.
    Example: "cust_E602sMzgjpDC"

  - `merchant_id` (string)
    The unique identifier for the merchant (business) that owns the payment.
    Example: "merch_68c777fcOOMpl"

  - `product_name` (string,null)
    The name of the product associated with the payment.
    Example: "ShieldGuard Insurance"

  - `product_description` (string,null)
    The description of the product associated with the payment.
    Example: "Simple, monthly insurance plan that covers your basic belongings and key digital assets"

  - `country` (string)
    The country of the sender. Country should be sent as a [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code.
    Example: "Ind"

  - `fee_breakdown` (object)
    A detailed breakdown of the fees charged for the payment, grouped by fee type. Each fee type holds one entry per fee bearer, with any applicable taxes (for example, GST) nested under the entry's taxes array.

  - `fee_breakdown.fx_fee` (array)
    Foreign exchange fee lines.

  - `fee_breakdown.fx_fee.amount` (number)
    The fee amount in the smallest currency unit (cents), aggregated across all rules for this fee bearer. For example, 250 cents is $2.50.
    Example: 250

  - `fee_breakdown.fx_fee.currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: "USD"

  - `fee_breakdown.fx_fee.bearer` (string)
    The party bearing this fee.
    Enum: "customer", "merchant"

  - `fee_breakdown.fx_fee.collection_mode` (string,null)
    When the fee is collected. Customer-borne fees are always collected immediately; merchant-borne fees follow the payment's collection mode.
    Enum: same as `fee_collection_mode` (2 values)

  - `fee_breakdown.fx_fee.taxes` (array)
    Taxes applied on this fee (for example, GST). Empty when no tax applies to the underlying rules.

  - `fee_breakdown.fx_fee.taxes.amount` (number)
    The tax amount in the smallest currency unit (cents). For example, 1800 cents is $18.00.
    Example: 1800

  - `fee_breakdown.fx_fee.taxes.currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: "USD"

  - `fee_breakdown.fx_fee.taxes.name` (string)
    The name of the tax applied on the fee. For example, GST.
    Example: "GST"

  - `fee_breakdown.fx_fee.taxes.bps` (number)
    The tax rate in basis points. For example, 1800 represents 18%.
    Example: 1800

  - `fee_breakdown.txn_fee` (array)
    Transaction fee lines.

  - `fee_breakdown.referral_fee` (array)
    Referral fee lines.

  - `documents` (array)
    The attached documents for the payment.

  - `documents.id` (string)
    The unique identifier for the Document.
    Example: "doc_nYUqLpuYQ0M8"

  - `documents.type` (string)
    The type of the Document.
    Example: "invoice"

  - `documents.status` (string)
    Enum: "pending", "uploaded", "rejected", "approved"

  - `documents.rfi_doc_id` (string,null)
    The unique identifier for the RFI Document. This will be null if the document is not an RFI Document.
    Example: "rfidoc_nYUqLpuYQ0M8"

  - `settlement_id` (string)
    A unique identifier generated by Glomo for the settlement batch in which this payment is included. This ID can be used to track and reconcile payments against corresponding settlements.

  - `funds_available` (boolean)
    Indicates whether the funds for this payment are currently available with Glomo.

Values:

- true - Funds are available with Glomo and can be included in a payout or settlement
- false - Funds are still in transit with Glomo's payment partners and are not yet available for use

  - `payment_method` (object)
    Specifies the method used by the customer to complete the payment. This can include various options such as swift_transfer, card, and other payment methods.

  - `payment_method.type` (string)
    The type of payment method used for the transaction.
    Enum: "swift_transfer", "card"

  - `payment_method.id` (string)
    The unique identifier for the payment method instance.
    Example: "swift_6883291fT7Rfw"

  - `payment_method.details` (object) — one of:
    Additional details specific to the payment method type. The structure varies based on the payment method type.
    - Swift Transfer Details:
      - `sender_name` (string)
        The name of the sender as provided by the payment method.
        Example: "Vaibhav LRS"
      - `sender_country` (string)
        The country code of the sender.
        Example: "IND"
      - `sender_account_number` (string)
        The account number of the sender (for bank transfers).
        Example: "5454545454"
      - `remittance_information` (string,null)
        Additional remittance information provided with the payment.
        Example: "PaymentForLrs"
    - Card Details:
      - `card_network` (string)
        The card network (e.g., Visa, Mastercard, American Express).
        Example: "Visa"
      - `card_type` (string)
        The type of card (e.g., credit, debit).
        Example: "credit"
      - `end_digits` (string)
        The last few digits of the card number for identification.
        Example: "1234"
      - `country_code` (string)
        The country code associated with the card.
        Example: "US"
      - `card_holder_name` (string)
        The name of the card holder.
        Example: "John Doe"
      - `card_bin` (string)
        The IIN (also known as BIN) is the card-number prefix that identifies the network, card type and issuing country.
        Example: "400000"
      - `issuer_name` (string)
        The name of the card issuing bank or financial institution.
        Example: "Chase Bank"

  - `auto_debit?` (boolean,null)
    Indicates whether the payment was made via auto-debit. Present only for subscription payments; true for an auto-debit payment, false for a manual subscription payment.
    Example: true

  - `fees` (object)
    Deprecated. Use fee_breakdown instead. The fees charged for the payment, aggregated per fee type. fee_breakdown provides a per-bearer breakdown including any applicable taxes.

  - `fees.txn_fee` (object)
    The transaction fee charged for the payment.

  - `fees.txn_fee.amount` (number)
    A positive integer representing the smallest currency unit.  For example, if the amount is $299.00, then pass 29900 in this field.  In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990.  And in the case of zero decimal currencies such as JPY, for amount ￥295, pass the value as 295.
    Example: 1000

  - `fees.txn_fee.currency` (string)
    The currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, USD.
    Example: "USD"

  - `fees.fx_fee` (object)
    The foreign exchange fee charged for the payment.

  - `fees.referral_fee` (object)
    The referral fee charged for the payment.

## Response 404 fields (application/json):

  - `error` (string)
    Enum: "Not found"

  - `message` (string)
    Entity not found
    Enum: "Entity not found"


