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

# Approve an agent action

> Approve a pending agent action, allowing Grid to proceed with execution. The action must have status `PENDING_APPROVAL`. Once approved, Grid executes the underlying operation (quote execution or transfer) and the action transitions to `APPROVED`.
For `EXECUTE_QUOTE` actions, note that the underlying quote may have expired between submission and approval — in that case the action will transition to `FAILED` instead.
This endpoint is called by the platform's backend using platform credentials, not by the agent itself.




## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/grid/openapi.documented.yml post /agents/{agentId}/actions/{actionId}/approve
openapi: 3.1.0
info:
  title: Grid API
  description: >
    API for managing global payments on the open Money Grid. Built by
    Lightspark. See the full documentation at https://docs.lightspark.com/.
  version: '2025-10-13'
  contact:
    name: Lightspark Support
    email: support@lightspark.com
  license:
    name: Proprietary
    url: https://lightspark.com/terms
servers:
  - url: https://api.lightspark.com/grid/2025-10-13
    description: Production server
security:
  - BasicAuth: []
  - AgentAuth: []
tags:
  - name: Platform Configuration
    description: >-
      Platform configuration endpoints for managing global settings. You can
      also configure these settings in the Grid dashboard.
  - name: Customers
    description: >-
      Customer management endpoints for creating and updating customer
      information
  - name: KYC/KYB Verifications
    description: >-
      Endpoints for Know Your Customer (KYC) and Know Your Business (KYB)
      verification, including managing beneficial owners and triggering
      verification for customers.
  - name: Documents
    description: >-
      Endpoints for uploading and managing verification documents for customers
      and beneficial owners. Supports KYC and KYB document requirements.
  - name: Internal Accounts
    description: >-
      Internal account management endpoints for creating and managing internal
      accounts
  - name: External Accounts
    description: >-
      External account management endpoints for creating and managing external
      bank accounts
  - name: Same-Currency Transfers
    description: >-
      Endpoints for transferring funds between internal and external accounts
      with the same currency
  - name: Cross-Currency Transfers
    description: Endpoints for creating and confirming quotes for cross-currency transfers
  - name: Transactions
    description: Endpoints for retrieving transaction information
  - name: Webhooks
    description: Webhook endpoints and configuration for receiving notifications
  - name: Invitations
    description: Endpoints for creating, claiming and managing UMA invitations
  - name: Sandbox
    description: Endpoints to trigger test cases in sandbox
  - name: API Tokens
    description: Endpoints to programmatically manage API tokens
  - name: Exchange Rates
    description: >-
      Endpoints for retrieving cached foreign exchange rates. Rates are cached
      for approximately 5 minutes and include platform-specific fees.
  - name: Discoveries
    description: >-
      Endpoints for discovering available payment rails, banks, and providers
      for a given country and currency corridor.
  - name: Embedded Wallet Auth
    description: >-
      Endpoints for registering and verifying end-user authentication
      credentials (email OTP, OAuth, passkey) used to sign Embedded Wallet
      actions.
  - name: Agent Management
    description: >-
      Endpoints for creating and managing agents (experimental), called by the
      partner's backend using platform credentials. Covers the full agent
      lifecycle: creation, policy configuration, pausing, deletion, the device
      code installation flow, and approving or rejecting transactions initiated
      by agents.
  - name: Agent Operations
    description: >-
      Endpoints called by the agent itself using its own credentials (obtained
      via device code redemption). Scoped to the agent's associated customer —
      all requests automatically operate on behalf of that customer and are
      subject to the agent's policy. When an action requires approval, the
      resulting transaction enters a pending state and must be approved by the
      platform via `POST /transactions/{transactionId}/approve`.
  - name: Cards
    description: >-
      Card management endpoints. Issue debit cards against an internal account,
      freeze / unfreeze, close, manage card funding sources, and list card
      transactions.
paths:
  /agents/{agentId}/actions/{actionId}/approve:
    parameters:
      - name: agentId
        in: path
        description: System-generated unique agent identifier
        required: true
        schema:
          type: string
      - name: actionId
        in: path
        description: Unique identifier of the agent action to approve
        required: true
        schema:
          type: string
    post:
      tags:
        - Agent Management
      summary: Approve an agent action
      description: >
        Approve a pending agent action, allowing Grid to proceed with execution.
        The action must have status `PENDING_APPROVAL`. Once approved, Grid
        executes the underlying operation (quote execution or transfer) and the
        action transitions to `APPROVED`.

        For `EXECUTE_QUOTE` actions, note that the underlying quote may have
        expired between submission and approval — in that case the action will
        transition to `FAILED` instead.

        This endpoint is called by the platform's backend using platform
        credentials, not by the agent itself.
      operationId: approveAgentAction
      responses:
        '200':
          description: Action approved successfully. Returns the updated AgentAction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAction'
        '400':
          description: Bad request - Action cannot be approved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent or action not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: >-
            Conflict - Action is not pending approval or has already been
            processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
      security:
        - BasicAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import LightsparkGrid from '@lightsparkdev/grid';


            const client = new LightsparkGrid({
              username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
              password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
            });


            const agentAction = await
            client.agents.transactions.approve('actionId', { agentId: 'agentId'
            });


            console.log(agentAction.id);
        - lang: Python
          source: |-
            import os
            from grid import LightsparkGrid

            client = LightsparkGrid(
                username=os.environ.get("GRID_CLIENT_ID"),  # This is the default and can be omitted
                password=os.environ.get("GRID_CLIENT_SECRET"),  # This is the default and can be omitted
            )
            agent_action = client.agents.transactions.approve(
                action_id="actionId",
                agent_id="agentId",
            )
            print(agent_action.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/grid-go\"\n\t\"github.com/stainless-sdks/grid-go/option\"\n)\n\nfunc main() {\n\tclient := grid.NewClient(\n\t\toption.WithUsername(\"My Username\"),\n\t\toption.WithPassword(\"My Password\"),\n\t)\n\tagentAction, err := client.Agents.Transactions.Approve(\n\t\tcontext.TODO(),\n\t\t\"actionId\",\n\t\tgrid.AgentTransactionApproveParams{\n\t\t\tAgentID: \"agentId\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", agentAction.ID)\n}\n"
        - lang: Kotlin
          source: >-
            package com.lightspark.grid.example


            import com.lightspark.grid.client.LightsparkGridClient

            import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient

            import com.lightspark.grid.models.agents.AgentAction

            import
            com.lightspark.grid.models.agents.transactions.TransactionApproveParams


            fun main() {
                val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()

                val params: TransactionApproveParams = TransactionApproveParams.builder()
                    .agentId("agentId")
                    .actionId("actionId")
                    .build()
                val agentAction: AgentAction = client.agents().transactions().approve(params)
            }
        - lang: Ruby
          source: >-
            require "grid"


            lightspark_grid = Grid::Client.new(username: "My Username",
            password: "My Password")


            agent_action =
            lightspark_grid.agents.transactions.approve("actionId", agent_id:
            "agentId")


            puts(agent_action)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Grid\Client;
            use Grid\Core\Exceptions\APIException;

            $client = new Client(
              username: getenv('GRID_CLIENT_ID') ?: 'My Username',
              password: getenv('GRID_CLIENT_SECRET') ?: 'My Password',
            );

            try {
              $agentAction = $client->agents->transactions->approve(
                'actionId', agentID: 'agentId'
              );

              var_dump($agentAction);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using Grid;

            using Grid.Models.Agents.Transactions;


            LightsparkGridClient client = new();


            TransactionApproveParams parameters = new()

            {
                AgentID = "agentId",
                ActionID = "actionId",
            };


            var agentAction = await
            client.Agents.Transactions.Approve(parameters);


            Console.WriteLine(agentAction);
        - lang: CLI
          source: |-
            grid agents:transactions approve \
              --username 'My Username' \
              --password 'My Password' \
              --agent-id agentId \
              --action-id actionId
components:
  schemas:
    AgentAction:
      type: object
      description: >-
        An action submitted by an agent that may require platform approval
        before execution. All agent-initiated operations (quote execution,
        transfers) are represented as AgentActions, giving the platform a
        consistent object to approve, reject, and audit regardless of the
        underlying operation type.
      required:
        - id
        - agentId
        - customerId
        - platformCustomerId
        - status
        - type
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          description: System-generated unique identifier for this action.
          example: AgentAction:019542f5-b3e7-1d02-0000-000000000099
        agentId:
          type: string
          description: The agent that submitted this action.
          example: Agent:019542f5-b3e7-1d02-0000-000000000042
        customerId:
          type: string
          description: The customer on whose behalf the action was submitted.
          example: Customer:019542f5-b3e7-1d02-0000-000000000010
        platformCustomerId:
          type: string
          description: Platform-specific ID of the customer.
          example: user-a1b2c3
        status:
          $ref: '#/components/schemas/AgentActionStatus'
        type:
          $ref: '#/components/schemas/AgentActionType'
        quote:
          allOf:
            - $ref: '#/components/schemas/Quote'
          description: >-
            The quote being executed. Populated for `EXECUTE_QUOTE` actions;
            absent for transfer actions. Contains the full amount, currency,
            destination, and rate details needed to present an approval decision
            to the user.
        transferDetails:
          allOf:
            - $ref: '#/components/schemas/AgentTransferDetails'
          description: >-
            Details of the transfer being requested. Populated for
            `TRANSFER_OUT` and `TRANSFER_IN` actions; absent for `EXECUTE_QUOTE`
            actions.
        transaction:
          allOf:
            - $ref: '#/components/schemas/TransactionOneOf'
          description: >-
            The resulting transaction, populated once the action has been
            approved and execution has begun. Absent while the action is
            `PENDING_APPROVAL` or `REJECTED`.
        rejectionReason:
          type: string
          description: >-
            Human-readable reason provided by the platform when rejecting the
            action. Only present when status is `REJECTED`.
          example: Transaction amount exceeds customer's current risk limit.
        createdAt:
          type: string
          format: date-time
          description: When the action was submitted by the agent.
          example: '2025-10-03T15:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: When the action was last updated.
          example: '2025-10-03T15:02:00Z'
    Error400:
      type: object
      required:
        - message
        - status
        - code
      properties:
        status:
          type: integer
          enum:
            - 400
          description: HTTP status code
        code:
          type: string
          description: >
            | Error Code | Description |

            |------------|-------------|

            | INVALID_INPUT | Invalid input provided |

            | MISSING_MANDATORY_USER_INFO | Required customer information is
            missing |

            | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |

            | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |

            | INVALID_UMA_ADDRESS | UMA address format is invalid |

            | INVITATION_CANCELLED | Invitation has been cancelled |

            | QUOTE_REQUEST_FAILED | An issue occurred during the quote process;
            this is retryable |

            | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid
            |

            | INVALID_RECEIVER | Receiver is invalid |

            | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq
            response |

            | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |

            | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |

            | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid
            |

            | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA
            parameters are missing |

            | SENDER_NOT_ACCEPTED | Sender is not accepted |

            | AMOUNT_OUT_OF_RANGE | Amount is out of range |

            | INVALID_CURRENCY | Currency is invalid |

            | INVALID_TIMESTAMP | Timestamp is invalid |

            | INVALID_NONCE | Nonce is invalid |

            | INVALID_REQUEST_FORMAT | Request format is invalid |

            | INVALID_BANK_ACCOUNT | Bank account is invalid |

            | SELF_PAYMENT | Self payment not allowed |

            | LOOKUP_REQUEST_FAILED | Lookup request failed |

            | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |

            | INVALID_AMOUNT | Amount is invalid |

            | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |

            | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |

            | LOW_QUALITY | Document quality too low to process |

            | DATA_MISMATCH | Document details don't match provided information
            |

            | EXPIRED | Document has expired |

            | SUSPECTED_FRAUD | Document suspected of being forged or edited |

            | UNSUITABLE_DOCUMENT | Document type is not accepted or not
            supported |

            | INCOMPLETE | Document is missing pages or sides |

            | EMAIL_OTP_CREDENTIAL_ALREADY_EXISTS | An EMAIL_OTP credential is
            already registered on the target internal account; only one email
            OTP credential is supported per internal account at this time |

            | PASSKEY_CREDENTIAL_ALREADY_EXISTS | A PASSKEY credential with the
            same WebAuthn credentialId is already registered on the target
            internal account |
          enum:
            - INVALID_INPUT
            - MISSING_MANDATORY_USER_INFO
            - INVITATION_ALREADY_CLAIMED
            - INVITATIONS_NOT_CONFIGURED
            - INVALID_UMA_ADDRESS
            - INVITATION_CANCELLED
            - QUOTE_REQUEST_FAILED
            - INVALID_PAYREQ_RESPONSE
            - INVALID_RECEIVER
            - PARSE_PAYREQ_RESPONSE_ERROR
            - CERT_CHAIN_INVALID
            - CERT_CHAIN_EXPIRED
            - INVALID_PUBKEY_FORMAT
            - MISSING_REQUIRED_UMA_PARAMETERS
            - SENDER_NOT_ACCEPTED
            - AMOUNT_OUT_OF_RANGE
            - INVALID_CURRENCY
            - INVALID_TIMESTAMP
            - INVALID_NONCE
            - INVALID_REQUEST_FORMAT
            - INVALID_BANK_ACCOUNT
            - SELF_PAYMENT
            - LOOKUP_REQUEST_FAILED
            - PARSE_LNURLP_RESPONSE_ERROR
            - INVALID_AMOUNT
            - WEBHOOK_ENDPOINT_NOT_SET
            - WEBHOOK_DELIVERY_ERROR
            - LOW_QUALITY
            - DATA_MISMATCH
            - EXPIRED
            - SUSPECTED_FRAUD
            - UNSUITABLE_DOCUMENT
            - INCOMPLETE
            - EMAIL_OTP_CREDENTIAL_ALREADY_EXISTS
            - PASSKEY_CREDENTIAL_ALREADY_EXISTS
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    Error401:
      type: object
      required:
        - message
        - status
        - code
      properties:
        status:
          type: integer
          enum:
            - 401
          description: HTTP status code
        code:
          type: string
          description: >
            | Error Code | Description |

            |------------|-------------|

            | UNAUTHORIZED | Issue with API credentials |

            | INVALID_SIGNATURE | Signature header is invalid |

            | WALLET_SIGNATURE_MISSING | The `Grid-Wallet-Signature` header is
            required for this Embedded Wallet action but was not supplied |

            | WALLET_SIGNATURE_MALFORMED | The `Grid-Wallet-Signature` header
            could not be parsed (bad encoding, structure, or fields) |

            | WALLET_SIGNATURE_BODY_MISMATCH | The `Grid-Wallet-Signature` was
            computed over a different request body than the one received |

            | WALLET_SIGNATURE_INVALID | The `Grid-Wallet-Signature` failed
            cryptographic verification against the registered credential |

            | REQUEST_ID_MISSING | The `Request-Id` header is required on the
            signed retry but was not supplied (paired with
            `Grid-Wallet-Signature`) |
          enum:
            - UNAUTHORIZED
            - INVALID_SIGNATURE
            - WALLET_SIGNATURE_MISSING
            - WALLET_SIGNATURE_MALFORMED
            - WALLET_SIGNATURE_BODY_MISMATCH
            - WALLET_SIGNATURE_INVALID
            - REQUEST_ID_MISSING
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    Error404:
      type: object
      required:
        - message
        - status
        - code
      properties:
        status:
          type: integer
          enum:
            - 404
          description: HTTP status code
        code:
          type: string
          description: >
            | Error Code | Description |

            |------------|-------------|

            | TRANSACTION_NOT_FOUND | Transaction not found |

            | INVITATION_NOT_FOUND | Invitation not found |

            | USER_NOT_FOUND | Customer not found |

            | QUOTE_NOT_FOUND | Quote not found |

            | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |

            | TOKEN_NOT_FOUND | Token not found |

            | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |

            | REFERENCE_NOT_FOUND | Reference not found |

            | UMA_NOT_FOUND | The UMA address is well-formed but no receiver
            exists at the counterparty VASP |
          enum:
            - TRANSACTION_NOT_FOUND
            - INVITATION_NOT_FOUND
            - USER_NOT_FOUND
            - QUOTE_NOT_FOUND
            - LOOKUP_REQUEST_NOT_FOUND
            - TOKEN_NOT_FOUND
            - BULK_UPLOAD_JOB_NOT_FOUND
            - REFERENCE_NOT_FOUND
            - UMA_NOT_FOUND
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    Error409:
      type: object
      required:
        - message
        - status
        - code
      properties:
        status:
          type: integer
          enum:
            - 409
          description: HTTP status code
        code:
          type: string
          description: >
            | Error Code | Description |

            |------------|-------------|

            | TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL | Transaction is not
            pending platform approval |

            | UMA_ADDRESS_EXISTS | UMA address already exists |

            | EMAIL_OTP_EMAIL_ALREADY_EXISTS | Email address is already
            associated with an EMAIL_OTP credential |

            | EMAIL_OTP_CREDENTIAL_SET_CHANGED | Tied EMAIL_OTP credential set
            changed after the signed-retry challenge was issued |

            | CONFLICT | Generic resource-state conflict. Returned, for example,
            when `platformCustomerId` on a customer create call collides with an
            existing active customer on the same platform |
          enum:
            - TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL
            - UMA_ADDRESS_EXISTS
            - EMAIL_OTP_EMAIL_ALREADY_EXISTS
            - EMAIL_OTP_CREDENTIAL_SET_CHANGED
            - CONFLICT
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    Error500:
      type: object
      required:
        - message
        - status
        - code
      properties:
        status:
          type: integer
          enum:
            - 500
          description: HTTP status code
        code:
          type: string
          description: |
            | Error Code | Description |
            |------------|-------------|
            | GRID_SWITCH_ERROR | Grid switch error |
            | INTERNAL_ERROR | Internal server or UMA error |
          enum:
            - GRID_SWITCH_ERROR
            - INTERNAL_ERROR
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    AgentActionStatus:
      type: string
      enum:
        - PENDING_APPROVAL
        - APPROVED
        - REJECTED
        - FAILED
      description: >
        Status of an agent action.


        | Status | Description |

        |--------|-------------|

        | `PENDING_APPROVAL` | Submitted by the agent, awaiting platform
        approval before execution |

        | `APPROVED` | Approved by the platform; execution is in progress or
        completed |

        | `REJECTED` | Rejected by the platform; the underlying transaction was
        not executed |

        | `FAILED` | Approved but execution failed (e.g. quote expired,
        insufficient funds) |
    AgentActionType:
      type: string
      enum:
        - EXECUTE_QUOTE
        - TRANSFER_OUT
        - TRANSFER_IN
      description: >
        The type of action the agent is requesting.


        | Type | Description |

        |------|-------------|

        | `EXECUTE_QUOTE` | Execute a cross-currency quote |

        | `TRANSFER_OUT` | Transfer from an internal account to an external
        account |

        | `TRANSFER_IN` | Transfer from an external account to an internal
        account |
    Quote:
      type: object
      required:
        - id
        - status
        - expiresAt
        - createdAt
        - source
        - destination
        - sendingCurrency
        - receivingCurrency
        - totalSendingAmount
        - totalReceivingAmount
        - exchangeRate
        - feesIncluded
        - transactionId
      properties:
        id:
          type: string
          description: Unique identifier for this quote
          example: Quote:019542f5-b3e7-1d02-0000-000000000006
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
            - EXPIRED
          description: Current status of the quote
          example: PENDING
        createdAt:
          type: string
          format: date-time
          description: When this quote was created
          example: '2025-10-03T12:00:00Z'
        expiresAt:
          type: string
          format: date-time
          description: >-
            Absolute UTC timestamp when the rate locked in this quote becomes
            invalid and the quote can no longer be executed. The window depends
            on the rail and corridor: instant rails (Lightning, Spark, USDC on
            Solana/Base/Polygon, RTP, SEPA Instant) typically expire in 1–5
            minutes; corridors with longer settlement guarantees may have longer
            windows. Always rely on this timestamp rather than assuming a fixed
            window.
          example: '2025-10-03T12:05:00Z'
        source:
          $ref: '#/components/schemas/QuoteSourceOneOf'
        destination:
          $ref: '#/components/schemas/QuoteDestinationOneOf'
        sendingCurrency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the sending amount
        receivingCurrency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the receiving amount
        totalSendingAmount:
          type: integer
          format: int64
          description: >-
            The total amount that will be sent in the smallest unit of the
            sending currency (eg. cents).
          exclusiveMinimum: 0
          example: 123010
        totalReceivingAmount:
          type: integer
          format: int64
          description: >-
            The total amount that will be received in the smallest unit of the
            receiving currency (eg. cents).
          exclusiveMinimum: 0
          example: 1000
        exchangeRate:
          type: number
          description: Number of sending currency units per receiving currency unit.
          exclusiveMinimum: 0
        feesIncluded:
          type: integer
          format: int64
          description: >-
            The fees associated with the quote in the smallest unit of the
            sending currency (eg. cents). Note: this value may fluctuate between
            quotes — some underlying fee components are defined in the receiving
            currency, so their equivalent in the sending currency moves with the
            FX rate. The fees shown here are locked only for the lifetime of
            this quote.
          minimum: 0
          example: 10
        paymentInstructions:
          type: array
          description: >-
            Payment instructions for executing the payment. This is not required
            when using an internal account source.
          items:
            $ref: '#/components/schemas/PaymentInstructions'
          example:
            - accountOrWalletInfo:
                accountType: USD_ACCOUNT
                paymentRails:
                  - ACH
                  - WIRE
                accountNumber: '1234567890'
                routingNumber: '021000021'
                bankName: Chase Bank
                reference: UMA-Q12345-REF
              instructionsNotes: Include reference UMA-Q12345-REF in memo
            - accountOrWalletInfo:
                accountType: SPARK_WALLET
                assetType: BTC
                address: >-
                  spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu
                invoice: >-
                  lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs
        transactionId:
          type: string
          description: The ID of the transaction created from this quote.
          example: Transaction:019542f5-b3e7-1d02-0000-000000000005
        counterpartyInformation:
          $ref: '#/components/schemas/CounterpartyInformation'
          description: >-
            Additional information about the counterparty, if available and
            required by the platform in their configuration.
        rateDetails:
          $ref: '#/components/schemas/OutgoingRateDetails'
          description: Details about the rate and fees for the transaction.
    AgentTransferDetails:
      type: object
      description: Details of a transfer-type agent action (TRANSFER_OUT or TRANSFER_IN).
      required:
        - amount
        - currency
        - sourceAccountId
        - destinationAccountId
      properties:
        amount:
          type: integer
          format: int64
          description: Transfer amount in the smallest unit of the specified currency.
          example: 50000
        currency:
          type: string
          description: ISO 4217 currency code for the transfer amount.
          example: USD
        sourceAccountId:
          type: string
          description: ID of the source account (internal or external).
          example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
        destinationAccountId:
          type: string
          description: ID of the destination account (internal or external).
          example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
    TransactionOneOf:
      oneOf:
        - $ref: '#/components/schemas/IncomingTransaction'
        - $ref: '#/components/schemas/OutgoingTransaction'
      discriminator:
        propertyName: type
        mapping:
          INCOMING:
            $ref: '#/components/schemas/IncomingTransaction'
          OUTGOING:
            $ref: '#/components/schemas/OutgoingTransaction'
    QuoteSourceOneOf:
      oneOf:
        - $ref: '#/components/schemas/AccountQuoteSource'
        - $ref: '#/components/schemas/RealtimeFundingQuoteSource'
      discriminator:
        propertyName: sourceType
        mapping:
          ACCOUNT:
            $ref: '#/components/schemas/AccountQuoteSource'
          REALTIME_FUNDING:
            $ref: '#/components/schemas/RealtimeFundingQuoteSource'
    QuoteDestinationOneOf:
      oneOf:
        - $ref: '#/components/schemas/AccountDestination'
        - $ref: '#/components/schemas/UmaAddressDestination'
      discriminator:
        propertyName: destinationType
        mapping:
          ACCOUNT:
            $ref: '#/components/schemas/AccountDestination'
          UMA_ADDRESS:
            $ref: '#/components/schemas/UmaAddressDestination'
    Currency:
      type: object
      properties:
        code:
          type: string
          description: >-
            Three-letter currency code (ISO 4217) for fiat currencies. Some
            cryptocurrencies may use their own ticker symbols (e.g. "BTC" for
            Bitcoin, "USDC" for USDC, etc.)
          example: USD
        name:
          type: string
          description: Full name of the currency
          example: United States Dollar
        symbol:
          type: string
          description: Symbol of the currency
          example: $
        decimals:
          type: integer
          description: Number of decimal places for the currency
          minimum: 0
          example: 2
    PaymentInstructions:
      type: object
      required:
        - accountOrWalletInfo
      properties:
        instructionsNotes:
          type: string
          description: Additional human-readable instructions for making the payment
          example: >-
            Please ensure the reference code is included in the payment
            memo/description field
        isPlatformAccount:
          type: boolean
          description: >-
            Indicates whether the account is a platform account or a customer
            account.
          example: true
        accountOrWalletInfo:
          oneOf:
            - $ref: '#/components/schemas/PaymentUsdAccountInfo'
            - $ref: '#/components/schemas/PaymentBrlAccountInfo'
            - $ref: '#/components/schemas/PaymentMxnAccountInfo'
            - $ref: '#/components/schemas/PaymentDkkAccountInfo'
            - $ref: '#/components/schemas/PaymentEurAccountInfo'
            - $ref: '#/components/schemas/PaymentInrAccountInfo'
            - $ref: '#/components/schemas/PaymentNgnAccountInfo'
            - $ref: '#/components/schemas/PaymentCadAccountInfo'
            - $ref: '#/components/schemas/PaymentGbpAccountInfo'
            - $ref: '#/components/schemas/PaymentHkdAccountInfo'
            - $ref: '#/components/schemas/PaymentIdrAccountInfo'
            - $ref: '#/components/schemas/PaymentMyrAccountInfo'
            - $ref: '#/components/schemas/PaymentPhpAccountInfo'
            - $ref: '#/components/schemas/PaymentSgdAccountInfo'
            - $ref: '#/components/schemas/PaymentThbAccountInfo'
            - $ref: '#/components/schemas/PaymentVndAccountInfo'
            - $ref: '#/components/schemas/PaymentAedAccountInfo'
            - $ref: '#/components/schemas/PaymentKesAccountInfo'
            - $ref: '#/components/schemas/PaymentMwkAccountInfo'
            - $ref: '#/components/schemas/PaymentRwfAccountInfo'
            - $ref: '#/components/schemas/PaymentTzsAccountInfo'
            - $ref: '#/components/schemas/PaymentUgxAccountInfo'
            - $ref: '#/components/schemas/PaymentXofAccountInfo'
            - $ref: '#/components/schemas/PaymentZarAccountInfo'
            - $ref: '#/components/schemas/PaymentZmwAccountInfo'
            - $ref: '#/components/schemas/PaymentBwpAccountInfo'
            - $ref: '#/components/schemas/PaymentXafAccountInfo'
            - $ref: '#/components/schemas/PaymentBdtAccountInfo'
            - $ref: '#/components/schemas/PaymentArsAccountInfo'
            - $ref: '#/components/schemas/PaymentCopAccountInfo'
            - $ref: '#/components/schemas/PaymentEgpAccountInfo'
            - $ref: '#/components/schemas/PaymentGhsAccountInfo'
            - $ref: '#/components/schemas/PaymentGtqAccountInfo'
            - $ref: '#/components/schemas/PaymentHtgAccountInfo'
            - $ref: '#/components/schemas/PaymentJmdAccountInfo'
            - $ref: '#/components/schemas/PaymentPkrAccountInfo'
            - $ref: '#/components/schemas/PaymentSlvAccountInfo'
            - $ref: '#/components/schemas/PaymentSwiftAccountInfo'
            - $ref: '#/components/schemas/PaymentCnyAccountInfo'
            - $ref: '#/components/schemas/PaymentSparkWalletInfo'
            - $ref: '#/components/schemas/PaymentLightningInvoiceInfo'
            - $ref: '#/components/schemas/PaymentSolanaWalletInfo'
            - $ref: '#/components/schemas/PaymentTronWalletInfo'
            - $ref: '#/components/schemas/PaymentPolygonWalletInfo'
            - $ref: '#/components/schemas/PaymentBaseWalletInfo'
            - $ref: '#/components/schemas/PaymentEthereumWalletInfo'
            - $ref: '#/components/schemas/PaymentEmbeddedWalletInfo'
          discriminator:
            propertyName: accountType
            mapping:
              USD_ACCOUNT:
                $ref: '#/components/schemas/PaymentUsdAccountInfo'
              BRL_ACCOUNT:
                $ref: '#/components/schemas/PaymentBrlAccountInfo'
              MXN_ACCOUNT:
                $ref: '#/components/schemas/PaymentMxnAccountInfo'
              DKK_ACCOUNT:
                $ref: '#/components/schemas/PaymentDkkAccountInfo'
              EUR_ACCOUNT:
                $ref: '#/components/schemas/PaymentEurAccountInfo'
              INR_ACCOUNT:
                $ref: '#/components/schemas/PaymentInrAccountInfo'
              NGN_ACCOUNT:
                $ref: '#/components/schemas/PaymentNgnAccountInfo'
              CAD_ACCOUNT:
                $ref: '#/components/schemas/PaymentCadAccountInfo'
              GBP_ACCOUNT:
                $ref: '#/components/schemas/PaymentGbpAccountInfo'
              HKD_ACCOUNT:
                $ref: '#/components/schemas/PaymentHkdAccountInfo'
              IDR_ACCOUNT:
                $ref: '#/components/schemas/PaymentIdrAccountInfo'
              MYR_ACCOUNT:
                $ref: '#/components/schemas/PaymentMyrAccountInfo'
              PHP_ACCOUNT:
                $ref: '#/components/schemas/PaymentPhpAccountInfo'
              SGD_ACCOUNT:
                $ref: '#/components/schemas/PaymentSgdAccountInfo'
              THB_ACCOUNT:
                $ref: '#/components/schemas/PaymentThbAccountInfo'
              VND_ACCOUNT:
                $ref: '#/components/schemas/PaymentVndAccountInfo'
              SPARK_WALLET:
                $ref: '#/components/schemas/PaymentSparkWalletInfo'
              LIGHTNING:
                $ref: '#/components/schemas/PaymentLightningInvoiceInfo'
              SOLANA_WALLET:
                $ref: '#/components/schemas/PaymentSolanaWalletInfo'
              TRON_WALLET:
                $ref: '#/components/schemas/PaymentTronWalletInfo'
              POLYGON_WALLET:
                $ref: '#/components/schemas/PaymentPolygonWalletInfo'
              BASE_WALLET:
                $ref: '#/components/schemas/PaymentBaseWalletInfo'
              ETHEREUM_WALLET:
                $ref: '#/components/schemas/PaymentEthereumWalletInfo'
              AED_ACCOUNT:
                $ref: '#/components/schemas/PaymentAedAccountInfo'
              KES_ACCOUNT:
                $ref: '#/components/schemas/PaymentKesAccountInfo'
              MWK_ACCOUNT:
                $ref: '#/components/schemas/PaymentMwkAccountInfo'
              RWF_ACCOUNT:
                $ref: '#/components/schemas/PaymentRwfAccountInfo'
              TZS_ACCOUNT:
                $ref: '#/components/schemas/PaymentTzsAccountInfo'
              UGX_ACCOUNT:
                $ref: '#/components/schemas/PaymentUgxAccountInfo'
              XOF_ACCOUNT:
                $ref: '#/components/schemas/PaymentXofAccountInfo'
              ZAR_ACCOUNT:
                $ref: '#/components/schemas/PaymentZarAccountInfo'
              ZMW_ACCOUNT:
                $ref: '#/components/schemas/PaymentZmwAccountInfo'
              BWP_ACCOUNT:
                $ref: '#/components/schemas/PaymentBwpAccountInfo'
              XAF_ACCOUNT:
                $ref: '#/components/schemas/PaymentXafAccountInfo'
              BDT_ACCOUNT:
                $ref: '#/components/schemas/PaymentBdtAccountInfo'
              ARS_ACCOUNT:
                $ref: '#/components/schemas/PaymentArsAccountInfo'
              COP_ACCOUNT:
                $ref: '#/components/schemas/PaymentCopAccountInfo'
              EGP_ACCOUNT:
                $ref: '#/components/schemas/PaymentEgpAccountInfo'
              GHS_ACCOUNT:
                $ref: '#/components/schemas/PaymentGhsAccountInfo'
              GTQ_ACCOUNT:
                $ref: '#/components/schemas/PaymentGtqAccountInfo'
              HTG_ACCOUNT:
                $ref: '#/components/schemas/PaymentHtgAccountInfo'
              JMD_ACCOUNT:
                $ref: '#/components/schemas/PaymentJmdAccountInfo'
              PKR_ACCOUNT:
                $ref: '#/components/schemas/PaymentPkrAccountInfo'
              SLV_ACCOUNT:
                $ref: '#/components/schemas/PaymentSlvAccountInfo'
              EMBEDDED_WALLET:
                $ref: '#/components/schemas/PaymentEmbeddedWalletInfo'
              SWIFT_ACCOUNT:
                $ref: '#/components/schemas/PaymentSwiftAccountInfo'
              CNY_ACCOUNT:
                $ref: '#/components/schemas/PaymentCnyAccountInfo'
    CounterpartyInformation:
      type: object
      description: >-
        Additional information about the counterparty, if available and relevant
        to the transaction and platform.
      additionalProperties: true
      example:
        FULL_NAME: John Sender
        BIRTH_DATE: '1985-06-15'
        NATIONALITY: DE
    OutgoingRateDetails:
      description: >-
        Details about the rate and fees for an outgoing transaction or quote.
        Note: `counterpartyFixedFee` is denominated in the receiving currency,
        so its equivalent value in the sending currency fluctuates with the FX
        rate. As a result, the total fee on a subsequent quote for the same
        transfer may differ even if the underlying fee structure is unchanged.
      type: object
      required:
        - counterpartyMultiplier
        - counterpartyFixedFee
        - gridApiMultiplier
        - gridApiFixedFee
        - gridApiVariableFeeRate
        - gridApiVariableFeeAmount
      properties:
        counterpartyMultiplier:
          type: number
          format: double
          description: >-
            The underlying multiplier from mSATs to the receiving currency as
            returned by the counterparty institution.
          exclusiveMinimum: 0
          example: 1.08
        counterpartyFixedFee:
          type: integer
          format: int64
          description: >-
            The fixed fee charged by the counterparty institution to execute the
            quote in the smallest unit of the receiving currency (eg. cents).
          minimum: 0
          example: 10
        gridApiMultiplier:
          type: number
          format: double
          description: >-
            The underlying multiplier from the sending currency to mSATS,
            including variable fees.
          exclusiveMinimum: 0
          example: 0.925
        gridApiFixedFee:
          type: integer
          format: int64
          description: >-
            The fixed fee charged by the Grid product to execute the quote in
            the smallest unit of the sending currency (eg. cents).
          minimum: 0
          example: 10
        gridApiVariableFeeRate:
          type: number
          format: double
          description: >-
            The variable fee rate charged by the Grid product to execute the
            quote as a percentage of the sending currency amount.
          minimum: 0
          example: 0.003
        gridApiVariableFeeAmount:
          type: number
          format: int64
          description: >-
            The variable fee amount charged by the Grid product to execute the
            quote in the smallest unit of the sending currency (eg. cents). This
            is the sending amount times gridApiVariableFeeRate.
          minimum: 0
          example: 30
    IncomingTransaction:
      title: Incoming Transaction
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          required:
            - type
            - receivedAmount
          properties:
            type:
              type: string
              enum:
                - INCOMING
            source:
              $ref: '#/components/schemas/TransactionSourceOneOf'
            receivedAmount:
              $ref: '#/components/schemas/CurrencyAmount'
              description: Amount received in the recipient's currency
            fees:
              type: integer
              format: int64
              description: >-
                The total fees available from the receive quote in the smallest
                unit of the receiving currency (eg. cents).
              minimum: 0
              example: 10
            reconciliationInstructions:
              $ref: '#/components/schemas/ReconciliationInstructions'
              description: Included for all transactions except those with "CREATED" status
            rateDetails:
              $ref: '#/components/schemas/IncomingRateDetails'
              description: Details about the rate and fees for the transaction.
            failureReason:
              $ref: '#/components/schemas/IncomingTransactionFailureReason'
              description: >-
                If the transaction failed, this field provides the reason for
                failure.
    OutgoingTransaction:
      title: Outgoing Transaction
      allOf:
        - $ref: '#/components/schemas/Transaction'
        - type: object
          required:
            - type
            - sentAmount
            - source
          properties:
            status:
              $ref: '#/components/schemas/OutgoingTransactionStatus'
            type:
              type: string
              enum:
                - OUTGOING
            source:
              $ref: '#/components/schemas/TransactionSourceOneOf'
            sentAmount:
              $ref: '#/components/schemas/CurrencyAmount'
              description: Amount sent in the sender's currency
            receivedAmount:
              $ref: '#/components/schemas/CurrencyAmount'
              description: Amount to be received by recipient in the recipient's currency
            exchangeRate:
              type: number
              description: Number of sending currency units per receiving currency unit.
              exclusiveMinimum: 0
              example: 1.08
            fees:
              type: integer
              format: int64
              description: >-
                The fees associated with the quote in the smallest unit of the
                sending currency (eg. cents).
              minimum: 0
              example: 10
            reconciliationInstructions:
              $ref: '#/components/schemas/ReconciliationInstructions'
              description: >-
                Reconciliation details for this transaction, including crypto
                transaction hash when available.
            quoteId:
              type: string
              description: The ID of the quote that was used to trigger this payment
              example: Quote:019542f5-b3e7-1d02-0000-000000000006
            paymentInstructions:
              type: array
              description: Payment instructions for executing the payment.
              items:
                $ref: '#/components/schemas/PaymentInstructions'
              example:
                - accountOrWalletInfo:
                    accountType: USD_ACCOUNT
                    paymentRails:
                      - ACH
                      - WIRE
                    accountNumber: '1234567890'
                    routingNumber: '021000021'
                    bankName: Chase Bank
                    reference: UMA-Q12345-REF
                  instructionsNotes: Include reference UMA-Q12345-REF in memo
                - accountOrWalletInfo:
                    accountType: SPARK_WALLET
                    assetType: BTC
                    address: >-
                      spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu
                    invoice: >-
                      lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs
            refund:
              $ref: '#/components/schemas/Refund'
              description: The refund if transaction was refunded.
            rateDetails:
              $ref: '#/components/schemas/OutgoingRateDetails'
              description: Details about the rate and fees for the transaction.
            failureReason:
              $ref: '#/components/schemas/OutgoingTransactionFailureReason'
              description: >-
                If the transaction failed, this field provides the reason for
                failure.
    AccountQuoteSource:
      title: Account
      allOf:
        - $ref: '#/components/schemas/BaseQuoteSource'
        - type: object
          required:
            - accountId
            - sourceType
          properties:
            sourceType:
              type: string
              enum:
                - ACCOUNT
            accountId:
              type: string
              description: Source account identifier
              example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
            customerId:
              type: string
              description: >-
                Required when funding from an FBO account to identify the
                customer on whose behalf the transaction is being initiated. 
                Otherwise, will default to the customerId of the account owner.
              example: Customer:019542f5-b3e7-1d02-0000-000000000001
          description: Source account details
    RealtimeFundingQuoteSource:
      title: Real-time Funding
      allOf:
        - $ref: '#/components/schemas/BaseQuoteSource'
        - type: object
          required:
            - currency
            - sourceType
          properties:
            sourceType:
              type: string
              enum:
                - REALTIME_FUNDING
            customerId:
              type: string
              description: >-
                Source customer ID. If this transaction is being initiated on
                behalf of a customer, this is required. If customerId is not
                provided, the quote will be created on behalf of the platform
                itself.
              example: Customer:019542f5-b3e7-1d02-0000-000000000009
            currency:
              type: string
              description: >-
                Currency code for the funding source. See [Supported
                Currencies](https://docs.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
                for the full list of supported fiat and crypto currencies.
              example: USD
            cryptoNetwork:
              type: string
              description: >-
                The crypto network to use for the funding source. Required when
                `currency` is a stablecoin (e.g. USDC, USDT). Specifies which
                network the customer will deposit on, so the correct deposit
                address can be generated. Example values: `SOLANA`, `ETHEREUM`,
                `BASE`, `POLYGON`, `SPARK`, `LIGHTNING`, `BITCOIN`.
              example: SOLANA
          description: >-
            Fund the quote using a real-time funding source (RTP, SEPA Instant,
            Spark, Stables, etc.). This will require manual just-in-time funding
            using `paymentInstructions` in the response. Because quotes expire
            quickly, this option is only valid for instant payment methods. Do
            not try to fund a quote with a non-instant payment method (ACH,
            etc.).
    AccountDestination:
      title: Account
      allOf:
        - $ref: '#/components/schemas/BaseDestination'
        - type: object
          required:
            - accountId
            - destinationType
          properties:
            destinationType:
              type: string
              enum:
                - ACCOUNT
            accountId:
              type: string
              description: Destination account identifier
              example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
            paymentRail:
              allOf:
                - $ref: '#/components/schemas/PaymentRail'
                - description: >-
                    The payment rail to use for the transfer. Must be one of the
                    rails supported by the destination account. If not
                    specified, the system will select a default rail.
          description: Destination account details
    UmaAddressDestination:
      title: UMA Address
      allOf:
        - $ref: '#/components/schemas/BaseDestination'
        - type: object
          required:
            - umaAddress
            - destinationType
          properties:
            destinationType:
              type: string
              enum:
                - UMA_ADDRESS
            umaAddress:
              type: string
              description: UMA address of the recipient
              example: $receiver@uma.domain.com
            currency:
              type: string
              description: >-
                Currency code for the destination. See [Supported
                Currencies](https://docs.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
                for the full list of supported fiat and crypto currencies.
              example: EUR
          description: UMA address destination details
    PaymentUsdAccountInfo:
      title: USD Bank Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/UsdAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentBrlAccountInfo:
      title: BRL Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - type: object
          required:
            - qrCode
          properties:
            accountType:
              type: string
              enum:
                - BRL_ACCOUNT
            qrCode:
              type: string
              description: >-
                A PIX QR code payload that can be used to fund the transaction.
                This can be rendered as a QR code image or pasted into a
                PIX-compatible banking app.
              minLength: 1
    PaymentMxnAccountInfo:
      title: MXN Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/MxnAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentDkkAccountInfo:
      title: DKK Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/DkkAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentEurAccountInfo:
      title: EUR Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/EurAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentInrAccountInfo:
      title: INR Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/InrAccountInfo'
    PaymentNgnAccountInfo:
      title: NGN Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/NgnAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentCadAccountInfo:
      title: CAD Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/CadAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentGbpAccountInfo:
      title: GBP Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/GbpAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentHkdAccountInfo:
      title: HKD Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/HkdAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentIdrAccountInfo:
      title: IDR Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/IdrAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentMyrAccountInfo:
      title: MYR Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/MyrAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentPhpAccountInfo:
      title: PHP Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/PhpAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentSgdAccountInfo:
      title: SGD Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/SgdAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentThbAccountInfo:
      title: THB Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/ThbAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentVndAccountInfo:
      title: VND Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/VndAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentAedAccountInfo:
      title: AED Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/AedAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentKesAccountInfo:
      title: KES Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/KesAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentMwkAccountInfo:
      title: MWK Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/MwkAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentRwfAccountInfo:
      title: RWF Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/RwfAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentTzsAccountInfo:
      title: TZS Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/TzsAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentUgxAccountInfo:
      title: UGX Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/UgxAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentXofAccountInfo:
      title: XOF Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/XofAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentZarAccountInfo:
      title: ZAR Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/ZarAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentZmwAccountInfo:
      title: ZMW Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/ZmwAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentBwpAccountInfo:
      title: BWP Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/BwpAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentXafAccountInfo:
      title: XAF Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/XafAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentBdtAccountInfo:
      title: BDT Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/BdtAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentArsAccountInfo:
      title: ARS Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - type: object
          required:
            - accountNumber
          properties:
            accountType:
              type: string
              enum:
                - ARS_ACCOUNT
            accountNumber:
              type: string
              description: >-
                The static CVU (Clave Virtual Uniforme) bank account number to
                pay to.
              minLength: 22
              maxLength: 22
              pattern: ^\d{22}$
              example: '0000003100074052501434'
    PaymentCopAccountInfo:
      title: COP Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - type: object
          required:
            - paymentUrl
          properties:
            accountType:
              type: string
              enum:
                - COP_ACCOUNT
            paymentUrl:
              type: string
              format: uri
              description: A payment URL where the customer can complete their COP deposit.
              example: https://payments.example.com/t/abc123
    PaymentEgpAccountInfo:
      title: EGP Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/EgpAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentGhsAccountInfo:
      title: GHS Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/GhsAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentGtqAccountInfo:
      title: GTQ Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/GtqAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentHtgAccountInfo:
      title: HTG Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/HtgAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentJmdAccountInfo:
      title: JMD Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/JmdAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentPkrAccountInfo:
      title: PKR Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/PkrAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentSlvAccountInfo:
      title: SLV Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/SlvAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentSwiftAccountInfo:
      title: SWIFT Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/SwiftAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentCnyAccountInfo:
      title: CNY Account
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/CnyAccountInfo'
        - type: object
          required:
            - reference
          properties:
            reference:
              type: string
              description: >-
                Unique reference code that must be included with the payment to
                properly credit it
              example: UMA-Q12345-REF
    PaymentSparkWalletInfo:
      title: Spark Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/SparkWalletInfo'
        - type: object
          required:
            - assetType
          properties:
            assetType:
              type: string
              description: Type of asset
              enum:
                - BTC
                - USDB
            invoice:
              type: string
              description: Invoice for the payment
              example: >-
                sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s
    PaymentLightningInvoiceInfo:
      title: Lightning Invoice
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - type: object
          required:
            - invoice
          properties:
            accountType:
              type: string
              enum:
                - LIGHTNING
            invoice:
              type: string
              description: Invoice for the payment
              example: >-
                lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs
    PaymentSolanaWalletInfo:
      title: Solana Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/SolanaWalletInfo'
        - type: object
          properties:
            assetType:
              type: string
              description: Type of asset
              enum:
                - USDC
                - USDT
    PaymentTronWalletInfo:
      title: Tron Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/TronWalletInfo'
        - type: object
          properties:
            assetType:
              type: string
              description: Type of asset
              enum:
                - USDT
    PaymentPolygonWalletInfo:
      title: Polygon Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/PolygonWalletInfo'
        - type: object
          properties:
            assetType:
              type: string
              description: Type of asset
              enum:
                - USDC
    PaymentBaseWalletInfo:
      title: Base Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/BaseWalletInfo'
        - type: object
          properties:
            assetType:
              type: string
              description: Type of asset
              enum:
                - USDC
    PaymentEthereumWalletInfo:
      title: Ethereum Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - $ref: '#/components/schemas/EthereumWalletInfo'
        - type: object
          properties:
            assetType:
              type: string
              description: Type of asset
              enum:
                - USDC
    PaymentEmbeddedWalletInfo:
      title: Embedded Wallet
      allOf:
        - $ref: '#/components/schemas/BasePaymentAccountInfo'
        - type: object
          required:
            - accountType
            - payloadToSign
          properties:
            accountType:
              type: string
              enum:
                - EMBEDDED_WALLET
              description: >-
                Discriminator value identifying this as Embedded Wallet payment
                instructions.
            payloadToSign:
              type: string
              description: >-
                JSON-encoded transaction signing payload that must be stamped,
                as-is (byte-for-byte, without re-serialization), with the
                session private key of a verified authentication credential on
                the source Embedded Wallet. The resulting Turnkey API-key stamp
                is passed as the `Grid-Wallet-Signature` header on `POST
                /quotes/{quoteId}/execute` to authorize the outbound transfer
                from the wallet.
              example: >-
                {"type":"ACTIVITY_TYPE_SIGN_TRANSACTION_V2","timestampMs":"1746736509954","organizationId":"org_abc123","parameters":{"signWith":"wallet_abc123def456","unsignedTransaction":"ea69b4bf05f775209f26ff0a34a05569180f7936579d5c4af9377ae550194f72","type":"TRANSACTION_TYPE_ETHEREUM"},"generateAppProofs":true}
    Transaction:
      type: object
      required:
        - id
        - status
        - type
        - destination
        - customerId
        - platformCustomerId
      properties:
        id:
          type: string
          description: Unique identifier for the transaction
          example: Transaction:019542f5-b3e7-1d02-0000-000000000004
        status:
          $ref: '#/components/schemas/TransactionStatus'
        type:
          $ref: '#/components/schemas/TransactionType'
        destination:
          $ref: '#/components/schemas/TransactionDestinationOneOf'
        customerId:
          type: string
          description: >-
            System ID of the customer (sender for outgoing, recipient for
            incoming)
          example: Customer:019542f5-b3e7-1d02-0000-000000000001
        platformCustomerId:
          type: string
          description: >-
            Platform-specific ID of the customer (sender for outgoing, recipient
            for incoming)
          example: 18d3e5f7b4a9c2
        settledAt:
          type: string
          format: date-time
          description: When the payment was or will be settled
          example: '2025-08-15T14:30:00Z'
        createdAt:
          type: string
          format: date-time
          description: When the transaction was created
          example: '2025-08-15T14:25:18Z'
        updatedAt:
          type: string
          format: date-time
          description: When the transaction was last updated
          example: '2025-08-15T14:30:00Z'
        receiptDeliveryConfirmedAt:
          type: string
          format: date-time
          description: >-
            The time at which the platform confirmed delivery of the receipt to
            their customer.
          example: '2025-08-15T14:31:00Z'
        agentId:
          type: string
          description: >-
            If this transaction was initiated by an agent, the system-generated
            ID of that agent. Absent for platform-initiated transactions.
          example: Agent:019542f5-b3e7-1d02-0000-000000000042
        description:
          type: string
          description: Optional memo or description for the payment
          example: 'Payment for invoice #1234'
        counterpartyInformation:
          $ref: '#/components/schemas/CounterpartyInformation'
    TransactionSourceOneOf:
      oneOf:
        - $ref: '#/components/schemas/AccountTransactionSource'
        - $ref: '#/components/schemas/UmaAddressTransactionSource'
        - $ref: '#/components/schemas/RealtimeFundingTransactionSource'
      discriminator:
        propertyName: sourceType
        mapping:
          ACCOUNT:
            $ref: '#/components/schemas/AccountTransactionSource'
          UMA_ADDRESS:
            $ref: '#/components/schemas/UmaAddressTransactionSource'
          REALTIME_FUNDING:
            $ref: '#/components/schemas/RealtimeFundingTransactionSource'
    CurrencyAmount:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            Amount in the smallest unit of the currency (e.g., cents for
            USD/EUR, satoshis for BTC)
          example: 12550
        currency:
          $ref: '#/components/schemas/Currency'
    ReconciliationInstructions:
      type: object
      minProperties: 1
      properties:
        reference:
          type: string
          description: >-
            Unique reference code to include with the payment to match it with
            the correct incoming transaction, when available.
          example: UMA-Q12345-REF
        transactionHash:
          type: string
          description: >-
            Transaction hash for the crypto transfer that delivered funds to the
            transaction destination, when available.
          example: '0x9f2c6b6f4b6c8f2a8d9e0b1c2d3e4f5061728394a5b6c7d8e9f00112233445566'
    IncomingRateDetails:
      description: >-
        Details about the rate and fees for an incoming transaction. Note:
        `gridApiFixedFee` is denominated in the receiving currency, so its
        equivalent value in the sending currency fluctuates with the FX rate. As
        a result, the total fee on a subsequent quote for the same transfer may
        differ even if the underlying fee structure is unchanged.
      type: object
      required:
        - gridApiMultiplier
        - gridApiFixedFee
        - gridApiVariableFeeRate
        - gridApiVariableFeeAmount
      properties:
        gridApiMultiplier:
          type: number
          format: double
          description: >-
            The underlying multiplier from the mSATS to the receiving currency,
            including variable fees.
          exclusiveMinimum: 0
          example: 0.925
        gridApiFixedFee:
          type: integer
          format: int64
          description: >-
            The fixed fee charged by the Grid product to execute the quote in
            the smallest unit of the receiving currency (eg. cents).
          minimum: 0
          example: 10
        gridApiVariableFeeRate:
          type: number
          format: double
          description: >-
            The variable fee rate charged by the Grid product to execute the
            quote as a percentage of the receiving currency amount.
          minimum: 0
          example: 0.003
        gridApiVariableFeeAmount:
          type: number
          format: int64
          description: >-
            The variable fee amount charged by the Grid product to execute the
            quote in the smallest unit of the receiving currency (eg. cents).
            This is the receiving amount times gridApiVariableFeeRate.
          minimum: 0
          example: 30
    IncomingTransactionFailureReason:
      type: string
      enum:
        - LNURLP_FAILED
        - PAY_REQUEST_FAILED
        - PAYMENT_APPROVAL_WEBHOOK_ERROR
        - PAYMENT_APPROVAL_TIMED_OUT
        - OFFRAMP_FAILED
        - MISSING_MANDATORY_PAYEE_DATA
        - QUOTE_EXPIRED
        - QUOTE_EXECUTION_FAILED
      description: >-
        Reason for failure of an incoming transaction. This is used to provide
        more context on why a transaction failed. If the transaction is not in a
        failed state, this field is omitted.
    OutgoingTransactionStatus:
      type: string
      enum:
        - PENDING
        - EXPIRED
        - PROCESSING
        - COMPLETED
        - FAILED
      description: |
        Status of an outgoing payment transaction.

        | Status | Description |
        |--------|-------------|
        | `PENDING` | Quote is pending confirmation |
        | `EXPIRED` | Quote wasn't executed before expiry window |
        | `PROCESSING` | Executing the quote after receiving funds |
        | `COMPLETED` | Payout successfully reached the destination |
        | `FAILED` | Something went wrong — accompanied by a `failureReason` |
    Refund:
      type: object
      required:
        - reference
        - initiatedAt
        - status
      properties:
        reference:
          type: string
          description: The unique reference ID of the refund
          example: UMA-Q12345-REFUND
        initiatedAt:
          type: string
          format: date-time
          description: When the refund was initiated
          example: '2025-08-15T14:30:00Z'
        settledAt:
          type: string
          format: date-time
          description: When the refund was settled
          example: '2025-08-15T14:35:00Z'
        status:
          type: string
          enum:
            - PENDING
            - COMPLETED
            - FAILED
          description: Current status of the refund
          example: COMPLETED
        reason:
          type: string
          enum:
            - TRANSACTION_FAILED
            - USER_CANCELLATION
            - TIMEOUT
          description: Reason for the refund
          example: TRANSACTION_FAILED
    OutgoingTransactionFailureReason:
      type: string
      enum:
        - QUOTE_EXPIRED
        - QUOTE_EXECUTION_FAILED
        - LIGHTNING_PAYMENT_FAILED
        - FUNDING_AMOUNT_MISMATCH
        - COUNTERPARTY_POST_TX_FAILED
      description: >-
        Reason for failure of an outgoing transaction. This is used to provide
        more context on why a transaction failed. If the transaction is not in a
        failed state, this field is omitted.
    BaseQuoteSource:
      type: object
      required:
        - sourceType
      properties:
        sourceType:
          $ref: '#/components/schemas/QuoteSourceType'
    BaseDestination:
      type: object
      required:
        - destinationType
      properties:
        destinationType:
          $ref: '#/components/schemas/DestinationType'
    PaymentRail:
      type: string
      enum:
        - ACH
        - BANK_TRANSFER
        - FAST
        - FASTER_PAYMENTS
        - FEDNOW
        - MOBILE_MONEY
        - PAYNOW
        - PIX
        - RTP
        - SEPA
        - SEPA_INSTANT
        - SPEI
        - SWIFT
        - UPI
        - WIRE
      description: >-
        The payment rail used for the transfer. Payment rails represent the
        underlying payment network or system used to move funds between
        accounts.
      example: ACH
    BasePaymentAccountInfo:
      type: object
      required:
        - accountType
      properties:
        accountType:
          $ref: '#/components/schemas/PaymentAccountType'
    UsdAccountInfo:
      allOf:
        - $ref: '#/components/schemas/UsdAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - ACH
                  - WIRE
                  - RTP
                  - FEDNOW
    MxnAccountInfo:
      allOf:
        - $ref: '#/components/schemas/MxnAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - SPEI
    DkkAccountInfo:
      allOf:
        - $ref: '#/components/schemas/DkkAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - SEPA
                  - SEPA_INSTANT
    EurAccountInfo:
      allOf:
        - $ref: '#/components/schemas/EurAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - SEPA
                  - SEPA_INSTANT
    InrAccountInfo:
      allOf:
        - $ref: '#/components/schemas/InrAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - UPI
    NgnAccountInfo:
      allOf:
        - $ref: '#/components/schemas/NgnAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    CadAccountInfo:
      allOf:
        - $ref: '#/components/schemas/CadAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    GbpAccountInfo:
      allOf:
        - $ref: '#/components/schemas/GbpAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - FASTER_PAYMENTS
    HkdAccountInfo:
      allOf:
        - $ref: '#/components/schemas/HkdAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    IdrAccountInfo:
      allOf:
        - $ref: '#/components/schemas/IdrAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    MyrAccountInfo:
      allOf:
        - $ref: '#/components/schemas/MyrAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    PhpAccountInfo:
      allOf:
        - $ref: '#/components/schemas/PhpAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    SgdAccountInfo:
      allOf:
        - $ref: '#/components/schemas/SgdAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - PAYNOW
                  - FAST
                  - BANK_TRANSFER
    ThbAccountInfo:
      allOf:
        - $ref: '#/components/schemas/ThbAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    VndAccountInfo:
      allOf:
        - $ref: '#/components/schemas/VndAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    AedAccountInfo:
      allOf:
        - $ref: '#/components/schemas/AedAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    KesAccountInfo:
      allOf:
        - $ref: '#/components/schemas/KesAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    MwkAccountInfo:
      allOf:
        - $ref: '#/components/schemas/MwkAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    RwfAccountInfo:
      allOf:
        - $ref: '#/components/schemas/RwfAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    TzsAccountInfo:
      allOf:
        - $ref: '#/components/schemas/TzsAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    UgxAccountInfo:
      allOf:
        - $ref: '#/components/schemas/UgxAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    XofAccountInfo:
      allOf:
        - $ref: '#/components/schemas/XofAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    ZarAccountInfo:
      allOf:
        - $ref: '#/components/schemas/ZarAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    ZmwAccountInfo:
      allOf:
        - $ref: '#/components/schemas/ZmwAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    BwpAccountInfo:
      allOf:
        - $ref: '#/components/schemas/BwpAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    XafAccountInfo:
      allOf:
        - $ref: '#/components/schemas/XafAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    BdtAccountInfo:
      allOf:
        - $ref: '#/components/schemas/BdtAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
                  - MOBILE_MONEY
    EgpAccountInfo:
      allOf:
        - $ref: '#/components/schemas/EgpAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
                  - MOBILE_MONEY
    GhsAccountInfo:
      allOf:
        - $ref: '#/components/schemas/GhsAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
                  - MOBILE_MONEY
    GtqAccountInfo:
      allOf:
        - $ref: '#/components/schemas/GtqAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    HtgAccountInfo:
      allOf:
        - $ref: '#/components/schemas/HtgAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    JmdAccountInfo:
      allOf:
        - $ref: '#/components/schemas/JmdAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
    PkrAccountInfo:
      allOf:
        - $ref: '#/components/schemas/PkrAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
                  - MOBILE_MONEY
    SlvAccountInfo:
      allOf:
        - $ref: '#/components/schemas/SlvAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - BANK_TRANSFER
                  - MOBILE_MONEY
    SwiftAccountInfo:
      allOf:
        - $ref: '#/components/schemas/SwiftAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - SWIFT
    CnyAccountInfo:
      allOf:
        - $ref: '#/components/schemas/CnyAccountInfoBase'
        - type: object
          required:
            - paymentRails
          properties:
            paymentRails:
              type: array
              items:
                type: string
                enum:
                  - MOBILE_MONEY
    SparkWalletInfo:
      type: object
      required:
        - address
        - accountType
      properties:
        accountType:
          type: string
          enum:
            - SPARK_WALLET
        address:
          type: string
          description: Spark wallet address
          example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu
    SolanaWalletInfo:
      type: object
      required:
        - address
        - accountType
      properties:
        accountType:
          type: string
          enum:
            - SOLANA_WALLET
        address:
          type: string
          description: Solana wallet address
          example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg
    TronWalletInfo:
      type: object
      required:
        - address
        - accountType
      properties:
        accountType:
          type: string
          enum:
            - TRON_WALLET
        address:
          type: string
          description: Tron wallet address
          example: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
    PolygonWalletInfo:
      type: object
      required:
        - address
        - accountType
      properties:
        accountType:
          type: string
          enum:
            - POLYGON_WALLET
        address:
          type: string
          description: Polygon eth wallet address
          example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12'
    BaseWalletInfo:
      type: object
      required:
        - address
        - accountType
      properties:
        accountType:
          type: string
          enum:
            - BASE_WALLET
        address:
          type: string
          description: Base eth wallet address
          example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12'
    EthereumWalletInfo:
      type: object
      required:
        - address
        - accountType
      properties:
        accountType:
          type: string
          enum:
            - ETHEREUM_WALLET
        address:
          type: string
          description: Ethereum L1 wallet address
          example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12'
    TransactionStatus:
      type: string
      enum:
        - CREATED
        - PENDING
        - PROCESSING
        - COMPLETED
        - REJECTED
        - FAILED
        - REFUNDED
        - EXPIRED
      description: >
        Status of a payment transaction.


        | Status | Description |

        |--------|-------------|

        | `CREATED` | Initial lookup has been created |

        | `PENDING` | Quote has been created |

        | `PROCESSING` | Funding has been received and payment initiated |

        | `COMPLETED` | Cross border payment has been received, converted and
        payment has been sent to the offramp network |

        | `REJECTED` | Receiving institution or wallet rejected payment, payment
        has been refunded |

        | `FAILED` | An error occurred during payment |

        | `REFUNDED` | Payment was unable to complete and refunded |

        | `EXPIRED` | Quote has expired |
    TransactionType:
      type: string
      enum:
        - INCOMING
        - OUTGOING
      description: Type of transaction (incoming payment or outgoing payment)
    TransactionDestinationOneOf:
      oneOf:
        - $ref: '#/components/schemas/AccountTransactionDestination'
        - $ref: '#/components/schemas/UmaAddressTransactionDestination'
      discriminator:
        propertyName: destinationType
        mapping:
          ACCOUNT:
            $ref: '#/components/schemas/AccountTransactionDestination'
          UMA_ADDRESS:
            $ref: '#/components/schemas/UmaAddressTransactionDestination'
    AccountTransactionSource:
      title: Account Source
      allOf:
        - $ref: '#/components/schemas/BaseTransactionSource'
        - type: object
          required:
            - accountId
            - sourceType
          properties:
            sourceType:
              type: string
              enum:
                - ACCOUNT
            accountId:
              type: string
              description: Source account identifier
              example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
          description: Source account details
    UmaAddressTransactionSource:
      title: UMA Address Source
      allOf:
        - $ref: '#/components/schemas/BaseTransactionSource'
        - type: object
          required:
            - umaAddress
            - sourceType
          properties:
            sourceType:
              type: string
              enum:
                - UMA_ADDRESS
            umaAddress:
              type: string
              description: UMA address of the sender
              example: $sender@uma.domain.com
          description: UMA address source details
    RealtimeFundingTransactionSource:
      title: External Funding Source
      allOf:
        - $ref: '#/components/schemas/BaseTransactionSource'
        - type: object
          required:
            - currency
            - sourceType
          properties:
            sourceType:
              type: string
              enum:
                - REALTIME_FUNDING
            customerId:
              type: string
              description: The customer on whose behalf the transaction was initiated.
              example: Customer:019542f5-b3e7-1d02-0000-000000000009
            currency:
              type: string
              description: Currency code for the funding source
              example: USDC
            accountHolderName:
              type: string
              description: The name of the originator (sender) of the payment.
              example: John Sender
            accountIdentifier:
              type: string
              description: >-
                The originator's account number or IBAN. May be masked or
                partial depending on the rail.
              example: '****6789'
            bankName:
              type: string
              description: The name of the originating bank.
              example: Chase Bank
            bankIdentifier:
              type: string
              description: >-
                The identifier of the originating bank, such as a routing
                number, BIC, or SWIFT code.
              example: '021000021'
            paymentRail:
              description: The payment rail the funds arrived on.
              allOf:
                - $ref: '#/components/schemas/PaymentRail'
            remittanceInformation:
              type: string
              description: >-
                Free-form information about the payment provided by the
                originator. The source field depends on the payment rail: the
                Addenda record for ACH, the OBI / beneficiary information for
                wires, and the remittanceInformation field for RTP and FedNow.
              example: '12345'
            endToEndId:
              type: string
              description: The originator's own end-to-end reference for the payment.
              example: E2E-9f2c6b6f
            traceNumber:
              type: string
              description: >-
                Rail-level tracking identifier for the payment, such as an ACH
                trace number or a wire IMAD/OMAD, useful for reconciliation.
              example: '021000020123456'
          description: >-
            Transaction was funded using an external funding source. All
            originator fields are optional and populated on a best-effort basis
            depending on what the funding source provides.
    QuoteSourceType:
      type: string
      enum:
        - ACCOUNT
        - REALTIME_FUNDING
      description: Type of quote funding source
      example: ACCOUNT
    DestinationType:
      type: string
      enum:
        - ACCOUNT
        - UMA_ADDRESS
      description: Type of payment destination
      example: ACCOUNT
    PaymentAccountType:
      type: string
      enum:
        - USD_ACCOUNT
        - BRL_ACCOUNT
        - MXN_ACCOUNT
        - DKK_ACCOUNT
        - ARS_ACCOUNT
        - COP_ACCOUNT
        - EUR_ACCOUNT
        - INR_ACCOUNT
        - NGN_ACCOUNT
        - CAD_ACCOUNT
        - GBP_ACCOUNT
        - HKD_ACCOUNT
        - IDR_ACCOUNT
        - MYR_ACCOUNT
        - PHP_ACCOUNT
        - SGD_ACCOUNT
        - THB_ACCOUNT
        - VND_ACCOUNT
        - SPARK_WALLET
        - LIGHTNING
        - SOLANA_WALLET
        - TRON_WALLET
        - POLYGON_WALLET
        - BASE_WALLET
        - ETHEREUM_WALLET
        - EMBEDDED_WALLET
      description: Type of payment account or wallet
      example: USD_ACCOUNT
    UsdAccountInfoBase:
      type: object
      required:
        - accountType
        - accountNumber
        - routingNumber
      properties:
        accountType:
          type: string
          enum:
            - USD_ACCOUNT
        accountNumber:
          type: string
          description: The account number of the bank
          minLength: 1
          maxLength: 34
        routingNumber:
          type: string
          description: The ABA routing number
          example: '021000021'
          minLength: 9
          maxLength: 9
          pattern: ^[0-9]{9}$
      example:
        accountType: USD_ACCOUNT
        accountNumber: '1234567890'
        routingNumber: '021000021'
    MxnAccountInfoBase:
      type: object
      required:
        - accountType
        - clabeNumber
      properties:
        accountType:
          type: string
          enum:
            - MXN_ACCOUNT
        clabeNumber:
          type: string
          description: The CLABE number of the bank
          example: '123456789012345678'
          minLength: 18
          maxLength: 18
          pattern: ^[0-9]{18}$
      example:
        accountType: MXN_ACCOUNT
        clabeNumber: '123456789012345678'
    DkkAccountInfoBase:
      type: object
      required:
        - accountType
        - iban
      properties:
        accountType:
          type: string
          enum:
            - DKK_ACCOUNT
        iban:
          type: string
          description: Danish IBAN (18 characters, starting with DK)
          example: DK5000400040116243
          minLength: 18
          maxLength: 18
          pattern: ^DK[0-9]{16}$
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: DABADKKK
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: DKK_ACCOUNT
        iban: DK5000400040116243
        swiftCode: DABADKKK
    EurAccountInfoBase:
      type: object
      required:
        - accountType
        - iban
      properties:
        accountType:
          type: string
          enum:
            - EUR_ACCOUNT
        iban:
          type: string
          description: The IBAN of the bank account
          example: DE89370400440532013000
          minLength: 15
          maxLength: 34
          pattern: ^[A-Z]{2}[0-9]{2}[A-Za-z0-9]{11,30}$
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: DEUTDEFF
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: EUR_ACCOUNT
        iban: DE89370400440532013000
        swiftCode: DEUTDEFF
    InrAccountInfoBase:
      type: object
      required:
        - accountType
        - vpa
      properties:
        accountType:
          type: string
          enum:
            - INR_ACCOUNT
        vpa:
          type: string
          description: The UPI Virtual Payment Address
          example: user@upi
          minLength: 3
          maxLength: 255
          pattern: ^[a-zA-Z0-9.\-_]+@[a-zA-Z0-9]+$
      example:
        accountType: INR_ACCOUNT
        vpa: user@upi
    NgnAccountInfoBase:
      type: object
      required:
        - accountType
        - accountNumber
        - bankName
      properties:
        accountType:
          type: string
          enum:
            - NGN_ACCOUNT
        accountNumber:
          type: string
          description: Nigerian bank account number
          minLength: 10
          maxLength: 10
          example: '0123456789'
          pattern: ^[0-9]{10}$
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
      example:
        accountType: NGN_ACCOUNT
        accountNumber: '0123456789'
        bankName: Example Bank
    CadAccountInfoBase:
      type: object
      required:
        - accountType
        - bankCode
        - branchCode
        - accountNumber
      properties:
        accountType:
          type: string
          enum:
            - CAD_ACCOUNT
        bankCode:
          type: string
          description: Canadian financial institution number (3 digits)
          example: '001'
          minLength: 3
          maxLength: 3
          pattern: ^[0-9]{3}$
        branchCode:
          type: string
          description: Transit number identifying the branch (5 digits)
          example: '00012'
          minLength: 5
          maxLength: 5
          pattern: ^[0-9]{5}$
        accountNumber:
          type: string
          description: Bank account number (7-12 digits)
          example: '1234567'
          minLength: 7
          maxLength: 12
          pattern: ^[0-9]{7,12}$
    GbpAccountInfoBase:
      type: object
      required:
        - accountType
        - sortCode
        - accountNumber
      properties:
        accountType:
          type: string
          enum:
            - GBP_ACCOUNT
        sortCode:
          type: string
          description: The UK sort code
          example: '123456'
          minLength: 6
          maxLength: 6
          pattern: ^[0-9]{6}$
        accountNumber:
          type: string
          description: UK bank account number (8 digits)
          minLength: 8
          maxLength: 8
          example: '12345678'
          pattern: ^[0-9]{8}$
      example:
        accountType: GBP_ACCOUNT
        sortCode: '123456'
        accountNumber: '12345678'
    HkdAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
        - swiftCode
      properties:
        accountType:
          type: string
          enum:
            - HKD_ACCOUNT
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: Hong Kong bank account number
          minLength: 1
          maxLength: 34
          example: '123456789012'
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: HSBCHKHHHKH
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: HKD_ACCOUNT
        bankName: Example Bank
        accountNumber: '123456789012'
        swiftCode: HSBCHKHHHKH
    IdrAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
        - swiftCode
        - phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - IDR_ACCOUNT
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
          example: Bank Central Asia
        accountNumber:
          type: string
          description: Indonesian bank account number
          minLength: 1
          maxLength: 34
          example: '1234567890'
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: CENAIDJA
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
        phoneNumber:
          type: string
          description: Indonesian phone number for e-wallet payments
          example: '+6281234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+62[0-9]{9,12}$
      example:
        accountType: IDR_ACCOUNT
        bankName: Bank Central Asia
        accountNumber: '1234567890'
        swiftCode: CENAIDJA
        phoneNumber: '+6281234567890'
    MyrAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
        - swiftCode
      properties:
        accountType:
          type: string
          enum:
            - MYR_ACCOUNT
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: Malaysian bank account number
          minLength: 1
          maxLength: 34
          example: '1234567890'
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: MABORUMMYYY
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: MYR_ACCOUNT
        bankName: Example Bank
        accountNumber: '1234567890'
        swiftCode: MABORUMMYYY
    PhpAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
      properties:
        accountType:
          type: string
          enum:
            - PHP_ACCOUNT
        bankName:
          type: string
          description: Name of the beneficiary's bank
          minLength: 1
          maxLength: 255
          example: BDO Unibank
        accountNumber:
          type: string
          description: Bank account number
          minLength: 8
          maxLength: 16
          example: '001234567890'
          pattern: ^[0-9]{8,16}$
      example:
        accountType: PHP_ACCOUNT
        bankName: BDO Unibank
        accountNumber: '001234567890'
    SgdAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
        - swiftCode
      properties:
        accountType:
          type: string
          enum:
            - SGD_ACCOUNT
        bankName:
          type: string
          description: Name of the beneficiary's bank
          minLength: 1
          maxLength: 255
          example: DBS Bank Ltd
        accountNumber:
          type: string
          description: Bank account number
          minLength: 1
          maxLength: 34
          example: '0123456789'
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: DBSSSGSG
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: SGD_ACCOUNT
        bankName: DBS Bank Ltd
        accountNumber: '0123456789'
        swiftCode: DBSSSGSG
    ThbAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
        - swiftCode
      properties:
        accountType:
          type: string
          enum:
            - THB_ACCOUNT
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: Thai bank account number
          minLength: 1
          maxLength: 34
          example: '1234567890'
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: BKKBTHBK
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: THB_ACCOUNT
        bankName: Example Bank
        accountNumber: '1234567890'
        swiftCode: BKKBTHBK
    VndAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
        - accountNumber
        - swiftCode
      properties:
        accountType:
          type: string
          enum:
            - VND_ACCOUNT
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: Vietnamese bank account number
          minLength: 1
          maxLength: 34
          example: '1234567890'
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: BFTVVNVX
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: VND_ACCOUNT
        bankName: Example Bank
        accountNumber: '1234567890'
        swiftCode: BFTVVNVX
    AedAccountInfoBase:
      type: object
      required:
        - accountType
        - iban
      properties:
        accountType:
          type: string
          enum:
            - AED_ACCOUNT
        iban:
          type: string
          description: UAE IBAN (23 characters, starting with AE)
          example: AE070331234567890123456
          minLength: 23
          maxLength: 23
          pattern: ^AE[0-9]{21}$
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: EBILAEAD
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
      example:
        accountType: AED_ACCOUNT
        iban: AE070331234567890123456
        swiftCode: EBILAEAD
    KesAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - KES_ACCOUNT
        phoneNumber:
          type: string
          description: Kenyan mobile money phone number
          example: '+254712345678'
          minLength: 7
          maxLength: 15
          pattern: ^\+254[0-9]{9}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: KES_ACCOUNT
        phoneNumber: '+254712345678'
        provider: Example Provider
    MwkAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - MWK_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: MWK_ACCOUNT
        phoneNumber: '+1234567890'
        provider: Example Provider
    RwfAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - RWF_ACCOUNT
        phoneNumber:
          type: string
          description: Rwandan mobile money phone number
          example: '+250781234567'
          minLength: 7
          maxLength: 15
          pattern: ^\+250[0-9]{9}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: RWF_ACCOUNT
        phoneNumber: '+250781234567'
        provider: Example Provider
    TzsAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - TZS_ACCOUNT
        phoneNumber:
          type: string
          description: Tanzanian mobile money phone number
          example: '+255712345678'
          minLength: 7
          maxLength: 15
          pattern: ^\+255[0-9]{9}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: TZS_ACCOUNT
        phoneNumber: '+255712345678'
        provider: Example Provider
    UgxAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - UGX_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: UGX_ACCOUNT
        phoneNumber: '+1234567890'
        provider: Example Provider
    XofAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
        - region
      properties:
        accountType:
          type: string
          enum:
            - XOF_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
        region:
          type: string
          description: Country code within the West African CFA franc zone
          minLength: 2
          maxLength: 2
          pattern: ^[A-Z]{2}$
          enum:
            - BJ
            - CI
            - SN
            - TG
      example:
        accountType: XOF_ACCOUNT
        phoneNumber: '+1234567890'
        provider: Example Provider
        region: BJ
    ZarAccountInfoBase:
      type: object
      required:
        - accountType
        - accountNumber
        - bankName
      properties:
        accountType:
          type: string
          enum:
            - ZAR_ACCOUNT
        accountNumber:
          type: string
          description: South African bank account number
          minLength: 9
          maxLength: 13
          example: '1234567890'
          pattern: ^[0-9]{9,13}$
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
      example:
        accountType: ZAR_ACCOUNT
        accountNumber: '1234567890'
        bankName: Example Bank
    ZmwAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - ZMW_ACCOUNT
        phoneNumber:
          type: string
          description: Zambian mobile money phone number
          example: '+260971234567'
          minLength: 7
          maxLength: 15
          pattern: ^\+260[0-9]{9}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: ZMW_ACCOUNT
        phoneNumber: '+260971234567'
        provider: Example Provider
    BwpAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
      properties:
        accountType:
          type: string
          enum:
            - BWP_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
      example:
        accountType: BWP_ACCOUNT
        phoneNumber: '+1234567890'
        provider: Example Provider
    XafAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - provider
        - region
      properties:
        accountType:
          type: string
          enum:
            - XAF_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
        region:
          type: string
          description: Country code within the Central African CFA franc zone
          minLength: 2
          maxLength: 2
          pattern: ^[A-Z]{2}$
          enum:
            - CM
            - CG
      example:
        accountType: XAF_ACCOUNT
        phoneNumber: '+1234567890'
        provider: Example Provider
        region: CM
    BdtAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
      description: |-
        Required fields depend on the selected paymentRails:
        - BANK_TRANSFER: accountNumber, bankName
        - MOBILE_MONEY: bankName, phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - BDT_ACCOUNT
        accountNumber:
          type: string
          description: The account number of the bank
          minLength: 1
          maxLength: 34
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        branchCode:
          type: string
          description: The branch code
          minLength: 5
          maxLength: 5
          pattern: ^[0-9]{5}$
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: DEUTDEFF
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
      example:
        accountType: BDT_ACCOUNT
        accountNumber: '1234567890'
        bankName: Example Bank
        branchCode: '11111'
        swiftCode: DEUTDEFF
        phoneNumber: '+1234567890'
    EgpAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
      description: |-
        Required fields depend on the selected paymentRails:
        - BANK_TRANSFER: bankName, iban
        - MOBILE_MONEY: bankName, phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - EGP_ACCOUNT
        iban:
          type: string
          description: Egyptian IBAN (29 characters, starting with EG)
          example: EG380019000500000000263180002
          minLength: 29
          maxLength: 29
          pattern: ^EG[0-9]{27}$
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
      example:
        accountType: EGP_ACCOUNT
        iban: EG380019000500000000263180002
        bankName: Example Bank
        phoneNumber: '+1234567890'
    GhsAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
      description: |-
        Required fields depend on the selected paymentRails:
        - BANK_TRANSFER: accountNumber, bankName
        - MOBILE_MONEY: bankName, phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - GHS_ACCOUNT
        accountNumber:
          type: string
          description: The account number of the bank
          minLength: 1
          maxLength: 34
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
      example:
        accountType: GHS_ACCOUNT
        accountNumber: '1234567890'
        bankName: Example Bank
        phoneNumber: '+1234567890'
    GtqAccountInfoBase:
      type: object
      required:
        - accountType
        - accountNumber
        - bankAccountType
      properties:
        accountType:
          type: string
          enum:
            - GTQ_ACCOUNT
        accountNumber:
          type: string
          description: The account number of the bank
          minLength: 1
          maxLength: 34
        bankAccountType:
          type: string
          description: The bank account type
          enum:
            - CHECKING
            - SAVINGS
      example:
        accountType: GTQ_ACCOUNT
        accountNumber: '1234567890'
        bankAccountType: CHECKING
    HtgAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - HTG_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
      example:
        accountType: HTG_ACCOUNT
        phoneNumber: '+1234567890'
    JmdAccountInfoBase:
      type: object
      required:
        - accountType
        - accountNumber
        - branchCode
        - bankAccountType
      properties:
        accountType:
          type: string
          enum:
            - JMD_ACCOUNT
        accountNumber:
          type: string
          description: The account number of the bank
          minLength: 1
          maxLength: 34
        branchCode:
          type: string
          description: The branch code
          minLength: 5
          maxLength: 5
          pattern: ^[0-9]{5}$
        bankAccountType:
          type: string
          description: The bank account type
          enum:
            - CHECKING
            - SAVINGS
      example:
        accountType: JMD_ACCOUNT
        accountNumber: '1234567890'
        branchCode: '11111'
        bankAccountType: CHECKING
    PkrAccountInfoBase:
      type: object
      required:
        - accountType
        - bankName
      description: |-
        Required fields depend on the selected paymentRails:
        - BANK_TRANSFER: accountNumber, bankName
        - MOBILE_MONEY: bankName, phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - PKR_ACCOUNT
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: The account number of the bank
          minLength: 1
          maxLength: 34
        iban:
          type: string
          description: Pakistani IBAN (24 characters, starting with PK)
          example: PK36SCBL0000001123456702
          minLength: 24
          maxLength: 24
          pattern: ^PK[0-9]{2}[A-Z]{4}[0-9]{16}$
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
      example:
        accountType: PKR_ACCOUNT
        bankName: Example Bank
        accountNumber: '1234567890'
        iban: PK36SCBL0000001123456702
        phoneNumber: '+1234567890'
    SlvAccountInfoBase:
      type: object
      required:
        - accountType
      description: |-
        Required fields depend on the selected paymentRails:
        - BANK_TRANSFER: bankAccountType, accountNumber
        - MOBILE_MONEY: phoneNumber
      properties:
        accountType:
          type: string
          enum:
            - SLV_ACCOUNT
        bankName:
          type: string
          description: The name of the bank (BANK_TRANSFER only)
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: The account number of the bank (BANK_TRANSFER only)
          minLength: 1
          maxLength: 34
        bankAccountType:
          type: string
          description: The bank account type (BANK_TRANSFER only)
          enum:
            - CHECKING
            - SAVINGS
        phoneNumber:
          type: string
          description: >-
            The phone number in international format (MOBILE_MONEY only — e.g.
            Tigo Money)
          example: '+50312345678'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
      example:
        accountType: SLV_ACCOUNT
        bankName: Banco Cuscatlan
        accountNumber: '0123456789'
        bankAccountType: CHECKING
    SwiftAccountInfoBase:
      type: object
      required:
        - accountType
        - swiftCode
        - bankName
        - country
      properties:
        accountType:
          type: string
          enum:
            - SWIFT_ACCOUNT
        country:
          type: string
          description: The ISO 3166-1 alpha-2 country code of the bank account
          example: NG
          minLength: 2
          maxLength: 2
          pattern: ^[A-Z]{2}$
        swiftCode:
          type: string
          description: The SWIFT/BIC code of the bank
          example: DEUTDEFF
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
        bankName:
          type: string
          description: The name of the bank
          example: Deutsche Bank
          minLength: 1
          maxLength: 255
        accountNumber:
          type: string
          description: >-
            The bank account number. Required for most corridors. Use iban
            instead for IBAN-only corridors (e.g. BR, GB).
          example: '1234567890'
          minLength: 1
          maxLength: 34
        iban:
          type: string
          description: >-
            The IBAN of the bank account. Required for IBAN-only corridors (e.g.
            BR, GB). Use accountNumber for all other corridors.
          example: GB29NWBK60161331926819
          minLength: 15
          maxLength: 34
          pattern: ^[A-Z]{2}[0-9]{2}[A-Za-z0-9]{11,30}$
      example:
        accountType: SWIFT_ACCOUNT
        country: NG
        swiftCode: DEUTDEFF
        bankName: Deutsche Bank
        accountNumber: '1234567890'
    CnyAccountInfoBase:
      type: object
      required:
        - accountType
        - phoneNumber
        - bankName
      properties:
        accountType:
          type: string
          enum:
            - CNY_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        bankName:
          type: string
          description: The name of the bank
          minLength: 1
          maxLength: 255
      example:
        accountType: CNY_ACCOUNT
        phoneNumber: '+1234567890'
        bankName: Example Bank
    AccountTransactionDestination:
      title: Account Destination
      allOf:
        - $ref: '#/components/schemas/BaseTransactionDestination'
        - type: object
          required:
            - accountId
            - destinationType
          properties:
            destinationType:
              type: string
              enum:
                - ACCOUNT
            accountId:
              type: string
              description: Destination account identifier
              example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
          description: Destination account details
    UmaAddressTransactionDestination:
      title: UMA Address Destination
      allOf:
        - $ref: '#/components/schemas/BaseTransactionDestination'
        - type: object
          required:
            - umaAddress
            - destinationType
          properties:
            destinationType:
              type: string
              enum:
                - UMA_ADDRESS
            umaAddress:
              type: string
              description: UMA address of the recipient
              example: $receiver@uma.domain.com
          description: UMA address destination details
    BaseTransactionSource:
      type: object
      required:
        - sourceType
      properties:
        sourceType:
          $ref: '#/components/schemas/TransactionSourceType'
        currency:
          type: string
          description: Currency code for the source
          example: USD
    BaseTransactionDestination:
      type: object
      required:
        - destinationType
      properties:
        destinationType:
          $ref: '#/components/schemas/TransactionDestinationType'
        currency:
          type: string
          description: Currency code for the destination
          example: EUR
    TransactionSourceType:
      type: string
      enum:
        - ACCOUNT
        - UMA_ADDRESS
        - REALTIME_FUNDING
      description: Type of transaction source
      example: ACCOUNT
    TransactionDestinationType:
      type: string
      enum:
        - ACCOUNT
        - UMA_ADDRESS
      description: Type of transaction destination
      example: ACCOUNT
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        API token authentication using format `<api token id>:<api client
        secret>`
    AgentAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication for agent-scoped endpoints. The token is the
        `accessToken` returned when redeeming a device code via `POST
        /agents/device-codes/{code}/redeem`. Agent credentials are user-scoped:
        all requests are automatically bound to the agent's associated customer
        and subject to the agent's policy.

````