> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meld.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch a transaction from the provider (for offramp use)

> Fetch a transaction from the service provider using the session ID. This endpoint is primarily used for offramp scenarios where the transaction needs to be retrieved from the provider after the user completes their action in the widget.



## OpenAPI

````yaml /openapi/crypto-20231219.json get /payments/transactions/sessions/{sessionId}
openapi: 3.1.0
info:
  title: CRYPTO
  termsOfService: urn:tos
  license:
    name: Apache 2.0
    url: https://springdoc.org
  version: '2023-12-19'
  description: ''
servers:
  - url: https://api-sb.meld.io
    description: Meld API sandbox
  - url: https://api.meld.io
    description: Meld API production
security: []
tags:
  - name: Retail Ramp
    description: ''
  - name: Headless
    description: ''
  - name: Payment
    description: ''
  - name: Session
    description: ''
paths:
  /payments/transactions/sessions/{sessionId}:
    get:
      tags:
        - Retail Ramp
      summary: Fetch a transaction from the provider (for offramp use)
      description: >-
        Fetch a transaction from the service provider using the session ID. This
        endpoint is primarily used for offramp scenarios where the transaction
        needs to be retrieved from the provider after the user completes their
        action in the widget.
      operationId: /payments-transactions-sessions-get
      parameters:
        - name: Meld-Version
          in: header
          description: Dated API version to use for this request, e.g. `2026-02-03`.
          required: false
          schema:
            type: string
            example: '2023-12-19'
        - name: sessionId
          in: path
          description: Session ID to fetch the transaction for
          required: true
          schema:
            type: string
            default: ''
      responses:
        '200':
          description: Transaction found and retrieved from provider
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PaymentTransactionResponse20230401'
        '400':
          description: >-
            Bad Request : check request values and format


            - `NOT_SUPPORTED` — This provider does not support fetching a
            transaction this way. Use the headless order endpoints instead.

            - `PASSTHROUGH_CREDENTIALS_INVALID` — Read errors[] — it names each
            passthrough credential field that is missing or conflicting. Which
            fields are required varies by provider.

            - `TRANSACTION_INVALID_PROVIDER` — Correct the named value and send
            the request again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: |-
                      Any of:

                      - `NOT_SUPPORTED`
                      - `PASSTHROUGH_CREDENTIALS_INVALID`
                      - `TRANSACTION_INVALID_PROVIDER`
                  errors:
                    type: array
                    description: >-
                      Any of:


                      - `[Meld-Version] is invalid`

                      - `Required parameter [sessionId] is missing`

                      - `Cannot use both passthrough key private and oauth at
                      the same time`

                      - `Missing either passthrough key private or oauth`

                      - `Missing passthrough key id`

                      - `Missing passthrough key private`

                      - `Missing passthrough key public`

                      - `Missing passthrough oauth`

                      - `Missing passthrough reference`

                      - `Missing service provider`
                    items:
                      type: string
                  message:
                    type: string
                    description: |-
                      Any of:

                      - Invalid service provider
                      - Operation not supported for service provider
                      - Passthrough credentials invalid
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
              examples:
                NOT_SUPPORTED:
                  value:
                    code: NOT_SUPPORTED
                    message: Operation not supported for service provider
                    requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                    timestamp: '2026-08-14T09:41:22.482+00:00'
                PASSTHROUGH_CREDENTIALS_INVALID:
                  value:
                    code: PASSTHROUGH_CREDENTIALS_INVALID
                    message: Passthrough credentials invalid
                    requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                    timestamp: '2026-08-14T09:41:22.482+00:00'
                TRANSACTION_INVALID_PROVIDER:
                  value:
                    code: TRANSACTION_INVALID_PROVIDER
                    message: Invalid service provider
                    requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                    timestamp: '2026-08-14T09:41:22.482+00:00'
        '401':
          description: |-
            Invalid credentials

            Check the API credentials being sent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: '`UNAUTHORIZED`'
                  message:
                    type: string
                    description: Access denied
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
              example:
                code: UNAUTHORIZED
                message: Access denied
                requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                timestamp: '2026-08-14T09:41:22.482+00:00'
        '403':
          description: |-
            Unauthenticated or authenticated with insufficient access

            Check the account's permissions for this operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: '`FORBIDDEN`'
                  message:
                    type: string
                    description: Access denied
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
              example:
                code: FORBIDDEN
                message: Access denied
                requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                timestamp: '2026-08-14T09:41:22.482+00:00'
        '404':
          description: >-
            Session not found or transaction not yet created with provider


            - `TRANSACTION_FETCH_BY_SESSION_NOT_YET_CREATED_WITH_PROVIDER` —
            Temporary, not permanent: the transaction does not exist yet. Keep
            polling — it appears once the provider creates it.

            - `TRANSACTION_FETCH_BY_SESSION_PROVIDER_UNSUPPORTED` — This
            provider cannot look a transaction up by sessionId before it exists.
            Wait for it to be created, then fetch it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: >-
                      Any of:


                      -
                      `TRANSACTION_FETCH_BY_SESSION_NOT_YET_CREATED_WITH_PROVIDER`

                      - `TRANSACTION_FETCH_BY_SESSION_PROVIDER_UNSUPPORTED`
                  message:
                    type: string
                    description: >-
                      Any of:


                      - Provider doesn't support fetching a transaction by
                      session until it is created with Meld

                      - Transaction associated with this session/order has not
                      been created with the service provider yet
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
              examples:
                TRANSACTION_FETCH_BY_SESSION_NOT_YET_CREATED_WITH_PROVIDER:
                  value:
                    code: TRANSACTION_FETCH_BY_SESSION_NOT_YET_CREATED_WITH_PROVIDER
                    message: >-
                      Transaction associated with this session/order has not
                      been created with the service provider yet
                    requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                    timestamp: '2026-08-14T09:41:22.482+00:00'
                TRANSACTION_FETCH_BY_SESSION_PROVIDER_UNSUPPORTED:
                  value:
                    code: TRANSACTION_FETCH_BY_SESSION_PROVIDER_UNSUPPORTED
                    message: >-
                      Provider doesn't support fetching a transaction by session
                      until it is created with Meld
                    requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                    timestamp: '2026-08-14T09:41:22.482+00:00'
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Stable identifier for the failure.
                  message:
                    type: string
                    description: A description of what went wrong.
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
        '409':
          description: >-
            Conflict


            Read message — it names which condition applied, from the values
            listed under `message`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: '`CONFLICT`'
                  message:
                    type: string
                    description: Conflict
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
              example:
                code: CONFLICT
                message: Conflict
                requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                timestamp: '2026-08-14T09:41:22.482+00:00'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Stable identifier for the failure.
                  message:
                    type: string
                    description: A description of what went wrong.
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
        '500':
          description: >-
            Server Error. This applies to all 5xx errors, including but not
            limited to 500, 501, 502, 503, and 504 errors. You should treat all
            of these errors the same.


            The provider could not be reached to read this transaction. Retry —
            the transaction itself is unaffected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: '`TRANSACTION_EXCEPTION`'
                  message:
                    type: string
                    description: Exception in transaction
                  requestId:
                    type: string
                    description: Quote this when asking Meld about a specific failure.
                  serviceProviderDetails:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The provider's own error code, when it sent one.
                      message:
                        type: string
                        description: The provider's own message.
                    example:
                      code: '5034'
                      message: >-
                        Digital currency and blockchain combination is
                        restricted for customer's country
                    description: >-
                      The provider's own error detail, when the failure came
                      from a service provider. Usually `code` and `message`; a
                      few providers pass their own body through, so other keys
                      can appear.
                    additionalProperties: {}
                  timestamp:
                    type: string
                    format: date-time
                    description: >-
                      When the failure occurred. ISO 8601, UTC
                      (`YYYY-MM-DDThh:mm:ss.sss+00:00`).
                    example: '2026-08-14T09:41:22.482+00:00'
              example:
                code: TRANSACTION_EXCEPTION
                message: Exception in transaction
                requestId: 01JB2K7C9XQZ4M8N2P5R6T3V
                timestamp: '2026-08-14T09:41:22.482+00:00'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PaymentTransactionResponse20230401:
      type: object
      properties:
        transaction:
          description: Payment transaction information
          allOf:
            - $ref: '#/components/schemas/PaymentTransactionOutput20230401'
    PaymentTransactionOutput20230401:
      type: object
      properties:
        accountId:
          type: string
          description: Your account Id
        countryCode:
          type: string
          description: The ISO 3166 2-digit country code.
        createdAt:
          type: string
          format: date-time
          description: An ISO 8601 DateTime at which the object was created.
        cryptoDetails:
          description: Details of the crypto currency purchase, sale, or transfer
          allOf:
            - $ref: '#/components/schemas/CryptoDetails'
        customer:
          description: Your customer's details
        description:
          type: string
          description: >-
            An arbitrary string which you can attach to this transaction. It is
            displayed when in the web interface alongside the charge.
        destinationAmount:
          type: number
          description: >-
            The destination amount of the transaction, e.g. the amount of crypto
            currency purchased
        destinationCurrencyCode:
          type: string
          description: Three-letter ISO currency code. Must be a supported currency
        externalCustomerId:
          type: string
          description: >-
            Your unique identifier for your customer. If maintaining your own
            customer management system this can also be used for tracking
            customer activity.
        externalReferenceId:
          type: string
          description: Your optional reference id provided during transaction creation
        externalSessionId:
          type: string
          description: The external Id of the session.
        externalSubaccountCustomerId:
          type: string
          description: >-
            Optional external identifier for the sub-account customer this
            transaction belongs to. Used for tracking when multiple businesses
            operate under one Meld account. A sub-account customer must be
            created first before it can be referenced.
        fiatAmountInUsd:
          type: number
          description: The fiat amount of the transaction in usd
        id:
          type: string
          description: Unique identifier for this transaction
        isImported:
          type: boolean
          default: false
          description: Return ***True*** if this transaction was initiated outside Meld
        isPassthrough:
          type: boolean
          default: false
          description: Return ***True*** if the passthrough credentials were used
        key:
          type: string
          description: >-
            Pagination key, may be used with the "after" parameter in search
            requests.  Only set and relevant for paginated calls
        multiFactorAuthorizationStatus:
          type: array
          description: >-
            The transaction required multi-factor authentication methods, and
            their current status. When required, must be approved for the
            purchase tobe completed successfully.
          items:
            $ref: '#/components/schemas/MultiFactorAuthorizationStatusOutput'
          uniqueItems: true
        orderId:
          type: string
          description: >-
            Unique identifier for the order associated with this transaction,
            when applicable
        parentPaymentTransactionId:
          type: string
          description: The Id of the associated object for this line item
        passthroughReference:
          type: string
          description: >-
            The unique reference you use to identify the partner on whose behalf
            you created this transaction.  This might be a String or UUID in
            your system to identify a merchant or partner.  This is needed so
            that you can associate passthrough transactions to your partners who
            may not be registered with Meld
        paymentDetails:
          description: payment details
          allOf:
            - $ref: '#/components/schemas/PaymentDetails'
        paymentMethodType:
          type: string
          description: Payment Method type used for this transaction.
        serviceProvider:
          type: string
          description: The service provider used for this transaction
        serviceProviderCreatedAt:
          type: string
          format: date-time
          description: >-
            The ISO 8601 DateTime when the transaction was created on the
            service provider's side
        serviceProviderDetails:
          type: object
          additionalProperties: {}
          description: The service provider's details
        serviceProviderTransactionUrl:
          type: string
          description: A link to the resource on the Service Provider, may not be present
        serviceTransactionId:
          type: string
          description: The service provider's unique identifier for this transaction
        sessionClientTags:
          type: object
          additionalProperties:
            type: string
          description: A map of client tags
        sessionId:
          type: string
          description: The Id of the session.
        sourceAmount:
          type: number
          description: The amount of the transaction
        sourceCurrencyCode:
          type: string
          description: Three-letter ISO currency code. Must be a supported currency
        status:
          type: string
          description: The current status of the transaction
        subaccountCustomerId:
          type: string
          description: >-
            Optional Meld customer id used to track the business sub-account
            this transaction belongs to when multiple businesses operate under
            one Meld account.
        transactionType:
          type: string
          description: The transaction's type
        updatedAt:
          type: string
          format: date-time
          description: >-
            Time at which the object was last updated. Measured in seconds since
            the Unix epoch.
      required:
        - createdAt
        - id
        - serviceProvider
        - sessionId
        - status
        - transactionType
        - updatedAt
    CryptoDetails:
      type: object
      properties:
        blockchainTransactionId:
          type: string
          description: The transaction id on the blockchain
        chainId:
          type: string
          description: >-
            A unique identifier that represents a blockchain network. The
            chainId of a particular network is standard everywhere.
        institution:
          type: string
          description: >-
            The institution used to execute the transaction. Only applicable for
            transfers currently.
        networkFee:
          type: number
          description: >-
            This fee is paid to cryptocurrency miners, which are the systems
            that process the transactions
        networkFeeInUsd:
          type: number
          description: This network fee in USD
        offrampDestinationWalletAddress:
          type: string
          description: The offramp destination wallet address
        partnerFee:
          type: number
          description: The partner fee amount
        partnerFeeInUsd:
          type: number
          description: The partner fee in USD
        swapFee:
          type: number
          description: >-
            The swap fee amount charged by the swap provider for ramp+swap
            transactions
        swapFeeInUsd:
          type: number
          description: The swap fee in USD
        totalFee:
          type: number
          description: The total amount of fees that will be charged
        totalFeeInUsd:
          type: number
          description: The total fee in USD
        transactionFee:
          type: number
          description: >-
            The fee amount charged by the service provider to process your
            customer's purchase
        transactionFeeInUsd:
          type: number
          description: The transaction fee in USD
        walletAddress:
          type: string
          description: Your customer's crypto wallet
    MultiFactorAuthorizationStatusOutput:
      type: object
      properties:
        method:
          type: string
          description: How the card details were authorized
          enum:
            - SMS
            - CARD
            - EMAIL
            - THREE_DS
        submitted:
          type: boolean
          default: false
          description: Return ***True*** if the information was submitted
        successful:
          type: boolean
          default: false
          description: Return ***True*** if the submitted information is a match
        url:
          type: string
          description: URL used to perform authorization (if applicable)
    PaymentDetails:
      type: object
      properties:
        authAmount:
          type: number
          description: >-
            The amount authorized to be charged (must be greater than the amount
            intended to be collected.) Note that the number of digits with a
            decimal point varies with the currency. Reference the list of active
            codes of official ISO 4217 currency names.
        captureAmount:
          type: number
          description: >-
            The amount captured (can be less than the amount intended to be
            collected.) Note that the number of digits with a decimal point
            varies with the currency. Reference the list of active codes of
            official ISO 4217 currency names.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      x-default: BASIC <Meld API Key>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.