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

# Get transaction

> Get a transaction by ID



## OpenAPI

````yaml https://api.fernhq.com/json get /transactions/{transactionId}
openapi: 3.1.1
info:
  title: Fern Developer API
  description: >-
    Fern is a seamless currency conversion and payments API that enables
    developers to integrate onramps, offramps, and third-party fiat/crypto
    payments into their applications. 


    Fern works with licensed liquidity providers and financial institutions to
    offer global currency support in one standardized API. 
  termsOfService: https://fernhq.com/terms
  version: 1.0.0
  contact:
    name: Fern API Support
    url: https://support.fernhq.com
    email: support@fernhq.com
servers:
  - url: https://api.fernhq.com
    description: API Server
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: >-
      Use Customers API to create a customer, update their details, and get
      their details.
  - name: Payment Accounts
    description: >-
      Use Payment Accounts API to add, update and get bank accounts for an
      existing customer. Currently, only USD bank accounts with domestic
      ACH/wire routing numbers are supported.
  - name: Quotes
    description: >-
      Use Quotes API to create and fetch quotes for transactions. Currently,
      onramp and offramp transaction types are supported and will be inferred
      from the source and destination. 


      Before you can create a transaction, you must create a quote. Quotes
      enable you to specify important information about the transaction, such as
      the source and destination currencies and accounts and your developer
      fees. Quotes also provide useful information that you can use to display
      in your application, such as exchange rates and total fees. 


      - **Quotes expire after 5 minutes** 

      - You must create a quote before you create a transaction, and you will
      use the quote ID when creating a transaction. 

      - Quotes can only be created for verified customers. /n- Once you create a
      transaction with a quote, that quote can no longer be used. To generate a
      new transaction, you will have to create a new quote.
  - name: Transactions
    description: >-
      Use Transactions API to create and get transactions for a customer and a
      quote. Requires the creation of a quote beforehand per transaction.
  - name: Automation Rules
    description: >-
      Use Automation Rules API to create and manage automation rules for a
      customer.
  - name: Webhooks
    description: >-
      Use Webhooks API to manage webhook endpoints and view recent webhook
      deliveries.
paths:
  /transactions/{transactionId}:
    get:
      tags:
        - Transactions
      summary: Get transaction
      description: Get a transaction by ID
      operationId: getTransaction
      parameters:
        - schema:
            format: uuid
            type: string
          example: 1d8beb26-b4d1-47ee-8e5d-0d3905f200c7
          in: path
          name: transactionId
          required: true
          description: Unique identifier of the transaction
      responses:
        '200':
          description: Response schema for a transaction creation request
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionId:
                    format: uuid
                    type: string
                    description: Unique identifier of the transaction
                    example: 1d8beb26-b4d1-47ee-8e5d-0d3905f200c7
                  customerId:
                    type: string
                    description: ID of the customer associated with this transaction
                    example: 0423300f-ae6d-4e82-8afb-a3b430e22e29
                  quoteId:
                    type: string
                    description: ID of the quote used for this transaction
                    example: 1d8beb26-b4d1-47ee-8e5d-0d3905f200c7
                  transactionStatus:
                    enum:
                      - AWAITING_TRANSFER
                      - PROCESSING
                      - COMPLETED
                      - FAILED
                      - CANCELLED
                      - CREATED
                      - EXPIRED
                    type: string
                    title: Transaction State
                    description: Current status of the transaction
                    example: PROCESSING
                  correlationId:
                    type: string
                    description: >-
                      Optional: You can add your own correlationId to match the
                      transaction to your own internal records.
                    example: 03b7030f-6da1-4e76-3352-3debd82112c8
                  source:
                    type: object
                    properties:
                      sourcePaymentAccountId:
                        format: uuid
                        type: string
                        description: The sending Payment Account Id.
                        example: 072a8b7b-38c7-429a-a6cf-35dae7f2fb77
                      sourceCurrency:
                        $ref: '#/components/schemas/CurrencySchema'
                      sourcePaymentMethod:
                        title: Source Payment Method Schema
                        description: The payment method for the source transaction
                        anyOf:
                          - enum:
                              - ACH
                              - WIRE
                              - SEPA
                              - AE_UAEFTS
                              - AR_TRANSFERS_3
                              - AU_BECS
                              - BD_BEFTN
                              - BO_RTGS
                              - BR_TED_DOC_PIX
                              - CA_INTERAC
                              - CL_TEF
                              - CN_CNAPS
                              - CO_ACH
                              - CR_SINPE
                              - CZ_CERTIS
                              - DK_NEMKONTO_FI
                              - DO_ACH
                              - EC_LOCAL
                              - EG_RTGS_IPN
                              - GB_BACS_CHAPS_FPS
                              - GH_GHIPSS
                              - GT_ACH
                              - HK_HKICL_CHATS_ECG
                              - HU_GIRO
                              - ID_SKN_RTGS
                              - IL_ZAHAV
                              - IN_NEFT_RTGS_IMPS
                              - JM_LOCAL
                              - JO_ACH
                              - JP_ZENGIN
                              - KE_KIBBS_PESALINK
                              - KR_LOCAL
                              - LK_LOCAL
                              - MX_SPEI
                              - MY_IBG_RENTAS
                              - NG_NIBSS_NEFT
                              - NO_NICS
                              - NP_LOCAL
                              - NZ_LOCAL
                              - PE_CCE
                              - PH_INSTAPAY_PESONET
                              - PK_RAAST_IBFT
                              - PL_ELIXIR_BLUE_CASH
                              - QA_QPS
                              - RO_RTGS
                              - SA_MADA
                              - SE_BANKGIROT
                              - SG_FAST_MEPS
                              - SV_LOCAL
                              - SWIFT
                              - TH_BAHTNET_PROMPTPAY
                              - TR_FAST_EFT
                              - TZ_RTGS
                              - VN_IBPS
                              - ZA_RTGS_EFT
                              - ACH_SAME_DAY
                            title: Fiat Payment Method
                            description: The payment method for the source funds (fiat)
                            type: string
                          - enum:
                              - ARBITRUM
                              - BASE
                              - ETHEREUM
                              - OPTIMISM
                              - POLYGON
                              - SOLANA
                            title: Crypto Payment Method
                            description: The payment method for the source funds (crypto)
                            type: string
                        example: ACH
                      sourceAmount:
                        type: string
                        title: Source Amount Schema
                        description: The amount to be sent
                        example: '100.00'
                      sourceReferenceId:
                        type: string
                        description: >-
                          The source reference id or on chain transaction hash
                          when applicable
                        example: >-
                          0x5332ee2726b7a1b818447d116f81af3be3518a801fb229ebf43e563c0ac4b4bc
                    required:
                      - sourceCurrency
                      - sourcePaymentMethod
                      - sourceAmount
                  destination:
                    type: object
                    properties:
                      destinationPaymentAccountId:
                        format: uuid
                        type: string
                        description: The receiving Payment Account Id.
                        example: 072a8b7b-38c7-429a-a6cf-35dae7f2fb77
                      destinationPaymentMethod:
                        title: Destination Payment Method Schema
                        description: The payment method for the destination transaction
                        anyOf:
                          - enum:
                              - ACH
                              - WIRE
                              - SEPA
                              - AE_UAEFTS
                              - AR_TRANSFERS_3
                              - AU_BECS
                              - BD_BEFTN
                              - BO_RTGS
                              - BR_TED_DOC_PIX
                              - CA_INTERAC
                              - CL_TEF
                              - CN_CNAPS
                              - CO_ACH
                              - CR_SINPE
                              - CZ_CERTIS
                              - DK_NEMKONTO_FI
                              - DO_ACH
                              - EC_LOCAL
                              - EG_RTGS_IPN
                              - GB_BACS_CHAPS_FPS
                              - GH_GHIPSS
                              - GT_ACH
                              - HK_HKICL_CHATS_ECG
                              - HU_GIRO
                              - ID_SKN_RTGS
                              - IL_ZAHAV
                              - IN_NEFT_RTGS_IMPS
                              - JM_LOCAL
                              - JO_ACH
                              - JP_ZENGIN
                              - KE_KIBBS_PESALINK
                              - KR_LOCAL
                              - LK_LOCAL
                              - MX_SPEI
                              - MY_IBG_RENTAS
                              - NG_NIBSS_NEFT
                              - NO_NICS
                              - NP_LOCAL
                              - NZ_LOCAL
                              - PE_CCE
                              - PH_INSTAPAY_PESONET
                              - PK_RAAST_IBFT
                              - PL_ELIXIR_BLUE_CASH
                              - QA_QPS
                              - RO_RTGS
                              - SA_MADA
                              - SE_BANKGIROT
                              - SG_FAST_MEPS
                              - SV_LOCAL
                              - SWIFT
                              - TH_BAHTNET_PROMPTPAY
                              - TR_FAST_EFT
                              - TZ_RTGS
                              - VN_IBPS
                              - ZA_RTGS_EFT
                              - ACH_SAME_DAY
                            title: Fiat Payment Method
                            description: The payment method for the source funds (fiat)
                            type: string
                          - enum:
                              - ARBITRUM
                              - BASE
                              - ETHEREUM
                              - OPTIMISM
                              - POLYGON
                              - SOLANA
                            title: Crypto Payment Method
                            description: The payment method for the source funds (crypto)
                            type: string
                        example: ETHEREUM
                      destinationCurrency:
                        $ref: '#/components/schemas/CurrencySchema'
                      exchangeRate:
                        type: string
                        description: >-
                          The rate at which the source currency is multiplied to
                          determine the equivalent amount in the destination
                          currency
                        example: '1.2'
                      destinationAmount:
                        type: string
                        description: >-
                          The amount to convert and send, expressed in decimals
                          and denominated in the source currency
                        example: '100'
                      destinationReferenceId:
                        type: string
                        description: >-
                          The destination reference id or on chain transaction
                          hash when applicable
                        example: >-
                          0x5332ee2726b7a1b818447d116f81af3be3518a801fb229ebf43e563c0ac4b4bc
                    required:
                      - destinationPaymentAccountId
                      - destinationPaymentMethod
                      - destinationCurrency
                      - exchangeRate
                      - destinationAmount
                  fees:
                    $ref: '#/components/schemas/FeesSchema'
                  transferInstructions:
                    $ref: '#/components/schemas/TransferInstructionsSchema'
                  createdAt:
                    type: string
                    description: ISO timestamp when this transaction was created
                    example: '2023-08-01T12:00:00Z'
                  updatedAt:
                    type: string
                    description: ISO timestamp when this transaction was last updated
                    example: '2023-08-01T12:00:00Z'
                  expiresAt:
                    type: string
                    description: >-
                      ISO timestamp when this transaction expires (only for
                      AWAITING_TRANSFER status)
                    example: '2023-08-01T12:05:00Z'
                required:
                  - transactionId
                  - customerId
                  - quoteId
                  - transactionStatus
                  - source
                  - destination
                  - fees
                  - createdAt
                  - updatedAt
                additionalProperties: false
                title: Transaction Response Schema
                description: Response schema for a transaction creation request
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                description: Bad Request
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              examples:
                example1:
                  value:
                    code: BAD_REQUEST
                    message: ''
                    statusCode: 400
                example2:
                  value:
                    code: VALIDATION_ERROR
                    message: Invalid body data
                    details:
                      - path: []
                        message: ''
                        location: body
                    statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Unauthorized
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: UNAUTHORIZED
                message: Missing API Key
                statusCode: 401
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                description: Forbidden
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: FORBIDDEN
                message: ''
                statusCode: 403
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                description: Not Found
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: NOT_FOUND
                message: >-
                  Customer not found with id
                  9eb88b00-f04f-409b-9df7-7dcc9003bc35
                statusCode: 404
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                description: Internal Server Error
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: INTERNAL_SERVER_ERROR
                message: INTERNAL_SERVER_ERROR
                statusCode: 500
components:
  schemas:
    CurrencySchema:
      title: Currency Schema
      description: Schema representing either a fiat or crypto currency
      anyOf:
        - type: object
          properties:
            label:
              type: string
            chain:
              enum:
                - ARBITRUM
                - BASE
                - ETHEREUM
                - OPTIMISM
                - POLYGON
                - SOLANA
              title: Crypto Chain
              description: The chain the crypto currency is on
              type: string
            contractAddress:
              type: string
            currencyDecimals:
              type: number
          required:
            - label
        - type: object
          properties:
            label:
              type: string
          required:
            - label
      example:
        label: USDC
        chain: ETHEREUM
        contractAddress: '0x123456789abcd123456789abcd123456789abcd'
        currencyDecimals: 18
    FeesSchema:
      type: object
      properties:
        feeCurrency:
          $ref: '#/components/schemas/CurrencySchema'
        fernFee:
          $ref: '#/components/schemas/FeeSchema'
        developerFee:
          $ref: '#/components/schemas/FeeSchema'
      required:
        - feeCurrency
        - fernFee
        - developerFee
      additionalProperties: false
      title: Fees Schema
      description: Fee structure for a transaction
    TransferInstructionsSchema:
      title: Transfer Instructions Schema
      description: Instructions for the customer to initiate the transfer
      anyOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - fiat
            transferPaymentMethod:
              enum:
                - ACH
                - WIRE
                - SEPA
                - AE_UAEFTS
                - AR_TRANSFERS_3
                - AU_BECS
                - BD_BEFTN
                - BO_RTGS
                - BR_TED_DOC_PIX
                - CA_INTERAC
                - CL_TEF
                - CN_CNAPS
                - CO_ACH
                - CR_SINPE
                - CZ_CERTIS
                - DK_NEMKONTO_FI
                - DO_ACH
                - EC_LOCAL
                - EG_RTGS_IPN
                - GB_BACS_CHAPS_FPS
                - GH_GHIPSS
                - GT_ACH
                - HK_HKICL_CHATS_ECG
                - HU_GIRO
                - ID_SKN_RTGS
                - IL_ZAHAV
                - IN_NEFT_RTGS_IMPS
                - JM_LOCAL
                - JO_ACH
                - JP_ZENGIN
                - KE_KIBBS_PESALINK
                - KR_LOCAL
                - LK_LOCAL
                - MX_SPEI
                - MY_IBG_RENTAS
                - NG_NIBSS_NEFT
                - NO_NICS
                - NP_LOCAL
                - NZ_LOCAL
                - PE_CCE
                - PH_INSTAPAY_PESONET
                - PK_RAAST_IBFT
                - PL_ELIXIR_BLUE_CASH
                - QA_QPS
                - RO_RTGS
                - SA_MADA
                - SE_BANKGIROT
                - SG_FAST_MEPS
                - SV_LOCAL
                - SWIFT
                - TH_BAHTNET_PROMPTPAY
                - TR_FAST_EFT
                - TZ_RTGS
                - VN_IBPS
                - ZA_RTGS_EFT
                - ACH_SAME_DAY
              type: string
              title: Fiat Payment Method
              description: The fiat payment method used for the transaction
            transferMessage:
              type: string
              description: Message or memo that the customer must include with the deposit
              example: 'Payment for order #12345'
            transferBankName:
              type: string
              description: Name of the bank for deposit
              example: First National Bank
            transferBankAddress:
              type: string
              description: Address of the bank
              example: 123 Bank St, Finance City
            transferBankAccountNumber:
              type: string
              description: Bank account number for deposit
              example: '987654321'
            transferRoutingNumber:
              type: string
              description: Routing number of the bank
              example: '123456789'
            transferBankBeneficiaryName:
              type: string
              description: Beneficiary name associated with the bank account
              example: John Doe
            transferIban:
              type: string
              description: IBAN for international transfers
              example: GB29NWBK60161331926819
            transferBicSwift:
              type: string
              description: BIC/SWIFT code of the bank
              example: DEUTDEFF
            transferIfscCode:
              type: string
              description: IFSC code for Indian bank transfers
              example: SBIN0005943
            transferSortCode:
              type: string
              description: UK sort code
              example: 40-47-36
            transferBsbNumber:
              type: string
              description: BSB number for Australian banks
              example: 082-902
            transferTransitNumber:
              type: string
              description: Canadian transit number
              example: '12345'
            transferBankCode:
              type: string
              description: Generic bank code
              example: '001'
            transferClabeNumber:
              type: string
              description: CLABE number for Mexican bank transfers
              example: '002010077777777771'
            transferRoutingCode:
              type: string
              description: Alternate routing code
              example: ROUT1234
            transferBranchCode:
              type: string
              description: Branch code
              example: '0001'
            transferClearingCode:
              type: string
              description: Clearing code
              example: '110000'
            transferCnapsCode:
              type: string
              description: CNAPS code for Chinese banks
              example: '102033003330'
            transferNubanCode:
              type: string
              description: NUBAN number for Nigerian banks
              example: '1234567890'
            transferPixCode:
              type: string
              description: PIX key for Brazilian instant payments
              example: user@bank.com
            transferPaymentLink:
              type: string
              description: Payment link for making the transfer (used for Colombian pesos)
              example: https://secure.payzen.lat/t/paxsz1d7
          required:
            - type
            - transferPaymentMethod
          additionalProperties: false
          title: Fiat Transfer Instructions
          description: Instructions for the customer to initiate the fiat transfer
        - type: object
          properties:
            type:
              type: string
              enum:
                - crypto
            transferPaymentMethod:
              enum:
                - ARBITRUM
                - BASE
                - ETHEREUM
                - OPTIMISM
                - POLYGON
                - SOLANA
              title: Crypto Payment Method
              description: The chain to deposit funds on
              type: string
            transferWalletAddress:
              type: string
              description: Wallet address to which funds should be sent (valid EVM address)
              example: '0x123abc123abc123abc123abc123abc123abc123a'
          required:
            - type
            - transferPaymentMethod
            - transferWalletAddress
          additionalProperties: false
          title: Crypto Transfer Instructions
          description: Instructions for the customer to initiate the offramp
    FeeSchema:
      title: Fee Schema
      description: Fee Amount in USD and in the fee currency
      type: object
      properties:
        feeAmount:
          type: string
          title: Fee Amount Schema
          description: Amount of this fee that was applied
          example: '5.45'
        feeUSDAmount:
          type: string
          title: Fee USD Amount Schema
          description: Amount of this fee that was applied in USD
          example: '5.45'
      required:
        - feeAmount
        - feeUSDAmount
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: To authenticate server-side requests

````