Lightspark Same-Currency Transfers API

Endpoints for transferring funds between internal and external accounts with the same currency

OpenAPI Specification

lightspark-same-currency-transfers-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Grid Agent Management Same-Currency Transfers 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: Same-Currency Transfers
  description: Endpoints for transferring funds between internal and external accounts with the same currency
paths:
  /transfer-in:
    post:
      summary: Create a transfer-in request
      description: 'Transfer funds from an external account to an internal account for a specific customer. This endpoint should only be used for external account sources with pull functionality (e.g. ACH Pull). Otherwise, use the paymentInstructions on the internal account to deposit funds.

        '
      operationId: createTransferIn
      tags:
      - Same-Currency Transfers
      security:
      - BasicAuth: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: 'A unique identifier for the request. If the same key is sent multiple times, the server will return the same response as the first request.

          '
        schema:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferInRequest'
            examples:
              transferIn:
                summary: Transfer from external to internal account
                value:
                  source:
                    accountId: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
                  destination:
                    accountId: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
                  amount: 12550
      responses:
        '201':
          description: Transfer-in request created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionOneOf'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Customer or account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /transfer-out:
    post:
      summary: Create a transfer-out request
      description: 'Transfer funds from an internal account to an external account for a specific customer.

        '
      operationId: createTransferOut
      tags:
      - Same-Currency Transfers
      security:
      - BasicAuth: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: 'A unique identifier for the request. If the same key is sent multiple times, the server will return the same response as the first request.

          '
        schema:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferOutRequest'
            examples:
              transferOut:
                summary: Transfer from internal to external account
                value:
                  source:
                    accountId: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
                  destination:
                    accountId: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
                    paymentRail: ACH
                  amount: 12550
                  remittanceInformation: '12345'
      responses:
        '201':
          description: 'Transfer-out request created successfully.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionOneOf'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Customer or account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
components:
  schemas:
    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 Grid wallet signature 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}'
    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
    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
    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
    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
    TzsAccountInfo:
      allOf:
      - $ref: '#/components/schemas/TzsAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - MOBILE_MONEY
    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
    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
    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
    TransactionStatus:
      type: string
      enum:
      - CREATED
      - PENDING
      - PENDING_AUTHORIZATION
      - 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 |

        | `PENDING_AUTHORIZATION` | Awaiting Strong Customer Authentication. Only occurs for customers in a region where SCA is required (e.g. EU); authorize the transaction''s `scaChallenge` to proceed. |

        | `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 |

        '
    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 |

            | STABLECOIN_PROVIDER_ACCOUNT_NOT_FOUND | Stablecoin provider account link not found |

            '
          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
          - STABLECOIN_PROVIDER_ACCOUNT_NOT_FOUND
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    InrAccountInfo:
      allOf:
      - $ref: '#/components/schemas/InrAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - UPI
              - NEFT
              - RTGS
    BaseTransactionDestination:
      type: object
      required:
      - destinationType
      properties:
        destinationType:
          $ref: '#/components/schemas/TransactionDestinationType'
        currency:
          type: string
          description: Currency code for the destination
          example: EUR
    GtqAccountInfoBase:
      type: object
      required:
      - accountType
      - accountNumber
      - bankAccountType
      - bankName
      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
        bankName:
          type: string
          description: The name of the beneficiary's bank
          minLength: 1
          maxLength: 255
      example:
        accountType: GTQ_ACCOUNT
        accountNumber: '1234567890'
        bankAccountType: CHECKING
        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}$
    EgpAccountInfo:
      allOf:
      - $ref: '#/components/schemas/EgpAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
              - MOBILE_MONEY
    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
    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
    BaseWalletInfo:
      type: object
      required:
      - address
      - accountType
      properties:
        accountType:
          type: string
          enum:
          - BASE_WALLET
        address:
          type: string
          description: Base eth wallet address
          example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12'
    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
    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'
    PaymentRail:
      type: string
      enum:
      - ACH
      - ACH_COLOMBIA
      - BANK_TRANSFER
      - BRE_B
      - CIPS
      - FAST
      - FASTER_PAYMENTS
      - FEDNOW
      - INSTAPAY
      - MOBILE_MONEY
      - NEFT
      - PAYNOW
      - PESONET
      - PIX
      - RTGS
      - RTP
      - SEPA
      - SEPA_INSTANT
      - SPEI
      - SWIFT
      - UNIONPAY
      - 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
    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 or configured Spark token currency code
          invoice:
            type: string
            description: Invoice for the payment
            example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s
    ThbAccountInfo:
      allOf:
      - $ref: '#/components/schemas/ThbAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
    MwkAccountInfo:
      allOf:
      - $ref: '#/components/schemas/MwkAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - MOBILE_MONEY
    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
    XafAccountInfo:
      allOf:
      - $ref: '#/components/schemas/XafAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - MOBILE_MONEY
    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
    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
    OutgoingTransactionStatus:
      type: string
      enum:
      - PENDING
      - PENDING_AUTHORIZATION
      - EXPIRED
      - PROCESSING
      - COMPLETED
      - FAILED
      description: 'Status of an outgoing payment transaction.


        | Status | Description |

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

        | `PENDING` | Quote is pending confirmation |

        | `PENDING_AUTHORIZATION` | Awaiting Strong Customer Authentication. Only occurs for customers in a region where SCA is required (e.g. EU); authorize the transaction''s `scaChallenge` to proceed. |

        | `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` |

        '
    DkkAccountInfo:
      allOf:
      - $ref: '#/components/schemas/DkkAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - SEPA
              - SEPA_INSTANT
    CardPullSummary:
      type: object
      required:
      - count
      - totalAmount
      properties:
        count:
          type: integer
          description: Total number of pulls (debits) executed against the funding source for this transaction. `> 1` indicates one or more post-hoc pulls — e.g. restaurant tip / over-auth clearings.
          example: 2
        totalAmount:
          type: integer
          format: int64
          description: Sum of all pull amounts in the smallest unit of the funding source's currency.
          example: 1500
        pendingCount:
          type: integer
          description: Number of pulls still in the `PENDING` state. Drops to zero when every pull has reached a terminal state. Non-zero values that persist beyond the expected settlement window are an early signal for the `EXCEPTION` path.
          example: 0
    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
    HtgAccountInfo:
      allOf:
      - $ref: '#/components/schemas/HtgAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - MOBILE_MONEY
    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'
    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.
    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
    TransactionSourceOneOf:
      oneOf:
      - $ref: '#/components/schemas/AccountTransactionSource'
      - $ref: '#/components/schemas/UmaAddressTransactionSource'
      - $ref: '#/components/schemas/RealtimeFundingTransactionSource'
      discriminator:
        propertyName: sourceType
        mapping:
          ACCOUNT: '#/components/schemas/AccountTransactionSource'
          UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource'
          REALTIME_FUNDING: '#/components/schemas/RealtimeFundingTransactionSource'
    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.
    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
    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 |

# --- truncated at 32 KB (128 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lightspark/refs/heads/main/openapi/lightspark-same-currency-transfers-api-openapi.yml