Lightspark External Accounts API

External account management endpoints for creating and managing external bank accounts

Operations 8

GET /customers/external-accounts List Customer external accounts #
POST /customers/external-accounts Add a new external account #
GET /customers/external-accounts/{externalAccountId} Get customer external account by ID #
DELETE /customers/external-accounts/{externalAccountId} Delete customer external account by ID #
GET /platform/external-accounts List platform external accounts #
POST /platform/external-accounts Add a new platform external account #
GET /platform/external-accounts/{externalAccountId} Get platform external account by ID #
DELETE /platform/external-accounts/{externalAccountId} Delete platform external account by ID #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightspark-external-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightspark-external-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Grid External Accounts 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: External Accounts
  description: External account management endpoints for creating and managing external bank accounts
paths:
  /customers/external-accounts:
    get:
      summary: List Customer external accounts
      description: 'Retrieve a list of external accounts with optional filtering parameters. Returns all

        external accounts that match the specified filters. If no filters are provided, returns all external accounts

        (paginated).


        External accounts are bank accounts, cryptocurrency wallets, or other payment destinations that customers can use to receive funds from the platform.

        '
      operationId: listCustomerExternalAccounts
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      parameters:
      - name: currency
        in: query
        description: Filter by currency code
        required: false
        schema:
          type: string
      - name: customerId
        in: query
        description: Filter by external accounts associated with a specific customer
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Maximum number of results to return (default 20, max 100)
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: cursor
        in: query
        description: Cursor for pagination (returned from previous request)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccountListResponse'
        '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'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    post:
      summary: Add a new external account
      description: Register a new external bank account for a customer.
      operationId: createCustomerExternalAccount
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalAccountCreateRequest'
            examples:
              usBankAccount:
                summary: Create external US bank account
                value:
                  customerId: Customer:019542f5-b3e7-1d02-0000-000000000001
                  currency: USD
                  accountInfo:
                    accountType: USD_ACCOUNT
                    accountNumber: '12345678901'
                    routingNumber: '123456789'
                    bankAccountType: CHECKING
                    bankName: Chase Bank
                    platformAccountId: ext_acc_123456
                    beneficiary:
                      beneficiaryType: INDIVIDUAL
                      fullName: John Doe
                      birthDate: '1990-01-15'
                      nationality: US
                      address:
                        line1: 123 Main Street
                        city: San Francisco
                        state: CA
                        postalCode: '94105'
                        country: US
              sparkWallet:
                summary: Create external Spark wallet
                value:
                  customerId: Customer:019542f5-b3e7-1d02-0000-000000000001
                  currency: BTC
                  accountInfo:
                    accountType: SPARK_WALLET
                    address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu
      responses:
        '201':
          description: External account created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '409':
          description: Conflict - External account already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /customers/external-accounts/{externalAccountId}:
    parameters:
    - name: externalAccountId
      in: path
      description: System-generated unique external account identifier
      required: true
      schema:
        type: string
    get:
      summary: Get customer external account by ID
      description: Retrieve a customer external account by its system-generated ID
      operationId: getCustomerExternalAccountById
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: External account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    delete:
      summary: Delete customer external account by ID
      description: Delete a customer external account by its system-generated ID
      operationId: deleteCustomerExternalAccountById
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      responses:
        '204':
          description: External account deleted successfully
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: External account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /platform/external-accounts:
    get:
      summary: List platform external accounts
      description: 'Retrieve a list of all external accounts that belong to the platform, as opposed to an individual customer.


        These accounts are used for platform-wide operations such as receiving funds from external sources or managing platform-level payment destinations.

        '
      operationId: listPlatformExternalAccounts
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      parameters:
      - name: currency
        in: query
        description: Filter by currency code
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Maximum number of results to return (default 20, max 100)
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: cursor
        in: query
        description: Cursor for pagination (returned from previous request)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccountListResponse'
        '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'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    post:
      summary: Add a new platform external account
      description: Register a new external bank account for the platform.
      operationId: createPlatformExternalAccount
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformExternalAccountCreateRequest'
            examples:
              usBankAccount:
                summary: Create external US bank account
                value:
                  currency: USD
                  accountInfo:
                    accountType: USD_ACCOUNT
                    accountNumber: '12345678901'
                    routingNumber: '123456789'
                    bankAccountType: CHECKING
                    bankName: Chase Bank
                    platformAccountId: ext_acc_123456
                    beneficiary:
                      beneficiaryType: INDIVIDUAL
                      fullName: John Doe
                      birthDate: '1990-01-15'
                      nationality: US
                      address:
                        line1: 123 Main Street
                        city: San Francisco
                        state: CA
                        postalCode: '94105'
                        country: US
              sparkWallet:
                summary: Create external Spark wallet
                value:
                  currency: BTC
                  accountInfo:
                    accountType: SPARK_WALLET
                    address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu
      responses:
        '201':
          description: External account created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '409':
          description: Conflict - External account already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /platform/external-accounts/{externalAccountId}:
    parameters:
    - name: externalAccountId
      in: path
      description: System-generated unique external account identifier
      required: true
      schema:
        type: string
    get:
      summary: Get platform external account by ID
      description: Retrieve a platform external account by its system-generated ID
      operationId: getPlatformExternalAccountById
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: External account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    delete:
      summary: Delete platform external account by ID
      description: Delete a platform external account by its system-generated ID
      operationId: deletePlatformExternalAccountById
      tags:
      - External Accounts
      security:
      - BasicAuth: []
      responses:
        '204':
          description: External account deleted successfully
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: External 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:
    MyrBeneficiary:
      title: Individual Beneficiary
      type: object
      required:
      - beneficiaryType
      - fullName
      properties:
        beneficiaryType:
          type: string
          enum:
          - INDIVIDUAL
        fullName:
          type: string
          description: The full name of the beneficiary
        birthDate:
          type: string
          description: The birth date of the beneficiary
        nationality:
          type: string
          description: The nationality of the beneficiary
        email:
          type: string
          description: The email of the beneficiary
        phoneNumber:
          type: string
          description: The phone number of the beneficiary
        countryOfResidence:
          type: string
          description: The country of residence of the beneficiary
        address:
          $ref: '#/components/schemas/Address'
    BdtAccountInfo:
      allOf:
      - $ref: '#/components/schemas/BdtAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
              - MOBILE_MONEY
    MwkExternalAccountInfo:
      title: MWK Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/MwkAccountInfo'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/MwkBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/MwkBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    PhpAccountInfo:
      allOf:
      - $ref: '#/components/schemas/PhpAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
    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
    PolygonWalletExternalAccountInfo:
      title: Polygon Wallet
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/PolygonWalletInfo'
    HkdAccountInfo:
      allOf:
      - $ref: '#/components/schemas/HkdAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
    MyrExternalAccountInfo:
      title: MYR Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/MyrAccountInfo'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/MyrBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/MyrBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    InrBeneficiary:
      title: Individual Beneficiary
      type: object
      required:
      - beneficiaryType
      - fullName
      properties:
        beneficiaryType:
          type: string
          enum:
          - INDIVIDUAL
        fullName:
          type: string
          description: The full name of the beneficiary
        birthDate:
          type: string
          description: The birth date of the beneficiary
        nationality:
          type: string
          description: The nationality of the beneficiary
        email:
          type: string
          description: The email of the beneficiary
        phoneNumber:
          type: string
          description: The phone number of the beneficiary
        countryOfResidence:
          type: string
          description: The country of residence of the beneficiary
        address:
          $ref: '#/components/schemas/Address'
    CadExternalAccountCreateInfo:
      title: CAD Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/CadAccountInfoBase'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/CadBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/CadBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    UgxAccountInfo:
      allOf:
      - $ref: '#/components/schemas/UgxAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - MOBILE_MONEY
    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
    GbpExternalAccountCreateInfo:
      title: GBP Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/GbpAccountInfoBase'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/GbpBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/GbpBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    CnyExternalAccountCreateInfo:
      title: CNY Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/CnyAccountInfoBase'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/CnyBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/CnyBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    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
    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'
    CnyBeneficiary:
      title: Individual Beneficiary
      type: object
      required:
      - beneficiaryType
      - fullName
      properties:
        beneficiaryType:
          type: string
          enum:
          - INDIVIDUAL
        fullName:
          type: string
          description: The full name of the beneficiary
        birthDate:
          type: string
          description: The birth date of the beneficiary
        nationality:
          type: string
          description: The nationality of the beneficiary
        email:
          type: string
          description: The email of the beneficiary
        phoneNumber:
          type: string
          description: The phone number of the beneficiary
        countryOfResidence:
          type: string
          description: The country of residence of the beneficiary
        address:
          $ref: '#/components/schemas/Address'
    IdrExternalAccountInfo:
      title: IDR Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/IdrAccountInfo'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/IdrBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/IdrBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    BrlBeneficiary:
      title: Individual Beneficiary
      type: object
      required:
      - beneficiaryType
      - fullName
      properties:
        beneficiaryType:
          type: string
          enum:
          - INDIVIDUAL
        fullName:
          type: string
          description: The full name of the beneficiary
        birthDate:
          type: string
          description: The birth date of the beneficiary
        nationality:
          type: string
          description: The nationality of the beneficiary
        email:
          type: string
          description: The email of the beneficiary
        phoneNumber:
          type: string
          description: The phone number of the beneficiary
        countryOfResidence:
          type: string
          description: The country of residence of the beneficiary
        address:
          $ref: '#/components/schemas/Address'
    CopAccountInfo:
      allOf:
      - $ref: '#/components/schemas/CopAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
              - MOBILE_MONEY
    PhpExternalAccountInfo:
      title: PHP Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/PhpAccountInfo'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/PhpBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/PhpBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    BaseExternalAccountInfo:
      type: object
      required:
      - accountType
      properties:
        accountType:
          $ref: '#/components/schemas/ExternalAccountType'
    EgpAccountInfo:
      allOf:
      - $ref: '#/components/schemas/EgpAccountInfoBase'
      - 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
    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'
    IdrExternalAccountCreateInfo:
      title: IDR Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/IdrAccountInfoBase'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/IdrBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/IdrBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    JmdAccountInfo:
      allOf:
      - $ref: '#/components/schemas/JmdAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
    GbpExternalAccountInfo:
      title: GBP Account
      allOf:
      - $ref: '#/components/schemas/BaseExternalAccountInfo'
      - $ref: '#/components/schemas/GbpAccountInfo'
      - type: object
        required:
        - beneficiary
        properties:
          beneficiary:
            oneOf:
            - title: Individual Beneficiary
              $ref: '#/components/schemas/GbpBeneficiary'
            - title: Business Beneficiary
              $ref: '#/components/schemas/BusinessBeneficiary'
            discriminator:
              propertyName: beneficiaryType
              mapping:
                INDIVIDUAL: '#/components/schemas/GbpBeneficiary'
                BUSINESS: '#/components/schemas/BusinessBeneficiary'
    SlvExternalAccountCreateInfo:
      title: SLV Account
      allOf:
      - $ref: 

# --- truncated at 32 KB (187 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lightspark/refs/heads/main/openapi/lightspark-external-accounts-api-openapi.yml