# Get transaction details by reference

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /businesses/accounts/transactions/{transaction_reference}:
    get:
      summary: Get transaction details by reference
      deprecated: false
      description: >-

        Retrieves detailed information about a specific fund or payout
        transaction,

        looked up by its external transaction reference (e.g. network ref, ANB
        ref).


        The owning business is resolved from the JWT (businessId claim). A
        reference

        that does not belong to the authenticated business returns 404 so
        foreign

        reference existence is not leaked.


        Response includes:

        - Internal Formance ledger reference (`internal_id`)

        - Transaction type, direction, amount, balance, currency

        - Transaction parties (sender/receiver)

        - Type-specific fields (description for payouts, FAST/merchant fields
        for card flows)

        - Timestamps and audit information


        Transaction Types:

        - **Prefund**: Money coming into business account from bank (credit)

        - **M2P_Payout**: Money going out from business to individual wallet
        (debit)


        Error Scenarios:

        - 404: Transaction reference not found for this business, or account not
        found
                    
      operationId: getTransactionDetails
      tags:
        - Vrtx APIs/Transactions/Business Accounts
        - Transactions/Business Accounts
      parameters:
        - name: transaction_reference
          in: path
          description: External transaction reference (e.g. network ref, ANB ref)
          required: true
          example: payout_100b73ff57ff6
          schema:
            type: string
            minLength: 1
            examples:
              - '092838292101'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_reference:
                    type: string
                    description: Bank reference number or transaction reference
                  transaction_type:
                    type: string
                    description: Transaction type
                  source_account_number:
                    type: string
                    description: Source account number
                  destination_account_number:
                    type: string
                    description: Destination account reference
                  destination_external_reference:
                    type: string
                    description: >-
                      Destination account's external reference. Empty when the
                      destination is not a customer wallet, has no external
                      reference set, or was posted before the field was recorded
                  sender_id:
                    type: string
                    description: Deprecated — use source_account_number
                  receiver_id:
                    type: string
                    description: Deprecated — use destination_account_number
                  amount:
                    type: string
                  balance:
                    type: string
                    description: >-
                      Account balance after transaction with currency-specific
                      decimal places (0-3 decimals)
                  direction:
                    type: string
                    description: >-
                      Transaction direction relative to business account
                      (debit/credit)
                  currency:
                    type: string
                    default: SAR
                    description: Transaction currency
                  created_at:
                    type: string
                    description: Transaction creation timestamp (ISO 8601)
                  description:
                    type: string
                    description: Transaction description (for payout transactions)
                  beneficiary_details:
                    type: object
                    properties:
                      iban:
                        type: string
                        description: Counterparty IBAN
                      beneficiary_name:
                        type: string
                        description: Counterparty name as reported by the bank
                    required:
                      - iban
                      - beneficiary_name
                    description: External-rail counterparty (ANB-funded transactions only)
                  internal_id:
                    type: string
                    description: >-
                      Internal Formance ledger reference (e.g.
                      pt_0001shd133223u1h)
                required:
                  - transaction_reference
                  - transaction_type
                  - source_account_number
                  - destination_account_number
                  - destination_external_reference
                  - sender_id
                  - receiver_id
                  - amount
                  - balance
                  - direction
                  - currency
                  - created_at
                  - description
                  - beneficiary_details
                  - internal_id
              example:
                transaction_reference: fund_10049a927c9ef
                transaction_type: fund
                source_account_number: world
                destination_account_number: REF_bus_5989620
                destination_external_reference: ''
                sender_id: world
                receiver_id: REF_bus_5989620
                amount: '62500.00'
                balance: '3166181.94'
                direction: credit
                currency: SAR
                created_at: '2026-05-12T12:55:10.873Z'
                description: Topup via ANB credit
                beneficiary_details:
                  iban: '0108057386290014'
                  beneficiary_name: HAMH HR ANUAES ERCOR CE O
                internal_id: '38949'
          headers: {}
          x-apidog-name: Fund
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INVALID_INPUT
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INVALID_INPUT
                error_message: Input validation failed
                details:
                  - field_name: email
                    description: Invalid email format
                    code: VALIDATION_ERROR
                status_code: 400
          headers: {}
          x-apidog-name: ''
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - UNAUTHORIZED
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: UNAUTHORIZED
                error_message: Unauthorized access
                details: []
                status_code: 401
          headers: {}
          x-apidog-name: ''
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - FORBIDDEN
                      - UNAUTHORIZED
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: FORBIDDEN
                error_message: Access forbidden
                details: []
                status_code: 403
          headers: {}
          x-apidog-name: ''
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - NOT_FOUND
                      - TRANSACTION_NOT_FOUND
                      - ACCOUNT_NOT_FOUND
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: NOT_FOUND
                    error_message: Resource not found
                    details: []
                    status_code: 404
                example2:
                  summary: example2
                  value:
                    error_code: TRANSACTION_NOT_FOUND
                    error_message: Transaction not found
                    details: []
                    status_code: 404
                example3:
                  summary: example3
                  value:
                    error_code: ACCOUNT_NOT_FOUND
                    error_message: Account not found
                    details: []
                    status_code: 404
          headers: {}
          x-apidog-name: ''
        '405':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INVALID_INPUT
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INVALID_INPUT
                error_message: Input validation failed
                details: []
                status_code: 405
          headers: {}
          x-apidog-name: ''
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - CONFLICT
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: CONFLICT
                error_message: Resource conflict
                details: []
                status_code: 409
          headers: {}
          x-apidog-name: ''
        '410':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - NOT_FOUND
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: NOT_FOUND
                error_message: Resource not found
                details: []
                status_code: 410
          headers: {}
          x-apidog-name: ''
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INVALID_INPUT
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INVALID_INPUT
                error_message: Input validation failed
                details:
                  - field_name: amount
                    description: Amount must be greater than zero
                    code: VALIDATION_ERROR
                status_code: 422
          headers: {}
          x-apidog-name: ''
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - RATE_LIMITED
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: RATE_LIMITED
                error_message: Too many requests
                details: []
                status_code: 429
          headers: {}
          x-apidog-name: ''
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INTERNAL_ERROR
                      - EXTERNAL_SERVICE_ERROR
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: INTERNAL_ERROR
                    error_message: An internal server error occurred
                    details: []
                    status_code: 500
                example2:
                  summary: example2
                  value:
                    error_code: EXTERNAL_SERVICE_ERROR
                    error_message: An external service error occurred
                    details: []
                    status_code: 500
          headers: {}
          x-apidog-name: ''
        '501':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INTERNAL_ERROR
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INTERNAL_ERROR
                error_message: An internal server error occurred
                details: []
                status_code: 501
          headers: {}
          x-apidog-name: ''
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - SERVICE_UNAVAILABLE
                      - EXTERNAL_SERVICE_ERROR
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: SERVICE_UNAVAILABLE
                    error_message: >-
                      Service is currently not available. Please try again
                      later.
                    details: []
                    status_code: 503
                example2:
                  summary: example2
                  value:
                    error_code: EXTERNAL_SERVICE_ERROR
                    error_message: An external service error occurred
                    details: []
                    status_code: 503
          headers: {}
          x-apidog-name: ''
        '504':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - EXTERNAL_SERVICE_ERROR
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: EXTERNAL_SERVICE_ERROR
                error_message: An external service error occurred
                details: []
                status_code: 504
          headers: {}
          x-apidog-name: ''
        '505':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - UNSUPPORTED_VERSION
                  error_message:
                    type: string
                    description: Human-readable error message explaining what went wrong
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: Name of the field that caused the error
                        description:
                          type: string
                          description: Detailed description of the field error
                        code:
                          type: string
                          description: Optional error code specific to this field
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: >-
                      Additional error details and field-specific validation
                      errors
                  status_code:
                    type: number
                    description: HTTP status code corresponding to this error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: UNSUPPORTED_VERSION
                error_message: An internal server error occurred
                details: []
                status_code: 500
          headers: {}
          x-apidog-name: ''
        x-200:Payout:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_reference:
                    type: string
                  transaction_type:
                    type: string
                  source_account_number:
                    type: string
                  destination_account_number:
                    type: string
                  destination_external_reference:
                    type: string
                  sender_id:
                    type: string
                  receiver_id:
                    type: string
                  amount:
                    type: string
                  balance:
                    type: string
                  direction:
                    type: string
                  currency:
                    type: string
                  created_at:
                    type: string
                  description:
                    type: string
                  internal_id:
                    type: string
                required:
                  - transaction_reference
                  - transaction_type
                  - source_account_number
                  - destination_account_number
                  - destination_external_reference
                  - sender_id
                  - receiver_id
                  - amount
                  - balance
                  - direction
                  - currency
                  - created_at
                  - description
                  - internal_id
              example:
                transaction_reference: payout_100b73ff57ff6
                transaction_type: m2p_payout
                source_account_number: '110018271017'
                destination_account_number: '210019527040'
                destination_external_reference: E0010
                sender_id: '110018271017'
                receiver_id: '210019527040'
                amount: '10.00'
                balance: '3044665.96'
                direction: debit
                currency: SAR
                created_at: '2026-08-24T06:45:55.791Z'
                description: Card transaction - SAU (M2P_PAYOUT)
                internal_id: '40932'
          headers: {}
          x-apidog-name: Payout
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: Z_DALAhDsVqzcFeKBHGfg
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: Z_DALAhDsVqzcFeKBHGfg
            scopes:
              Z_DALAhDsVqzcFeKBHGfg:
                bearerAuth: []
      x-apidog-folder: Vrtx APIs/Transactions/Business Accounts
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1053095/apis/api-36885689-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth1:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearerAuth2:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth3:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT issued by Keycloak. The client_id/azp in the token must map to a
        configured tenant (public, fai, neomrs; e.g., fai-sandbox -> fai) or
        requests will return 403.
    bearerAuth4:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.sandbox.vrtx.sa
    description: Sandbox
security:
  - bearer: []

```
