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

# Get transaction

> Get an existing transaction for a user



## OpenAPI

````yaml /openapi/embedded-consumer-wallets.yaml get /v1/users/{userId}/transactions/{transactionId}
openapi: 3.0.0
info:
  description: APIs for interacting with Cadana Embedded Consumer Wallets
  version: 1.0.0
  title: Embedded Consumer Wallets
  termsOfService: https://cadanapay.com/terms-and-conditions
  contact:
    email: api@cadanapay.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.cadanapay.com
    description: Prod Server
  - url: https://dev-api.cadanapay.com
    description: Dev Server
security:
  - Authorization: []
tags:
  - name: Beneficiaries
    description: APIs for managing user beneficiaries
  - name: Transactions
    description: APIs for managing user transactions
  - name: Balances
    description: APIs for managing user account balances
paths:
  /v1/users/{userId}/transactions/{transactionId}:
    get:
      tags:
        - Transactions
      summary: Get transaction
      description: Get an existing transaction for a user
      parameters:
        - $ref: '#/components/parameters/userId'
        - $ref: '#/components/parameters/transactionId'
        - $ref: '#/components/parameters/XMultiTenantKey'
        - name: document
          in: query
          required: false
          description: >-
            Include a presigned download URL for a transaction document, e.g.
            `firc` for the FIRC (Foreign Inward Remittance Certificate) on
            Indian payouts
          schema:
            type: string
            enum:
              - firc
      responses:
        '200':
          $ref: '#/components/responses/GetTransactionResponse'
        '404':
          $ref: '#/components/responses/NotFoundError'
        5XX:
          $ref: '#/components/responses/InternalError'
      security:
        - Authorization: []
components:
  parameters:
    userId:
      name: userId
      in: path
      description: The unique identifier for the user
      required: true
      schema:
        type: string
        format: uuid
        example: c06f3427-3bbe-4d70-9a54-28acda267e48
    transactionId:
      name: transactionId
      in: path
      description: The unique identifier for the transaction
      required: true
      schema:
        type: string
        format: uuid
        example: c06f3427-3bbe-4d70-9a54-28acda267e48
    XMultiTenantKey:
      name: X-MultiTenantKey
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required when using a Platform API token. The tenant key identifying
        which business to operate on.
  responses:
    GetTransactionResponse:
      description: Get transaction response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Transaction'
          examples:
            transaction:
              summary: Example transaction response
              value:
                id: d0137ede-7df1-4a54-8206-b3ab7b03876f
                type: payout
                beneficiaryId: c871b333-e129-409c-aabd-7cfb55a967cc
                quoteId: d35d2bd6-188b-4e82-9a16-71442dad7375
                amount:
                  value: '500.00'
                  currency: PHP
                sourceAmount:
                  value: '9.00'
                  currency: USD
                feeAmount:
                  value: '0.10'
                  currency: USD
                fxRate: '56.1234'
                reference: 3f70be8e-426f-4e89-b883-9c97a1c334d5
                status: success
                createdTimestamp: 1748478276
                lastUpdatedTimestamp: 1748478276
    NotFoundError:
      description: Requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    InternalError:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
  schemas:
    Transaction:
      type: object
      required:
        - id
        - type
        - amount
        - sourceAmount
        - fxRate
        - status
        - reference
        - createdTimestamp
        - lastUpdatedTimestamp
      properties:
        id:
          type: string
          format: uuid
          example: d0137ede-7df1-4a54-8206-b3ab7b03876f
        type:
          type: string
          description: The transaction type, e.g. payout, payroll, deposit, transfer
          example: payout
        beneficiaryId:
          type: string
          format: uuid
          example: c871b333-e129-409c-aabd-7cfb55a967cc
        quoteId:
          type: string
          format: uuid
          example: d35d2bd6-188b-4e82-9a16-71442dad7375
        reference:
          type: string
          format: uuid
          description: The client reference for the transaction
          example: c06f3427-3bbe-4d70-9a54-28acda267e48
        amount:
          $ref: '#/components/schemas/Amount'
        sourceAmount:
          $ref: '#/components/schemas/Amount'
        feeAmount:
          $ref: '#/components/schemas/Amount'
        fxRate:
          type: string
          example: '56.1234'
        status:
          type: string
          enum:
            - initiated
            - success
            - processing
            - failed
          example: success
        createdTimestamp:
          type: integer
          description: Unix timestamp when the transaction was created
          example: 1748478276
        lastUpdatedTimestamp:
          type: integer
          description: Unix timestamp when the transaction was last updated
          example: 1748478276
        document:
          type: object
          description: >-
            Present only when a document is requested via the `document` query
            parameter
          properties:
            type:
              type: string
              description: The document type
              example: FIRC
            presignedURL:
              type: string
              description: Presigned URL to download the document; valid until expiresAt
              example: >-
                https://bucket.s3.amazonaws.com/firc/d0137ede-7df1-4a54-8206-b3ab7b03876f.pdf
            expiresAt:
              type: integer
              description: Unix timestamp when the presigned URL expires
              example: 1748481876
    NotFoundError:
      description: Not Found
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: resource_not_found
        message: Requested resource could not be found.
    InternalError:
      description: Internal server error
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: internal_error
        message: An unexpected error occurred. Please try again later.
    Amount:
      type: object
      required:
        - value
        - currency
      properties:
        value:
          type: string
          description: The value of the amount
          example: '10.00'
        currency:
          type: string
          description: The currency of the asset
          example: USD
    Error:
      type: object
      properties:
        code:
          description: A machine parsable error code
          type: string
          enum:
            - invalid_request_body
            - resource_not_found
            - forbidden
            - internal_error
        message:
          description: A human readable message describing the error
          type: string
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````