From 194d1b8e2ad9e645772a584062e0fa019f64527f Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Thu, 22 Jan 2026 15:41:31 -0800 Subject: [PATCH 01/10] initial commit for stainless sdk generation fixes --- .stainless/stainless.yml | 265 ++++++++++++++++ .stainless/workspace.json | 10 + mintlify/openapi.yaml | 286 +++++++----------- openapi.yaml | 286 +++++++----------- .../schemas/common/BaseWalletInfo.yaml | 3 +- .../schemas/common/ClabeAccountInfo.yaml | 3 +- .../schemas/common/FboAccountInfo.yaml | 3 +- .../schemas/common/IbanAccountInfo.yaml | 3 +- .../schemas/common/NgnAccountInfo.yaml | 3 +- .../schemas/common/PaymentBaseWalletInfo.yaml | 4 +- .../common/PaymentClabeAccountInfo.yaml | 1 - .../schemas/common/PaymentFboAccountInfo.yaml | 5 +- .../common/PaymentIbanAccountInfo.yaml | 1 - .../common/PaymentLightningInvoiceInfo.yaml | 3 +- .../schemas/common/PaymentNgnAccountInfo.yaml | 1 - .../schemas/common/PaymentPixAccountInfo.yaml | 1 - .../common/PaymentPolygonWalletInfo.yaml | 4 +- .../common/PaymentSolanaWalletInfo.yaml | 1 - .../common/PaymentSparkWalletInfo.yaml | 1 - .../schemas/common/PaymentTronWalletInfo.yaml | 4 +- .../schemas/common/PaymentUpiAccountInfo.yaml | 1 - .../schemas/common/PaymentUsAccountInfo.yaml | 1 - .../schemas/common/PixAccountInfo.yaml | 3 +- .../schemas/common/PolygonWalletInfo.yaml | 3 +- .../schemas/common/SolanaWalletInfo.yaml | 3 +- .../schemas/common/SparkWalletInfo.yaml | 3 +- .../schemas/common/TronWalletInfo.yaml | 3 +- .../schemas/common/UpiAccountInfo.yaml | 3 +- .../schemas/common/UsAccountInfo.yaml | 3 +- .../customers/BusinessCustomerUpdate.yaml | 2 +- .../customers/IndividualCustomerUpdate.yaml | 2 +- .../components/schemas/errors/Error400.yaml | 3 +- .../components/schemas/errors/Error401.yaml | 3 +- .../components/schemas/errors/Error403.yaml | 3 +- .../components/schemas/errors/Error404.yaml | 3 +- .../components/schemas/errors/Error409.yaml | 3 +- .../components/schemas/errors/Error412.yaml | 6 +- .../components/schemas/errors/Error424.yaml | 3 +- .../components/schemas/errors/Error500.yaml | 3 +- .../components/schemas/errors/Error501.yaml | 3 +- .../BaseWalletExternalAccountInfo.yaml | 3 +- .../BusinessBeneficiary.yaml | 2 +- .../ClabeAccountExternalAccountInfo.yaml | 3 +- .../IbanAccountExternalAccountInfo.yaml | 3 +- .../IndividualBeneficiary.yaml | 2 +- .../LightningExternalAccountInfo.yaml | 3 +- .../NgnAccountExternalAccountInfo.yaml | 3 +- .../PixAccountExternalAccountInfo.yaml | 3 +- .../PolygonWalletExternalAccountInfo.yaml | 3 +- .../SolanaWalletExternalAccountInfo.yaml | 3 +- .../SparkWalletExternalAccountInfo.yaml | 3 +- .../TronWalletExternalAccountInfo.yaml | 3 +- .../UpiAccountExternalAccountInfo.yaml | 3 +- .../UsAccountExternalAccountInfo.yaml | 3 +- .../webhooks/InvitationClaimedWebhook.yaml | 3 +- 55 files changed, 534 insertions(+), 454 deletions(-) create mode 100644 .stainless/stainless.yml create mode 100644 .stainless/workspace.json diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml new file mode 100644 index 0000000..594658f --- /dev/null +++ b/.stainless/stainless.yml @@ -0,0 +1,265 @@ +# yaml-language-server: $schema=https://app.stainless.com/config.schema.json + +# The main edition for the config, see the [docs] for more information. +# +# [docs]: https://www.stainless.com/docs/reference/editions +edition: 2025-10-10 + +organization: + # Name of your organization or company, used to determine the name of the client + # and headings. + name: grid + # Link to your API documentation. + docs: '' + # Contact email for bug reports, questions, and support requests. + contact: support@lightspark.com + +# `targets` define the output targets and their customization options, such as +# whether to emit the Node SDK and what its package name should be. +targets: + typescript: + # The edition for this target, see the [docs] for more information. + # + # [docs]: https://www.stainless.com/docs/reference/editions + edition: typescript.2025-10-10 + package_name: grid + production_repo: null + publish: + npm: false + +# `environments` are a map of the name of the environment (e.g. "sandbox", +# "production") to the corresponding url to use. +environments: + production: https://api.lightspark.com/grid/2025-10-13 + +# `resources` define the structure and organization for your API, such as how +# methods and models are grouped together and accessed. See the [configuration +# guide] for more information. +# +# [configuration guide]: https://www.stainless.com/docs/guides/configure#resources +resources: + config: + # Configure the methods defined in this resource. Each key in the object is the + # name of the method and the value is either an endpoint (for example, `get /foo`) + # or an object with more detail. + # + # [reference]: https://www.stainless.com/docs/reference/config#method + # Configure the models--named types--defined in the resource. Each key in the + # object is the name of the model and the value is either the name of a schema in + # `#/components/schemas` or an object with more detail. + # + # [reference]: https://www.stainless.com/docs/reference/config#model + models: + customer_info_field_name: '#/components/schemas/CustomerInfoFieldName' + platform_currency_config: '#/components/schemas/PlatformCurrencyConfig' + platform_config: '#/components/schemas/PlatformConfig' + methods: + retrieve: get /config + update: patch /config + + customers: + models: + customer_type: '#/components/schemas/CustomerType' + individual_customer: '#/components/schemas/IndividualCustomer' + customer: '#/components/schemas/Customer' + address: '#/components/schemas/Address' + ultimate_beneficial_owner: '#/components/schemas/UltimateBeneficialOwner' + business_customer: '#/components/schemas/BusinessCustomer' + individual_customer_update: '#/components/schemas/IndividualCustomerUpdate' + business_customer_update: '#/components/schemas/BusinessCustomerUpdate' + methods: + create: post /customers + list: get /customers + retrieve: get /customers/{customerId} + update: patch /customers/{customerId} + delete: delete /customers/{customerId} + get_kyc_link: get /customers/kyc-link + list_internal_accounts: get /customers/internal-accounts + # Subresources define resources that are nested within another for more powerful + # logical groupings, e.g. `cards.payments`. + subresources: + external_accounts: + models: + us_account_info: '#/components/schemas/UsAccountInfo' + pix_account_info: '#/components/schemas/PixAccountInfo' + iban_account_info: '#/components/schemas/IbanAccountInfo' + upi_account_info: '#/components/schemas/UpiAccountInfo' + spark_wallet_info: '#/components/schemas/SparkWalletInfo' + solana_wallet_info: '#/components/schemas/SolanaWalletInfo' + tron_wallet_info: '#/components/schemas/TronWalletInfo' + polygon_wallet_info: '#/components/schemas/PolygonWalletInfo' + clabe_account_info: '#/components/schemas/ClabeAccountInfo' + base_wallet_info: '#/components/schemas/BaseWalletInfo' + individual_beneficiary: '#/components/schemas/IndividualBeneficiary' + business_beneficiary: '#/components/schemas/BusinessBeneficiary' + external_account_info: '#/components/schemas/ExternalAccountInfo' + external_account: '#/components/schemas/ExternalAccount' + external_account_create: '#/components/schemas/ExternalAccountCreateRequest' + methods: + list: get /customers/external-accounts + create: post /customers/external-accounts + bulk: + methods: + upload_csv: post /customers/bulk/csv + get_job_status: get /customers/bulk/jobs/{jobId} + + platform: + methods: + list_internal_accounts: get /platform/internal-accounts + subresources: + external_accounts: + methods: + list: get /platform/external-accounts + create: post /platform/external-accounts + + plaid: + methods: + create_link_token: post /plaid/link-tokens + submit_public_token: post /plaid/callback/{plaid_link_token} + + transfer_in: + models: + transaction: '#/components/schemas/Transaction' + methods: + create: post /transfer-in + + transfer_out: + methods: + create: post /transfer-out + + receiver: + models: + counterparty_field_definition: '#/components/schemas/CounterpartyFieldDefinition' + lookup_response: '#/components/schemas/ReceiverLookupResponse' + methods: + lookup_uma: get /receiver/uma/{receiverUmaAddress} + lookup_external_account: get /receiver/external-account/{accountId} + + quotes: + models: + currency: '#/components/schemas/Currency' + payment_account_or_wallet_info: '#/components/schemas/PaymentAccountOrWalletInfo' + payment_instructions: '#/components/schemas/PaymentInstructions' + outgoing_rate_details: '#/components/schemas/OutgoingRateDetails' + quote_source: '#/components/schemas/QuoteSource' + quote: '#/components/schemas/Quote' + methods: + retrieve: get /quotes/{quoteId} + create: post /quotes + list: get /quotes + retry: post /quotes/{quoteId}/retry + execute: post /quotes/{quoteId}/execute + + transactions: + models: + transaction_type: '#/components/schemas/TransactionType' + incoming_transaction: '#/components/schemas/IncomingTransaction' + transaction_status: '#/components/schemas/TransactionStatus' + methods: + list: get /transactions + retrieve: get /transactions/{transactionId} + approve: post /transactions/{transactionId}/approve + reject: post /transactions/{transactionId}/reject + + webhooks: + methods: + send_test: post /webhooks/test + + invitations: + models: + currency_amount: '#/components/schemas/CurrencyAmount' + uma_invitation: '#/components/schemas/UmaInvitation' + methods: + create: post /invitations + retrieve: get /invitations/{invitationCode} + claim: post /invitations/{invitationCode}/claim + cancel: post /invitations/{invitationCode}/cancel + + sandbox: + methods: + send_funds: post /sandbox/send + subresources: + uma: + methods: + receive_payment: post /sandbox/uma/receive + internal_accounts: + models: + internal_account: '#/components/schemas/InternalAccount' + methods: + fund: post /sandbox/internal-accounts/{accountId}/fund + + uma_providers: + methods: + list: get /uma-providers + + tokens: + models: + permission: '#/components/schemas/Permission' + api_token: '#/components/schemas/ApiToken' + methods: + create: post /tokens + list: get /tokens + retrieve: get /tokens/{tokenId} + delete: delete /tokens/{tokenId} + +settings: + # All generated integration tests that hit the prism mock http server are marked + # as skipped. Removing this setting or setting it to false enables tests, but + # doing so may result in test failures due to bugs in the test server. + # + # [prism mock http server]: https://stoplight.io/open-source/prism + disable_mock_tests: true + license: Apache-2.0 + +# `client_settings` define settings for the API client, such as extra constructor +# arguments (used for authentication), retry behavior, idempotency, etc. +client_settings: + opts: + username: + type: string + nullable: false + auth: + security_scheme: BasicAuth + role: username + description: API token authentication using format `:` + read_env: GRID_USERNAME + password: + type: string + nullable: false + auth: + security_scheme: BasicAuth + role: password + description: API token authentication using format `:` + read_env: GRID_PASSWORD + webhook_signature: + type: string + nullable: false + auth: + security_scheme: WebhookSignature + description: | + Secp256r1 (P-256) asymmetric signature of the webhook payload, which can be used to verify that the webhook was sent by Grid. + + To verify the signature: + 1. Get the Grid public key provided to you during integration + 2. Decode the base64 signature from the header + 3. Create a SHA-256 hash of the request body + 4. Verify the signature using the public key and the hash + + If the signature verification succeeds, the webhook is authentic. If not, it should be rejected. + read_env: GRID_WEBHOOK_SIGNATURE + +# `readme` is used to configure the code snippets that will be rendered in the +# README.md of various SDKs. In particular, you can change the `headline` +# snippet's endpoint and the arguments to call it with. +readme: + example_requests: + default: + type: request + endpoint: get /config + params: {} + headline: + type: request + endpoint: get /config + params: {} diff --git a/.stainless/workspace.json b/.stainless/workspace.json new file mode 100644 index 0000000..1af9854 --- /dev/null +++ b/.stainless/workspace.json @@ -0,0 +1,10 @@ +{ + "project": "grid", + "openapi_spec": "../mintlify/openapi.yaml", + "stainless_config": "stainless.yml", + "targets": { + "typescript": { + "output_path": "../sdks/grid-typescript" + } + } +} diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index c8ef1d7..1fff25b 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -4044,8 +4044,7 @@ components: - code properties: status: - enum: - - 401 + const: 401 type: integer description: HTTP status code code: @@ -4072,8 +4071,7 @@ components: - code properties: status: - enum: - - 500 + const: 500 type: integer description: HTTP status code code: @@ -4100,8 +4098,7 @@ components: - code properties: status: - enum: - - 400 + const: 400 type: integer description: HTTP status code code: @@ -4178,8 +4175,7 @@ components: - code properties: status: - enum: - - 501 + const: 501 type: integer description: HTTP status code code: @@ -4404,8 +4400,7 @@ components: properties: customerType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL description: Customer type fullName: type: string @@ -4436,8 +4431,7 @@ components: properties: customerType: type: string - enum: - - BUSINESS + const: BUSINESS description: Customer type umaAddress: type: string @@ -4472,8 +4466,7 @@ components: - code properties: status: - enum: - - 409 + const: 409 type: integer description: HTTP status code code: @@ -4500,8 +4493,7 @@ components: - code properties: status: - enum: - - 404 + const: 404 type: integer description: HTTP status code code: @@ -4577,9 +4569,24 @@ components: example: 12550 currency: $ref: '#/components/schemas/Currency' + ClabeAccountInfo: + type: object + required: + - accountType + - clabeNumber + properties: + accountType: + const: CLABE + example: CLABE + clabeNumber: + type: string + description: 18-digit CLABE number (Mexican banking standard) + example: '123456789012345678' + minLength: 18 + maxLength: 18 + pattern: ^[0-9]{18}$ PaymentClabeAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/ClabeAccountInfo' required: - reference @@ -4588,28 +4595,6 @@ components: type: string description: Unique reference code that must be included with the payment to properly credit it example: UMA-Q12345-REF - PaymentAccountOrWalletInfo: - type: object - required: - - accountType - properties: - accountType: - $ref: '#/components/schemas/BankAccountOrWalletType' - discriminator: - propertyName: accountType - mapping: - CLABE: '#/components/schemas/PaymentClabeAccountInfo' - US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' - PIX: '#/components/schemas/PaymentPixAccountInfo' - IBAN: '#/components/schemas/PaymentIbanAccountInfo' - FBO: '#/components/schemas/PaymentFboAccountInfo' - UPI: '#/components/schemas/PaymentUpiAccountInfo' - NGN_ACCOUNT: '#/components/schemas/PaymentNgnAccountInfo' - SPARK_WALLET: '#/components/schemas/PaymentSparkWalletInfo' - LIGHTNING: '#/components/schemas/PaymentLightningInvoiceInfo' - SOLANA_WALLET: '#/components/schemas/PaymentSolanaWalletInfo' - TRON_WALLET: '#/components/schemas/PaymentTronWalletInfo' - POLYGON_WALLET: '#/components/schemas/PaymentPolygonWalletInfo' UsAccountInfo: type: object required: @@ -4619,9 +4604,7 @@ components: - accountCategory properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT accountNumber: type: string @@ -4647,7 +4630,6 @@ components: example: Chase Bank PaymentUsAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/UsAccountInfo' required: - reference @@ -4665,9 +4647,7 @@ components: - taxId properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX pixKey: type: string @@ -4689,7 +4669,6 @@ components: example: '1234567890' PaymentPixAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/PixAccountInfo' IbanAccountInfo: type: object @@ -4699,9 +4678,7 @@ components: - swiftBic properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN iban: type: string @@ -4717,7 +4694,6 @@ components: maxLength: 11 PaymentIbanAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/IbanAccountInfo' required: - reference @@ -4728,12 +4704,15 @@ components: example: UMA-Q12345-REF PaymentFboAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - type: object required: + - accountType - paymentUrl - paymentMethod properties: + accountType: + const: FBO + example: FBO paymentUrl: type: string format: uri @@ -4753,9 +4732,7 @@ components: - vpa properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI vpa: type: string @@ -4763,8 +4740,36 @@ components: example: somecustomers@okbank PaymentUpiAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/UpiAccountInfo' + SparkWalletInfo: + type: object + required: + - accountType + - address + properties: + accountType: + const: SPARK_WALLET + example: SPARK_WALLET + address: + type: string + description: Spark wallet address + example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu + PaymentSparkWalletInfo: + allOf: + - $ref: '#/components/schemas/SparkWalletInfo' + required: + - assetType + properties: + assetType: + type: string + description: Type of asset + enum: + - BTC + - USDB + invoice: + type: string + description: Invoice for the payment + example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s NgnAccountInfo: type: object required: @@ -4773,9 +4778,7 @@ components: - bankName properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT accountNumber: type: string @@ -4790,7 +4793,6 @@ components: example: First Bank of Nigeria PaymentNgnAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/NgnAccountInfo' required: - reference @@ -4799,38 +4801,6 @@ components: type: string description: Unique reference code that must be included with the payment to properly credit it example: UMA-Q12345-REF - SparkWalletInfo: - type: object - required: - - accountType - - address - properties: - accountType: - type: string - enum: - - SPARK_WALLET - example: SPARK_WALLET - address: - type: string - description: Spark wallet address - example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - PaymentSparkWalletInfo: - allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - - $ref: '#/components/schemas/SparkWalletInfo' - required: - - assetType - properties: - assetType: - type: string - description: Type of asset - enum: - - BTC - - USDB - invoice: - type: string - description: Invoice for the payment - example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s PaymentLightningInvoiceInfo: allOf: - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' @@ -4839,9 +4809,7 @@ components: - invoice properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING invoice: type: string @@ -4854,9 +4822,7 @@ components: - address properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET address: type: string @@ -4864,7 +4830,6 @@ components: example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg PaymentSolanaWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/SolanaWalletInfo' properties: assetType: @@ -4880,9 +4845,7 @@ components: - address properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET address: type: string @@ -4890,14 +4853,12 @@ components: example: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL PaymentTronWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/TronWalletInfo' properties: assetType: type: string description: Type of asset - enum: - - USDT + const: USDT PolygonWalletInfo: type: object required: @@ -4905,9 +4866,7 @@ components: - address properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET address: type: string @@ -4915,14 +4874,12 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentPolygonWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/PolygonWalletInfo' properties: assetType: type: string description: Type of asset - enum: - - USDC + const: USDC BankAccountOrWalletType: type: string enum: @@ -4940,24 +4897,28 @@ components: - POLYGON_WALLET - BASE_WALLET description: Type of account or wallet information - ClabeAccountInfo: + PaymentAccountOrWalletInfo: type: object required: - accountType - - clabeNumber properties: accountType: - type: string - enum: - - CLABE - example: CLABE - clabeNumber: - type: string - description: 18-digit CLABE number (Mexican banking standard) - example: '123456789012345678' - minLength: 18 - maxLength: 18 - pattern: ^[0-9]{18}$ + $ref: '#/components/schemas/BankAccountOrWalletType' + discriminator: + propertyName: accountType + mapping: + CLABE: '#/components/schemas/PaymentClabeAccountInfo' + US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' + PIX: '#/components/schemas/PaymentPixAccountInfo' + IBAN: '#/components/schemas/PaymentIbanAccountInfo' + FBO: '#/components/schemas/PaymentFboAccountInfo' + UPI: '#/components/schemas/PaymentUpiAccountInfo' + NGN_ACCOUNT: '#/components/schemas/PaymentNgnAccountInfo' + SPARK_WALLET: '#/components/schemas/PaymentSparkWalletInfo' + LIGHTNING: '#/components/schemas/PaymentLightningInvoiceInfo' + SOLANA_WALLET: '#/components/schemas/PaymentSolanaWalletInfo' + TRON_WALLET: '#/components/schemas/PaymentTronWalletInfo' + POLYGON_WALLET: '#/components/schemas/PaymentPolygonWalletInfo' BaseWalletInfo: type: object required: @@ -4965,9 +4926,7 @@ components: - address properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET address: type: string @@ -4975,14 +4934,12 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentBaseWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/BaseWalletInfo' properties: assetType: type: string description: Type of asset - enum: - - USDC + const: USDC PaymentInstructions: type: object required: @@ -5085,8 +5042,7 @@ components: properties: beneficiaryType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL example: INDIVIDUAL fullName: type: string @@ -5111,8 +5067,7 @@ components: properties: beneficiaryType: type: string - enum: - - BUSINESS + const: BUSINESS example: BUSINESS legalName: type: string @@ -5137,9 +5092,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT beneficiary: oneOf: @@ -5158,9 +5111,7 @@ components: - accountType properties: accountType: - type: string - enum: - - CLABE + const: CLABE example: CLABE beneficiary: oneOf: @@ -5179,9 +5130,7 @@ components: - accountType properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX beneficiary: oneOf: @@ -5200,9 +5149,7 @@ components: - accountType properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN beneficiary: oneOf: @@ -5221,9 +5168,7 @@ components: - accountType properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI beneficiary: oneOf: @@ -5244,9 +5189,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT beneficiary: oneOf: @@ -5282,9 +5225,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SPARK_WALLET + const: SPARK_WALLET example: SPARK_WALLET LightningExternalAccountInfo: allOf: @@ -5293,9 +5234,7 @@ components: - accountType properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING - oneOf: - title: Lightning Invoice @@ -5333,9 +5272,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET TronWalletExternalAccountInfo: allOf: @@ -5345,9 +5282,7 @@ components: - accountType properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET PolygonWalletExternalAccountInfo: allOf: @@ -5357,9 +5292,7 @@ components: - accountType properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET BaseWalletExternalAccountInfo: allOf: @@ -5369,9 +5302,7 @@ components: - accountType properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET ExternalAccountInfo: oneOf: @@ -5951,8 +5882,7 @@ components: - code properties: status: - enum: - - 412 + const: 412 type: integer description: HTTP status code code: @@ -5961,8 +5891,7 @@ components: | Error Code | Description | |------------|-------------| | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version | - enum: - - UNSUPPORTED_UMA_VERSION + const: UNSUPPORTED_UMA_VERSION message: type: string description: Error message @@ -5977,8 +5906,7 @@ components: - code properties: status: - enum: - - 424 + const: 424 type: integer description: HTTP status code code: @@ -6403,8 +6331,7 @@ components: - code properties: status: - enum: - - 403 + const: 403 type: integer description: HTTP status code code: @@ -6619,8 +6546,7 @@ components: $ref: '#/components/schemas/UmaInvitation' type: type: string - enum: - - INVITATION_CLAIMED + const: INVITATION_CLAIMED description: Type of webhook event example: INVITATION_CLAIMED KycStatusWebhook: diff --git a/openapi.yaml b/openapi.yaml index c8ef1d7..1fff25b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4044,8 +4044,7 @@ components: - code properties: status: - enum: - - 401 + const: 401 type: integer description: HTTP status code code: @@ -4072,8 +4071,7 @@ components: - code properties: status: - enum: - - 500 + const: 500 type: integer description: HTTP status code code: @@ -4100,8 +4098,7 @@ components: - code properties: status: - enum: - - 400 + const: 400 type: integer description: HTTP status code code: @@ -4178,8 +4175,7 @@ components: - code properties: status: - enum: - - 501 + const: 501 type: integer description: HTTP status code code: @@ -4404,8 +4400,7 @@ components: properties: customerType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL description: Customer type fullName: type: string @@ -4436,8 +4431,7 @@ components: properties: customerType: type: string - enum: - - BUSINESS + const: BUSINESS description: Customer type umaAddress: type: string @@ -4472,8 +4466,7 @@ components: - code properties: status: - enum: - - 409 + const: 409 type: integer description: HTTP status code code: @@ -4500,8 +4493,7 @@ components: - code properties: status: - enum: - - 404 + const: 404 type: integer description: HTTP status code code: @@ -4577,9 +4569,24 @@ components: example: 12550 currency: $ref: '#/components/schemas/Currency' + ClabeAccountInfo: + type: object + required: + - accountType + - clabeNumber + properties: + accountType: + const: CLABE + example: CLABE + clabeNumber: + type: string + description: 18-digit CLABE number (Mexican banking standard) + example: '123456789012345678' + minLength: 18 + maxLength: 18 + pattern: ^[0-9]{18}$ PaymentClabeAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/ClabeAccountInfo' required: - reference @@ -4588,28 +4595,6 @@ components: type: string description: Unique reference code that must be included with the payment to properly credit it example: UMA-Q12345-REF - PaymentAccountOrWalletInfo: - type: object - required: - - accountType - properties: - accountType: - $ref: '#/components/schemas/BankAccountOrWalletType' - discriminator: - propertyName: accountType - mapping: - CLABE: '#/components/schemas/PaymentClabeAccountInfo' - US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' - PIX: '#/components/schemas/PaymentPixAccountInfo' - IBAN: '#/components/schemas/PaymentIbanAccountInfo' - FBO: '#/components/schemas/PaymentFboAccountInfo' - UPI: '#/components/schemas/PaymentUpiAccountInfo' - NGN_ACCOUNT: '#/components/schemas/PaymentNgnAccountInfo' - SPARK_WALLET: '#/components/schemas/PaymentSparkWalletInfo' - LIGHTNING: '#/components/schemas/PaymentLightningInvoiceInfo' - SOLANA_WALLET: '#/components/schemas/PaymentSolanaWalletInfo' - TRON_WALLET: '#/components/schemas/PaymentTronWalletInfo' - POLYGON_WALLET: '#/components/schemas/PaymentPolygonWalletInfo' UsAccountInfo: type: object required: @@ -4619,9 +4604,7 @@ components: - accountCategory properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT accountNumber: type: string @@ -4647,7 +4630,6 @@ components: example: Chase Bank PaymentUsAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/UsAccountInfo' required: - reference @@ -4665,9 +4647,7 @@ components: - taxId properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX pixKey: type: string @@ -4689,7 +4669,6 @@ components: example: '1234567890' PaymentPixAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/PixAccountInfo' IbanAccountInfo: type: object @@ -4699,9 +4678,7 @@ components: - swiftBic properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN iban: type: string @@ -4717,7 +4694,6 @@ components: maxLength: 11 PaymentIbanAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/IbanAccountInfo' required: - reference @@ -4728,12 +4704,15 @@ components: example: UMA-Q12345-REF PaymentFboAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - type: object required: + - accountType - paymentUrl - paymentMethod properties: + accountType: + const: FBO + example: FBO paymentUrl: type: string format: uri @@ -4753,9 +4732,7 @@ components: - vpa properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI vpa: type: string @@ -4763,8 +4740,36 @@ components: example: somecustomers@okbank PaymentUpiAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/UpiAccountInfo' + SparkWalletInfo: + type: object + required: + - accountType + - address + properties: + accountType: + const: SPARK_WALLET + example: SPARK_WALLET + address: + type: string + description: Spark wallet address + example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu + PaymentSparkWalletInfo: + allOf: + - $ref: '#/components/schemas/SparkWalletInfo' + required: + - assetType + properties: + assetType: + type: string + description: Type of asset + enum: + - BTC + - USDB + invoice: + type: string + description: Invoice for the payment + example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s NgnAccountInfo: type: object required: @@ -4773,9 +4778,7 @@ components: - bankName properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT accountNumber: type: string @@ -4790,7 +4793,6 @@ components: example: First Bank of Nigeria PaymentNgnAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/NgnAccountInfo' required: - reference @@ -4799,38 +4801,6 @@ components: type: string description: Unique reference code that must be included with the payment to properly credit it example: UMA-Q12345-REF - SparkWalletInfo: - type: object - required: - - accountType - - address - properties: - accountType: - type: string - enum: - - SPARK_WALLET - example: SPARK_WALLET - address: - type: string - description: Spark wallet address - example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - PaymentSparkWalletInfo: - allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - - $ref: '#/components/schemas/SparkWalletInfo' - required: - - assetType - properties: - assetType: - type: string - description: Type of asset - enum: - - BTC - - USDB - invoice: - type: string - description: Invoice for the payment - example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s PaymentLightningInvoiceInfo: allOf: - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' @@ -4839,9 +4809,7 @@ components: - invoice properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING invoice: type: string @@ -4854,9 +4822,7 @@ components: - address properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET address: type: string @@ -4864,7 +4830,6 @@ components: example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg PaymentSolanaWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/SolanaWalletInfo' properties: assetType: @@ -4880,9 +4845,7 @@ components: - address properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET address: type: string @@ -4890,14 +4853,12 @@ components: example: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL PaymentTronWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/TronWalletInfo' properties: assetType: type: string description: Type of asset - enum: - - USDT + const: USDT PolygonWalletInfo: type: object required: @@ -4905,9 +4866,7 @@ components: - address properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET address: type: string @@ -4915,14 +4874,12 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentPolygonWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/PolygonWalletInfo' properties: assetType: type: string description: Type of asset - enum: - - USDC + const: USDC BankAccountOrWalletType: type: string enum: @@ -4940,24 +4897,28 @@ components: - POLYGON_WALLET - BASE_WALLET description: Type of account or wallet information - ClabeAccountInfo: + PaymentAccountOrWalletInfo: type: object required: - accountType - - clabeNumber properties: accountType: - type: string - enum: - - CLABE - example: CLABE - clabeNumber: - type: string - description: 18-digit CLABE number (Mexican banking standard) - example: '123456789012345678' - minLength: 18 - maxLength: 18 - pattern: ^[0-9]{18}$ + $ref: '#/components/schemas/BankAccountOrWalletType' + discriminator: + propertyName: accountType + mapping: + CLABE: '#/components/schemas/PaymentClabeAccountInfo' + US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' + PIX: '#/components/schemas/PaymentPixAccountInfo' + IBAN: '#/components/schemas/PaymentIbanAccountInfo' + FBO: '#/components/schemas/PaymentFboAccountInfo' + UPI: '#/components/schemas/PaymentUpiAccountInfo' + NGN_ACCOUNT: '#/components/schemas/PaymentNgnAccountInfo' + SPARK_WALLET: '#/components/schemas/PaymentSparkWalletInfo' + LIGHTNING: '#/components/schemas/PaymentLightningInvoiceInfo' + SOLANA_WALLET: '#/components/schemas/PaymentSolanaWalletInfo' + TRON_WALLET: '#/components/schemas/PaymentTronWalletInfo' + POLYGON_WALLET: '#/components/schemas/PaymentPolygonWalletInfo' BaseWalletInfo: type: object required: @@ -4965,9 +4926,7 @@ components: - address properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET address: type: string @@ -4975,14 +4934,12 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentBaseWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/BaseWalletInfo' properties: assetType: type: string description: Type of asset - enum: - - USDC + const: USDC PaymentInstructions: type: object required: @@ -5085,8 +5042,7 @@ components: properties: beneficiaryType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL example: INDIVIDUAL fullName: type: string @@ -5111,8 +5067,7 @@ components: properties: beneficiaryType: type: string - enum: - - BUSINESS + const: BUSINESS example: BUSINESS legalName: type: string @@ -5137,9 +5092,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT beneficiary: oneOf: @@ -5158,9 +5111,7 @@ components: - accountType properties: accountType: - type: string - enum: - - CLABE + const: CLABE example: CLABE beneficiary: oneOf: @@ -5179,9 +5130,7 @@ components: - accountType properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX beneficiary: oneOf: @@ -5200,9 +5149,7 @@ components: - accountType properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN beneficiary: oneOf: @@ -5221,9 +5168,7 @@ components: - accountType properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI beneficiary: oneOf: @@ -5244,9 +5189,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT beneficiary: oneOf: @@ -5282,9 +5225,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SPARK_WALLET + const: SPARK_WALLET example: SPARK_WALLET LightningExternalAccountInfo: allOf: @@ -5293,9 +5234,7 @@ components: - accountType properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING - oneOf: - title: Lightning Invoice @@ -5333,9 +5272,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET TronWalletExternalAccountInfo: allOf: @@ -5345,9 +5282,7 @@ components: - accountType properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET PolygonWalletExternalAccountInfo: allOf: @@ -5357,9 +5292,7 @@ components: - accountType properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET BaseWalletExternalAccountInfo: allOf: @@ -5369,9 +5302,7 @@ components: - accountType properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET ExternalAccountInfo: oneOf: @@ -5951,8 +5882,7 @@ components: - code properties: status: - enum: - - 412 + const: 412 type: integer description: HTTP status code code: @@ -5961,8 +5891,7 @@ components: | Error Code | Description | |------------|-------------| | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version | - enum: - - UNSUPPORTED_UMA_VERSION + const: UNSUPPORTED_UMA_VERSION message: type: string description: Error message @@ -5977,8 +5906,7 @@ components: - code properties: status: - enum: - - 424 + const: 424 type: integer description: HTTP status code code: @@ -6403,8 +6331,7 @@ components: - code properties: status: - enum: - - 403 + const: 403 type: integer description: HTTP status code code: @@ -6619,8 +6546,7 @@ components: $ref: '#/components/schemas/UmaInvitation' type: type: string - enum: - - INVITATION_CLAIMED + const: INVITATION_CLAIMED description: Type of webhook event example: INVITATION_CLAIMED KycStatusWebhook: diff --git a/openapi/components/schemas/common/BaseWalletInfo.yaml b/openapi/components/schemas/common/BaseWalletInfo.yaml index 8b0b2ec..e1935ea 100644 --- a/openapi/components/schemas/common/BaseWalletInfo.yaml +++ b/openapi/components/schemas/common/BaseWalletInfo.yaml @@ -4,8 +4,7 @@ required: - address properties: accountType: - type: string - enum: [BASE_WALLET] + const: BASE_WALLET example: BASE_WALLET address: type: string diff --git a/openapi/components/schemas/common/ClabeAccountInfo.yaml b/openapi/components/schemas/common/ClabeAccountInfo.yaml index 614eb48..42d31a2 100644 --- a/openapi/components/schemas/common/ClabeAccountInfo.yaml +++ b/openapi/components/schemas/common/ClabeAccountInfo.yaml @@ -4,8 +4,7 @@ required: - clabeNumber properties: accountType: - type: string - enum: [CLABE] + const: CLABE example: CLABE clabeNumber: type: string diff --git a/openapi/components/schemas/common/FboAccountInfo.yaml b/openapi/components/schemas/common/FboAccountInfo.yaml index 7152d82..6f5925f 100644 --- a/openapi/components/schemas/common/FboAccountInfo.yaml +++ b/openapi/components/schemas/common/FboAccountInfo.yaml @@ -4,8 +4,7 @@ required: - currencyCode properties: accountType: - type: string - enum: [FBO] + const: FBO example: FBO currencyCode: type: string diff --git a/openapi/components/schemas/common/IbanAccountInfo.yaml b/openapi/components/schemas/common/IbanAccountInfo.yaml index ed03513..a4eaab0 100644 --- a/openapi/components/schemas/common/IbanAccountInfo.yaml +++ b/openapi/components/schemas/common/IbanAccountInfo.yaml @@ -5,8 +5,7 @@ required: - swiftBic properties: accountType: - type: string - enum: [IBAN] + const: IBAN example: IBAN iban: type: string diff --git a/openapi/components/schemas/common/NgnAccountInfo.yaml b/openapi/components/schemas/common/NgnAccountInfo.yaml index 3c69767..de6f39d 100644 --- a/openapi/components/schemas/common/NgnAccountInfo.yaml +++ b/openapi/components/schemas/common/NgnAccountInfo.yaml @@ -5,8 +5,7 @@ required: - bankName properties: accountType: - type: string - enum: [NGN_ACCOUNT] + const: NGN_ACCOUNT example: NGN_ACCOUNT accountNumber: type: string diff --git a/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml b/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml index e422dbb..422cddb 100644 --- a/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml @@ -1,9 +1,7 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./BaseWalletInfo.yaml properties: assetType: type: string description: Type of asset - enum: - - USDC \ No newline at end of file + const: USDC \ No newline at end of file diff --git a/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml b/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml index f43faba..0b19558 100644 --- a/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml @@ -1,5 +1,4 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./ClabeAccountInfo.yaml required: - reference diff --git a/openapi/components/schemas/common/PaymentFboAccountInfo.yaml b/openapi/components/schemas/common/PaymentFboAccountInfo.yaml index 4aa9a2a..5597556 100644 --- a/openapi/components/schemas/common/PaymentFboAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentFboAccountInfo.yaml @@ -1,10 +1,13 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - type: object required: + - accountType - paymentUrl - paymentMethod properties: + accountType: + const: FBO + example: FBO paymentUrl: type: string format: uri diff --git a/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml b/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml index 81c8fe7..76315f5 100644 --- a/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml @@ -1,5 +1,4 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./IbanAccountInfo.yaml required: - reference diff --git a/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml b/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml index f3998ec..514e4bd 100644 --- a/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml +++ b/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml @@ -5,8 +5,7 @@ required: - invoice properties: accountType: - type: string - enum: [LIGHTNING] + const: LIGHTNING example: LIGHTNING invoice: type: string diff --git a/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml b/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml index 5cbe02b..587f52a 100644 --- a/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml @@ -1,5 +1,4 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./NgnAccountInfo.yaml required: - reference diff --git a/openapi/components/schemas/common/PaymentPixAccountInfo.yaml b/openapi/components/schemas/common/PaymentPixAccountInfo.yaml index 24c3262..a586649 100644 --- a/openapi/components/schemas/common/PaymentPixAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentPixAccountInfo.yaml @@ -1,3 +1,2 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./PixAccountInfo.yaml diff --git a/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml b/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml index 059424e..1bd4efa 100644 --- a/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml @@ -1,9 +1,7 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./PolygonWalletInfo.yaml properties: assetType: type: string description: Type of asset - enum: - - USDC \ No newline at end of file + const: USDC \ No newline at end of file diff --git a/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml b/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml index a344b2a..bc9e7f8 100644 --- a/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml @@ -1,5 +1,4 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./SolanaWalletInfo.yaml properties: assetType: diff --git a/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml b/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml index 7933ff4..2b0cbe6 100644 --- a/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml @@ -1,5 +1,4 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./SparkWalletInfo.yaml required: - assetType diff --git a/openapi/components/schemas/common/PaymentTronWalletInfo.yaml b/openapi/components/schemas/common/PaymentTronWalletInfo.yaml index 60ede12..4aa2cc9 100644 --- a/openapi/components/schemas/common/PaymentTronWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentTronWalletInfo.yaml @@ -1,9 +1,7 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./TronWalletInfo.yaml properties: assetType: type: string description: Type of asset - enum: - - USDT \ No newline at end of file + const: USDT \ No newline at end of file diff --git a/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml b/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml index 6f03983..0dc0366 100644 --- a/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml @@ -1,3 +1,2 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./UpiAccountInfo.yaml diff --git a/openapi/components/schemas/common/PaymentUsAccountInfo.yaml b/openapi/components/schemas/common/PaymentUsAccountInfo.yaml index 738d09b..c03cbce 100644 --- a/openapi/components/schemas/common/PaymentUsAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentUsAccountInfo.yaml @@ -1,5 +1,4 @@ allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml - $ref: ./UsAccountInfo.yaml required: - reference diff --git a/openapi/components/schemas/common/PixAccountInfo.yaml b/openapi/components/schemas/common/PixAccountInfo.yaml index 2bc15d0..7225c75 100644 --- a/openapi/components/schemas/common/PixAccountInfo.yaml +++ b/openapi/components/schemas/common/PixAccountInfo.yaml @@ -6,8 +6,7 @@ required: - taxId properties: accountType: - type: string - enum: [PIX] + const: PIX example: PIX pixKey: type: string diff --git a/openapi/components/schemas/common/PolygonWalletInfo.yaml b/openapi/components/schemas/common/PolygonWalletInfo.yaml index 5542aa4..050c876 100644 --- a/openapi/components/schemas/common/PolygonWalletInfo.yaml +++ b/openapi/components/schemas/common/PolygonWalletInfo.yaml @@ -4,8 +4,7 @@ required: - address properties: accountType: - type: string - enum: [POLYGON_WALLET] + const: POLYGON_WALLET example: POLYGON_WALLET address: type: string diff --git a/openapi/components/schemas/common/SolanaWalletInfo.yaml b/openapi/components/schemas/common/SolanaWalletInfo.yaml index 352b350..727c36b 100644 --- a/openapi/components/schemas/common/SolanaWalletInfo.yaml +++ b/openapi/components/schemas/common/SolanaWalletInfo.yaml @@ -4,8 +4,7 @@ required: - address properties: accountType: - type: string - enum: [SOLANA_WALLET] + const: SOLANA_WALLET example: SOLANA_WALLET address: type: string diff --git a/openapi/components/schemas/common/SparkWalletInfo.yaml b/openapi/components/schemas/common/SparkWalletInfo.yaml index f1a33d6..713c453 100644 --- a/openapi/components/schemas/common/SparkWalletInfo.yaml +++ b/openapi/components/schemas/common/SparkWalletInfo.yaml @@ -4,8 +4,7 @@ required: - address properties: accountType: - type: string - enum: [SPARK_WALLET] + const: SPARK_WALLET example: SPARK_WALLET address: type: string diff --git a/openapi/components/schemas/common/TronWalletInfo.yaml b/openapi/components/schemas/common/TronWalletInfo.yaml index e2965b8..05fe9ce 100644 --- a/openapi/components/schemas/common/TronWalletInfo.yaml +++ b/openapi/components/schemas/common/TronWalletInfo.yaml @@ -4,8 +4,7 @@ required: - address properties: accountType: - type: string - enum: [TRON_WALLET] + const: TRON_WALLET example: TRON_WALLET address: type: string diff --git a/openapi/components/schemas/common/UpiAccountInfo.yaml b/openapi/components/schemas/common/UpiAccountInfo.yaml index 6c5136c..7a074cb 100644 --- a/openapi/components/schemas/common/UpiAccountInfo.yaml +++ b/openapi/components/schemas/common/UpiAccountInfo.yaml @@ -4,8 +4,7 @@ required: - vpa properties: accountType: - type: string - enum: [UPI] + const: UPI example: UPI vpa: type: string diff --git a/openapi/components/schemas/common/UsAccountInfo.yaml b/openapi/components/schemas/common/UsAccountInfo.yaml index ecc1e50..3fb9704 100644 --- a/openapi/components/schemas/common/UsAccountInfo.yaml +++ b/openapi/components/schemas/common/UsAccountInfo.yaml @@ -6,8 +6,7 @@ required: - accountCategory properties: accountType: - type: string - enum: [US_ACCOUNT] + const: US_ACCOUNT example: US_ACCOUNT accountNumber: type: string diff --git a/openapi/components/schemas/customers/BusinessCustomerUpdate.yaml b/openapi/components/schemas/customers/BusinessCustomerUpdate.yaml index b146b34..70f8b6d 100644 --- a/openapi/components/schemas/customers/BusinessCustomerUpdate.yaml +++ b/openapi/components/schemas/customers/BusinessCustomerUpdate.yaml @@ -4,7 +4,7 @@ required: properties: customerType: type: string - enum: [BUSINESS] + const: BUSINESS description: Customer type umaAddress: type: string diff --git a/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml b/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml index 2a095cb..03f2f08 100644 --- a/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml +++ b/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml @@ -4,7 +4,7 @@ required: properties: customerType: type: string - enum: [INDIVIDUAL] + const: INDIVIDUAL description: Customer type fullName: type: string diff --git a/openapi/components/schemas/errors/Error400.yaml b/openapi/components/schemas/errors/Error400.yaml index 960e8ce..7a7e69c 100644 --- a/openapi/components/schemas/errors/Error400.yaml +++ b/openapi/components/schemas/errors/Error400.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 400 + const: 400 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error401.yaml b/openapi/components/schemas/errors/Error401.yaml index a7499ae..dc367d8 100644 --- a/openapi/components/schemas/errors/Error401.yaml +++ b/openapi/components/schemas/errors/Error401.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 401 + const: 401 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error403.yaml b/openapi/components/schemas/errors/Error403.yaml index b9e6524..520dea4 100644 --- a/openapi/components/schemas/errors/Error403.yaml +++ b/openapi/components/schemas/errors/Error403.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 403 + const: 403 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error404.yaml b/openapi/components/schemas/errors/Error404.yaml index 4b3f19a..055b9ca 100644 --- a/openapi/components/schemas/errors/Error404.yaml +++ b/openapi/components/schemas/errors/Error404.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 404 + const: 404 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error409.yaml b/openapi/components/schemas/errors/Error409.yaml index 5624f0b..a529e0f 100644 --- a/openapi/components/schemas/errors/Error409.yaml +++ b/openapi/components/schemas/errors/Error409.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 409 + const: 409 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error412.yaml b/openapi/components/schemas/errors/Error412.yaml index 9d199db..923d19d 100644 --- a/openapi/components/schemas/errors/Error412.yaml +++ b/openapi/components/schemas/errors/Error412.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 412 + const: 412 type: integer description: HTTP status code code: @@ -15,8 +14,7 @@ properties: | Error Code | Description | |------------|-------------| | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version | - enum: - - UNSUPPORTED_UMA_VERSION + const: UNSUPPORTED_UMA_VERSION message: type: string description: Error message diff --git a/openapi/components/schemas/errors/Error424.yaml b/openapi/components/schemas/errors/Error424.yaml index d95d3b3..6d60cf3 100644 --- a/openapi/components/schemas/errors/Error424.yaml +++ b/openapi/components/schemas/errors/Error424.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 424 + const: 424 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error500.yaml b/openapi/components/schemas/errors/Error500.yaml index 2546020..d077e25 100644 --- a/openapi/components/schemas/errors/Error500.yaml +++ b/openapi/components/schemas/errors/Error500.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 500 + const: 500 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/errors/Error501.yaml b/openapi/components/schemas/errors/Error501.yaml index 4db1fbb..3c46735 100644 --- a/openapi/components/schemas/errors/Error501.yaml +++ b/openapi/components/schemas/errors/Error501.yaml @@ -5,8 +5,7 @@ required: - code properties: status: - enum: - - 501 + const: 501 type: integer description: HTTP status code code: diff --git a/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml index bc44159..ceb26ba 100644 --- a/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml @@ -5,6 +5,5 @@ allOf: - accountType properties: accountType: - type: string - enum: [BASE_WALLET] + const: BASE_WALLET example: BASE_WALLET diff --git a/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml b/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml index 7890d72..10ddea3 100644 --- a/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml +++ b/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml @@ -5,7 +5,7 @@ required: properties: beneficiaryType: type: string - enum: [BUSINESS] + const: BUSINESS example: BUSINESS legalName: type: string diff --git a/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml index 44ac20e..85f7c2e 100644 --- a/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml @@ -5,8 +5,7 @@ allOf: - accountType properties: accountType: - type: string - enum: [CLABE] + const: CLABE example: CLABE beneficiary: oneOf: diff --git a/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml index 4a6af4a..2626895 100644 --- a/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml @@ -5,8 +5,7 @@ allOf: - accountType properties: accountType: - type: string - enum: [IBAN] + const: IBAN example: IBAN beneficiary: oneOf: diff --git a/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml b/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml index a5c2e09..6a86b51 100644 --- a/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml +++ b/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml @@ -7,7 +7,7 @@ required: properties: beneficiaryType: type: string - enum: [INDIVIDUAL] + const: INDIVIDUAL example: INDIVIDUAL fullName: type: string diff --git a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml index f52bacf..7924add 100644 --- a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml @@ -4,8 +4,7 @@ allOf: - accountType properties: accountType: - type: string - enum: [LIGHTNING] + const: LIGHTNING example: LIGHTNING - oneOf: - title: Lightning Invoice diff --git a/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml index 4f4c32e..1fc8848 100644 --- a/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml @@ -7,8 +7,7 @@ allOf: - beneficiary properties: accountType: - type: string - enum: [NGN_ACCOUNT] + const: NGN_ACCOUNT example: NGN_ACCOUNT beneficiary: oneOf: diff --git a/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml index e8a8ea3..6c014b2 100644 --- a/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml @@ -5,8 +5,7 @@ allOf: - accountType properties: accountType: - type: string - enum: [PIX] + const: PIX example: PIX beneficiary: oneOf: diff --git a/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml index d652383..c864ab9 100644 --- a/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml @@ -5,6 +5,5 @@ allOf: - accountType properties: accountType: - type: string - enum: [POLYGON_WALLET] + const: POLYGON_WALLET example: POLYGON_WALLET diff --git a/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml index 15dd852..5de4d3e 100644 --- a/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml @@ -5,6 +5,5 @@ allOf: - accountType properties: accountType: - type: string - enum: [SOLANA_WALLET] + const: SOLANA_WALLET example: SOLANA_WALLET diff --git a/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml index 26b81c1..aa9c65f 100644 --- a/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml @@ -5,6 +5,5 @@ allOf: - accountType properties: accountType: - type: string - enum: [SPARK_WALLET] + const: SPARK_WALLET example: SPARK_WALLET diff --git a/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml index 22bad0e..a58b842 100644 --- a/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml @@ -5,6 +5,5 @@ allOf: - accountType properties: accountType: - type: string - enum: [TRON_WALLET] + const: TRON_WALLET example: TRON_WALLET diff --git a/openapi/components/schemas/external_accounts/UpiAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/UpiAccountExternalAccountInfo.yaml index 41f1edf..674bc42 100644 --- a/openapi/components/schemas/external_accounts/UpiAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/UpiAccountExternalAccountInfo.yaml @@ -5,8 +5,7 @@ allOf: - accountType properties: accountType: - type: string - enum: [UPI] + const: UPI example: UPI beneficiary: oneOf: diff --git a/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml index 62c80a1..a5ffadd 100644 --- a/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml @@ -6,8 +6,7 @@ allOf: - beneficiary properties: accountType: - type: string - enum: [US_ACCOUNT] + const: US_ACCOUNT example: US_ACCOUNT beneficiary: oneOf: diff --git a/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml b/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml index ba9236e..a57b766 100644 --- a/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml +++ b/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml @@ -8,7 +8,6 @@ allOf: $ref: ../invitations/UmaInvitation.yaml type: type: string - enum: - - INVITATION_CLAIMED + const: INVITATION_CLAIMED description: Type of webhook event example: INVITATION_CLAIMED From 55c59ec5cbffde2fc3c2fab3682284eb67ddf220 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Thu, 22 Jan 2026 15:46:09 -0800 Subject: [PATCH 02/10] fixing lightning external account discriminator --- mintlify/openapi.yaml | 14 ++++++++++++++ openapi.yaml | 14 ++++++++++++++ .../LightningExternalAccountInfo.yaml | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 1fff25b..1637b17 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -5240,8 +5240,12 @@ components: - title: Lightning Invoice type: object required: + - destinationType - invoice properties: + destinationType: + const: INVOICE + example: INVOICE invoice: type: string description: 1-time use lightning bolt11 invoice payout destination @@ -5249,8 +5253,12 @@ components: - title: Lightning - Bolt12 Offer type: object required: + - destinationType - bolt12 properties: + destinationType: + const: BOLT12 + example: BOLT12 bolt12: type: string description: A bolt12 offer which can be reused as a payment destination @@ -5258,12 +5266,18 @@ components: - title: Lightning Address type: object required: + - destinationType - lightningAddress properties: + destinationType: + const: LIGHTNING_ADDRESS + example: LIGHTNING_ADDRESS lightningAddress: type: string description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. example: john.doe@lightningwallet.com + discriminator: + propertyName: destinationType SolanaWalletExternalAccountInfo: allOf: - $ref: '#/components/schemas/SolanaWalletInfo' diff --git a/openapi.yaml b/openapi.yaml index 1fff25b..1637b17 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5240,8 +5240,12 @@ components: - title: Lightning Invoice type: object required: + - destinationType - invoice properties: + destinationType: + const: INVOICE + example: INVOICE invoice: type: string description: 1-time use lightning bolt11 invoice payout destination @@ -5249,8 +5253,12 @@ components: - title: Lightning - Bolt12 Offer type: object required: + - destinationType - bolt12 properties: + destinationType: + const: BOLT12 + example: BOLT12 bolt12: type: string description: A bolt12 offer which can be reused as a payment destination @@ -5258,12 +5266,18 @@ components: - title: Lightning Address type: object required: + - destinationType - lightningAddress properties: + destinationType: + const: LIGHTNING_ADDRESS + example: LIGHTNING_ADDRESS lightningAddress: type: string description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. example: john.doe@lightningwallet.com + discriminator: + propertyName: destinationType SolanaWalletExternalAccountInfo: allOf: - $ref: '#/components/schemas/SolanaWalletInfo' diff --git a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml index 7924add..cae1b33 100644 --- a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml @@ -10,8 +10,12 @@ allOf: - title: Lightning Invoice type: object required: + - destinationType - invoice properties: + destinationType: + const: INVOICE + example: INVOICE invoice: type: string description: 1-time use lightning bolt11 invoice payout destination @@ -19,8 +23,12 @@ allOf: - title: Lightning - Bolt12 Offer type: object required: + - destinationType - bolt12 properties: + destinationType: + const: BOLT12 + example: BOLT12 bolt12: type: string description: A bolt12 offer which can be reused as a payment destination @@ -28,9 +36,15 @@ allOf: - title: Lightning Address type: object required: + - destinationType - lightningAddress properties: + destinationType: + const: LIGHTNING_ADDRESS + example: LIGHTNING_ADDRESS lightningAddress: type: string description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. example: john.doe@lightningwallet.com + discriminator: + propertyName: destinationType \ No newline at end of file From 6c9c3eabf5b050deefedf134fce43e37d027a0f3 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 12:51:30 -0800 Subject: [PATCH 03/10] more fixes --- mintlify/openapi.yaml | 398 +++++++++--------- openapi.yaml | 398 +++++++++--------- .../customers/CreateCustomerRequest.yaml | 11 + .../customers/IndividualCustomerUpdate.yaml | 4 + .../customers/UpdateCustomerRequest.yaml | 11 + .../LightningExternalAccountInfo.yaml | 69 +-- openapi/components/schemas/quotes/Quote.yaml | 47 +-- .../quotes/QuoteAccountDestination.yaml | 18 + .../schemas/quotes/QuoteAccountSource.yaml | 21 + .../quotes/QuoteRealtimeFundingSource.yaml | 28 ++ .../schemas/quotes/QuoteSource.yaml | 50 +-- .../quotes/QuoteUmaAddressDestination.yaml | 28 ++ .../transactions/AccountDestination.yaml | 19 + .../schemas/transactions/Transaction.yaml | 35 +- .../transactions/UmaAddressDestination.yaml | 18 + openapi/paths/customers/customers.yaml | 50 +-- .../customers/customers_{customerId}.yaml | 11 +- .../internal-accounts/internal_accounts.yaml | 2 +- 18 files changed, 599 insertions(+), 619 deletions(-) create mode 100644 openapi/components/schemas/customers/CreateCustomerRequest.yaml create mode 100644 openapi/components/schemas/customers/UpdateCustomerRequest.yaml create mode 100644 openapi/components/schemas/quotes/QuoteAccountDestination.yaml create mode 100644 openapi/components/schemas/quotes/QuoteAccountSource.yaml create mode 100644 openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml create mode 100644 openapi/components/schemas/quotes/QuoteUmaAddressDestination.yaml create mode 100644 openapi/components/schemas/transactions/AccountDestination.yaml create mode 100644 openapi/components/schemas/transactions/UmaAddressDestination.yaml diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 1637b17..0aff412 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -154,55 +154,7 @@ paths: content: application/json: schema: - oneOf: - - title: New Individual Customer - allOf: - - $ref: '#/components/schemas/IndividualCustomerUpdate' - - type: object - required: - - platformCustomerId - properties: - platformCustomerId: - type: string - description: Platform-specific customer identifier - example: 9f84e0c2a72c4fa - kycUrl: - type: string - description: A KYC URL to be shared with your individual customer if KYC needs to be completed - example: https://example.com/kyc - - title: New Business Customer - allOf: - - $ref: '#/components/schemas/BusinessCustomerUpdate' - - type: object - required: - - platformCustomerId - - businessInfo - properties: - platformCustomerId: - type: string - description: Platform-specific customer identifier - example: 9f84e0c2a72c4fa - kycUrl: - type: string - description: A KYC URL to be shared with your business customer if KYC needs to be completed - example: https://example.com/kyc - businessInfo: - type: object - required: - - legalName - properties: - legalName: - type: string - description: Legal name of the business - example: Acme Corporation, Inc. - registrationNumber: - type: string - description: Business registration number - example: BRN-123456789 - taxId: - type: string - description: Tax identification number - example: EIN-987654321 + $ref: '#/components/schemas/CreateCustomerRequest' examples: individualCustomerWithUmaAddress: summary: Create individual customer with UMA address, including deposit bank account information. @@ -486,16 +438,7 @@ paths: content: application/json: schema: - oneOf: - - title: Update Individual Customer - $ref: '#/components/schemas/IndividualCustomerUpdate' - - title: Update Business Customer - $ref: '#/components/schemas/BusinessCustomerUpdate' - discriminator: - propertyName: customerType - mapping: - INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdate' - BUSINESS: '#/components/schemas/BusinessCustomerUpdate' + $ref: '#/components/schemas/UpdateCustomerRequest' examples: individualUpdate: summary: Update individual customer example @@ -4417,6 +4360,10 @@ components: example: US address: $ref: '#/components/schemas/Address' + platformCustomerId: + type: string + description: Platform-specific customer identifier + example: 9f84e0c2a72c4fa umaAddress: type: string description: | @@ -4458,6 +4405,18 @@ components: type: array items: $ref: '#/components/schemas/UltimateBeneficialOwner' + CreateCustomerRequest: + type: object + required: + - customerType + oneOf: + - $ref: '#/components/schemas/IndividualCustomerUpdate' + - $ref: '#/components/schemas/BusinessCustomerUpdate' + discriminator: + propertyName: customerType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdate' + BUSINESS: '#/components/schemas/BusinessCustomerUpdate' Error409: type: object required: @@ -4536,6 +4495,18 @@ components: details: type: object description: Additional error details + UpdateCustomerRequest: + type: object + required: + - customerType + oneOf: + - $ref: '#/components/schemas/IndividualCustomerUpdate' + - $ref: '#/components/schemas/BusinessCustomerUpdate' + discriminator: + propertyName: customerType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdate' + BUSINESS: '#/components/schemas/BusinessCustomerUpdate' Currency: type: object properties: @@ -5228,56 +5199,25 @@ components: const: SPARK_WALLET example: SPARK_WALLET LightningExternalAccountInfo: - allOf: - - type: object - required: - - accountType - properties: - accountType: - const: LIGHTNING - example: LIGHTNING - - oneOf: - - title: Lightning Invoice - type: object - required: - - destinationType - - invoice - properties: - destinationType: - const: INVOICE - example: INVOICE - invoice: - type: string - description: 1-time use lightning bolt11 invoice payout destination - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs - - title: Lightning - Bolt12 Offer - type: object - required: - - destinationType - - bolt12 - properties: - destinationType: - const: BOLT12 - example: BOLT12 - bolt12: - type: string - description: A bolt12 offer which can be reused as a payment destination - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs - - title: Lightning Address - type: object - required: - - destinationType - - lightningAddress - properties: - destinationType: - const: LIGHTNING_ADDRESS - example: LIGHTNING_ADDRESS - lightningAddress: - type: string - description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. - example: john.doe@lightningwallet.com - discriminator: - propertyName: destinationType + type: object + required: + - accountType + properties: + accountType: + const: LIGHTNING + example: LIGHTNING + invoice: + type: string + description: 1-time use lightning bolt11 invoice payout destination + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + bolt12: + type: string + description: A bolt12 offer which can be reused as a payment destination + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + lightningAddress: + type: string + description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. + example: john.doe@lightningwallet.com SolanaWalletExternalAccountInfo: allOf: - $ref: '#/components/schemas/SolanaWalletInfo' @@ -5492,34 +5432,13 @@ components: $ref: '#/components/schemas/TransactionType' destination: oneOf: - - title: Account Destination - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account - example: EUR - description: Destination account details - - title: UMA Address Destination - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination - example: EUR + - $ref: '#/components/schemas/AccountDestination' + - $ref: '#/components/schemas/UmaAddressDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' customerId: type: string description: System ID of the customer (sender for outgoing, recipient for incoming) @@ -5841,6 +5760,45 @@ components: - REFUNDED - EXPIRED description: Status of a payment transaction + AccountDestination: + type: object + required: + - destinationType + - accountId + - currency + properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account + example: EUR + description: Destination account details + UmaAddressDestination: + type: object + required: + - destinationType + - umaAddress + properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + currency: + type: string + description: Currency code for the destination + example: EUR + description: UMA address destination details CurrencyPreference: type: object required: @@ -5943,37 +5901,102 @@ components: details: type: object description: Additional error details + QuoteAccountSource: + type: object + required: + - sourceType + - accountId + properties: + sourceType: + type: string + const: ACCOUNT + description: Source type identifier + accountId: + type: string + description: Source account identifier + example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + currency: + type: string + description: Currency code for the funding source. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: USD + description: Source account details + QuoteRealtimeFundingSource: + type: object + required: + - sourceType + - currency + - customerId + properties: + sourceType: + type: string + const: REALTIME_FUNDING + description: Source type identifier + 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://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: USD + 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.). QuoteSource: + required: + - sourceType oneOf: - - title: Account - type: object - required: - - accountId - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the funding source. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: USD - description: Source account details - - title: Real-time funding + - $ref: '#/components/schemas/QuoteAccountSource' + - $ref: '#/components/schemas/QuoteRealtimeFundingSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/QuoteAccountSource' + REALTIME_FUNDING: '#/components/schemas/QuoteRealtimeFundingSource' + QuoteAccountDestination: + type: object + required: + - destinationType + - accountId + properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account + example: EUR + description: Destination account details + QuoteUmaAddressDestination: + type: object + required: + - destinationType + - umaAddress + properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + currency: + type: string + description: Currency code for the destination + example: EUR + counterpartyInformation: type: object - required: - - currency - - customerId - properties: - 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://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: USD - 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.). + description: Information about the recipient, as required by the platform in their configuration. + additionalProperties: true + example: + FULL_NAME: Jane Receiver + BIRTH_DATE: '1990-01-01' + NATIONALITY: FR + description: UMA address destination details Quote: type: object required: @@ -6018,43 +6041,16 @@ components: source: $ref: '#/components/schemas/QuoteSource' destination: + required: + - destinationType oneOf: - - title: Account Destination - type: object - required: - - accountId - properties: - accountId: - type: string - description: Destination account identifier - example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account - example: EUR - description: Destination account details - - title: UMA Address Destination - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination - example: EUR - counterpartyInformation: - type: object - description: Information about the recipient, as required by the platform in their configuration. - additionalProperties: true - example: - FULL_NAME: Jane Receiver - BIRTH_DATE: '1990-01-01' - NATIONALITY: FR - description: UMA address destination details + - $ref: '#/components/schemas/QuoteAccountDestination' + - $ref: '#/components/schemas/QuoteUmaAddressDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/QuoteAccountDestination' + UMA_ADDRESS: '#/components/schemas/QuoteUmaAddressDestination' sendingCurrency: $ref: '#/components/schemas/Currency' description: Currency for the sending amount diff --git a/openapi.yaml b/openapi.yaml index 1637b17..0aff412 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -154,55 +154,7 @@ paths: content: application/json: schema: - oneOf: - - title: New Individual Customer - allOf: - - $ref: '#/components/schemas/IndividualCustomerUpdate' - - type: object - required: - - platformCustomerId - properties: - platformCustomerId: - type: string - description: Platform-specific customer identifier - example: 9f84e0c2a72c4fa - kycUrl: - type: string - description: A KYC URL to be shared with your individual customer if KYC needs to be completed - example: https://example.com/kyc - - title: New Business Customer - allOf: - - $ref: '#/components/schemas/BusinessCustomerUpdate' - - type: object - required: - - platformCustomerId - - businessInfo - properties: - platformCustomerId: - type: string - description: Platform-specific customer identifier - example: 9f84e0c2a72c4fa - kycUrl: - type: string - description: A KYC URL to be shared with your business customer if KYC needs to be completed - example: https://example.com/kyc - businessInfo: - type: object - required: - - legalName - properties: - legalName: - type: string - description: Legal name of the business - example: Acme Corporation, Inc. - registrationNumber: - type: string - description: Business registration number - example: BRN-123456789 - taxId: - type: string - description: Tax identification number - example: EIN-987654321 + $ref: '#/components/schemas/CreateCustomerRequest' examples: individualCustomerWithUmaAddress: summary: Create individual customer with UMA address, including deposit bank account information. @@ -486,16 +438,7 @@ paths: content: application/json: schema: - oneOf: - - title: Update Individual Customer - $ref: '#/components/schemas/IndividualCustomerUpdate' - - title: Update Business Customer - $ref: '#/components/schemas/BusinessCustomerUpdate' - discriminator: - propertyName: customerType - mapping: - INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdate' - BUSINESS: '#/components/schemas/BusinessCustomerUpdate' + $ref: '#/components/schemas/UpdateCustomerRequest' examples: individualUpdate: summary: Update individual customer example @@ -4417,6 +4360,10 @@ components: example: US address: $ref: '#/components/schemas/Address' + platformCustomerId: + type: string + description: Platform-specific customer identifier + example: 9f84e0c2a72c4fa umaAddress: type: string description: | @@ -4458,6 +4405,18 @@ components: type: array items: $ref: '#/components/schemas/UltimateBeneficialOwner' + CreateCustomerRequest: + type: object + required: + - customerType + oneOf: + - $ref: '#/components/schemas/IndividualCustomerUpdate' + - $ref: '#/components/schemas/BusinessCustomerUpdate' + discriminator: + propertyName: customerType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdate' + BUSINESS: '#/components/schemas/BusinessCustomerUpdate' Error409: type: object required: @@ -4536,6 +4495,18 @@ components: details: type: object description: Additional error details + UpdateCustomerRequest: + type: object + required: + - customerType + oneOf: + - $ref: '#/components/schemas/IndividualCustomerUpdate' + - $ref: '#/components/schemas/BusinessCustomerUpdate' + discriminator: + propertyName: customerType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdate' + BUSINESS: '#/components/schemas/BusinessCustomerUpdate' Currency: type: object properties: @@ -5228,56 +5199,25 @@ components: const: SPARK_WALLET example: SPARK_WALLET LightningExternalAccountInfo: - allOf: - - type: object - required: - - accountType - properties: - accountType: - const: LIGHTNING - example: LIGHTNING - - oneOf: - - title: Lightning Invoice - type: object - required: - - destinationType - - invoice - properties: - destinationType: - const: INVOICE - example: INVOICE - invoice: - type: string - description: 1-time use lightning bolt11 invoice payout destination - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs - - title: Lightning - Bolt12 Offer - type: object - required: - - destinationType - - bolt12 - properties: - destinationType: - const: BOLT12 - example: BOLT12 - bolt12: - type: string - description: A bolt12 offer which can be reused as a payment destination - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs - - title: Lightning Address - type: object - required: - - destinationType - - lightningAddress - properties: - destinationType: - const: LIGHTNING_ADDRESS - example: LIGHTNING_ADDRESS - lightningAddress: - type: string - description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. - example: john.doe@lightningwallet.com - discriminator: - propertyName: destinationType + type: object + required: + - accountType + properties: + accountType: + const: LIGHTNING + example: LIGHTNING + invoice: + type: string + description: 1-time use lightning bolt11 invoice payout destination + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + bolt12: + type: string + description: A bolt12 offer which can be reused as a payment destination + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + lightningAddress: + type: string + description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. + example: john.doe@lightningwallet.com SolanaWalletExternalAccountInfo: allOf: - $ref: '#/components/schemas/SolanaWalletInfo' @@ -5492,34 +5432,13 @@ components: $ref: '#/components/schemas/TransactionType' destination: oneOf: - - title: Account Destination - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account - example: EUR - description: Destination account details - - title: UMA Address Destination - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination - example: EUR + - $ref: '#/components/schemas/AccountDestination' + - $ref: '#/components/schemas/UmaAddressDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' customerId: type: string description: System ID of the customer (sender for outgoing, recipient for incoming) @@ -5841,6 +5760,45 @@ components: - REFUNDED - EXPIRED description: Status of a payment transaction + AccountDestination: + type: object + required: + - destinationType + - accountId + - currency + properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account + example: EUR + description: Destination account details + UmaAddressDestination: + type: object + required: + - destinationType + - umaAddress + properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + currency: + type: string + description: Currency code for the destination + example: EUR + description: UMA address destination details CurrencyPreference: type: object required: @@ -5943,37 +5901,102 @@ components: details: type: object description: Additional error details + QuoteAccountSource: + type: object + required: + - sourceType + - accountId + properties: + sourceType: + type: string + const: ACCOUNT + description: Source type identifier + accountId: + type: string + description: Source account identifier + example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + currency: + type: string + description: Currency code for the funding source. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: USD + description: Source account details + QuoteRealtimeFundingSource: + type: object + required: + - sourceType + - currency + - customerId + properties: + sourceType: + type: string + const: REALTIME_FUNDING + description: Source type identifier + 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://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: USD + 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.). QuoteSource: + required: + - sourceType oneOf: - - title: Account - type: object - required: - - accountId - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the funding source. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: USD - description: Source account details - - title: Real-time funding + - $ref: '#/components/schemas/QuoteAccountSource' + - $ref: '#/components/schemas/QuoteRealtimeFundingSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/QuoteAccountSource' + REALTIME_FUNDING: '#/components/schemas/QuoteRealtimeFundingSource' + QuoteAccountDestination: + type: object + required: + - destinationType + - accountId + properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account + example: EUR + description: Destination account details + QuoteUmaAddressDestination: + type: object + required: + - destinationType + - umaAddress + properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + currency: + type: string + description: Currency code for the destination + example: EUR + counterpartyInformation: type: object - required: - - currency - - customerId - properties: - 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://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: USD - 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.). + description: Information about the recipient, as required by the platform in their configuration. + additionalProperties: true + example: + FULL_NAME: Jane Receiver + BIRTH_DATE: '1990-01-01' + NATIONALITY: FR + description: UMA address destination details Quote: type: object required: @@ -6018,43 +6041,16 @@ components: source: $ref: '#/components/schemas/QuoteSource' destination: + required: + - destinationType oneOf: - - title: Account Destination - type: object - required: - - accountId - properties: - accountId: - type: string - description: Destination account identifier - example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account - example: EUR - description: Destination account details - - title: UMA Address Destination - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination - example: EUR - counterpartyInformation: - type: object - description: Information about the recipient, as required by the platform in their configuration. - additionalProperties: true - example: - FULL_NAME: Jane Receiver - BIRTH_DATE: '1990-01-01' - NATIONALITY: FR - description: UMA address destination details + - $ref: '#/components/schemas/QuoteAccountDestination' + - $ref: '#/components/schemas/QuoteUmaAddressDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/QuoteAccountDestination' + UMA_ADDRESS: '#/components/schemas/QuoteUmaAddressDestination' sendingCurrency: $ref: '#/components/schemas/Currency' description: Currency for the sending amount diff --git a/openapi/components/schemas/customers/CreateCustomerRequest.yaml b/openapi/components/schemas/customers/CreateCustomerRequest.yaml new file mode 100644 index 0000000..0f57852 --- /dev/null +++ b/openapi/components/schemas/customers/CreateCustomerRequest.yaml @@ -0,0 +1,11 @@ +type: object +required: + - customerType +oneOf: + - $ref: ./IndividualCustomerUpdate.yaml + - $ref: ./BusinessCustomerUpdate.yaml +discriminator: + propertyName: customerType + mapping: + INDIVIDUAL: ./IndividualCustomerUpdate.yaml + BUSINESS: ./BusinessCustomerUpdate.yaml diff --git a/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml b/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml index 03f2f08..bfbce7e 100644 --- a/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml +++ b/openapi/components/schemas/customers/IndividualCustomerUpdate.yaml @@ -21,6 +21,10 @@ properties: example: US address: $ref: ../common/Address.yaml + platformCustomerId: + type: string + description: Platform-specific customer identifier + example: 9f84e0c2a72c4fa umaAddress: type: string description: | diff --git a/openapi/components/schemas/customers/UpdateCustomerRequest.yaml b/openapi/components/schemas/customers/UpdateCustomerRequest.yaml new file mode 100644 index 0000000..0f57852 --- /dev/null +++ b/openapi/components/schemas/customers/UpdateCustomerRequest.yaml @@ -0,0 +1,11 @@ +type: object +required: + - customerType +oneOf: + - $ref: ./IndividualCustomerUpdate.yaml + - $ref: ./BusinessCustomerUpdate.yaml +discriminator: + propertyName: customerType + mapping: + INDIVIDUAL: ./IndividualCustomerUpdate.yaml + BUSINESS: ./BusinessCustomerUpdate.yaml diff --git a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml index cae1b33..453dd90 100644 --- a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml @@ -1,50 +1,19 @@ -allOf: - - type: object - required: - - accountType - properties: - accountType: - const: LIGHTNING - example: LIGHTNING - - oneOf: - - title: Lightning Invoice - type: object - required: - - destinationType - - invoice - properties: - destinationType: - const: INVOICE - example: INVOICE - invoice: - type: string - description: 1-time use lightning bolt11 invoice payout destination - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs - - title: Lightning - Bolt12 Offer - type: object - required: - - destinationType - - bolt12 - properties: - destinationType: - const: BOLT12 - example: BOLT12 - bolt12: - type: string - description: A bolt12 offer which can be reused as a payment destination - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs - - title: Lightning Address - type: object - required: - - destinationType - - lightningAddress - properties: - destinationType: - const: LIGHTNING_ADDRESS - example: LIGHTNING_ADDRESS - lightningAddress: - type: string - description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. - example: john.doe@lightningwallet.com - discriminator: - propertyName: destinationType \ No newline at end of file +type: object +required: + - accountType +properties: + accountType: + const: LIGHTNING + example: LIGHTNING + invoice: + type: string + description: 1-time use lightning bolt11 invoice payout destination + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + bolt12: + type: string + description: A bolt12 offer which can be reused as a payment destination + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + lightningAddress: + type: string + description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. + example: john.doe@lightningwallet.com \ No newline at end of file diff --git a/openapi/components/schemas/quotes/Quote.yaml b/openapi/components/schemas/quotes/Quote.yaml index 92edf2a..1dd3434 100644 --- a/openapi/components/schemas/quotes/Quote.yaml +++ b/openapi/components/schemas/quotes/Quote.yaml @@ -42,45 +42,16 @@ properties: source: $ref: ./QuoteSource.yaml destination: + required: + - destinationType oneOf: - - title: Account Destination - type: object - required: - - accountId - properties: - accountId: - type: string - description: Destination account identifier - example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account - example: EUR - description: Destination account details - - title: UMA Address Destination - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination - example: EUR - counterpartyInformation: - type: object - description: >- - Information about the recipient, as required by the platform in their - configuration. - additionalProperties: true - example: - FULL_NAME: Jane Receiver - BIRTH_DATE: '1990-01-01' - NATIONALITY: FR - description: UMA address destination details + - $ref: ./QuoteAccountDestination.yaml + - $ref: ./QuoteUmaAddressDestination.yaml + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./QuoteAccountDestination.yaml + UMA_ADDRESS: ./QuoteUmaAddressDestination.yaml sendingCurrency: $ref: ../common/Currency.yaml description: Currency for the sending amount diff --git a/openapi/components/schemas/quotes/QuoteAccountDestination.yaml b/openapi/components/schemas/quotes/QuoteAccountDestination.yaml new file mode 100644 index 0000000..3a553df --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteAccountDestination.yaml @@ -0,0 +1,18 @@ +type: object +required: + - destinationType + - accountId +properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account + example: EUR +description: Destination account details diff --git a/openapi/components/schemas/quotes/QuoteAccountSource.yaml b/openapi/components/schemas/quotes/QuoteAccountSource.yaml new file mode 100644 index 0000000..abcacbd --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteAccountSource.yaml @@ -0,0 +1,21 @@ +type: object +required: + - sourceType + - accountId +properties: + sourceType: + type: string + const: ACCOUNT + description: Source type identifier + accountId: + type: string + description: Source account identifier + example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + currency: + type: string + description: >- + Currency code for the funding source. See + [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) + for the full list of supported fiat and crypto currencies. + example: USD +description: Source account details diff --git a/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml b/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml new file mode 100644 index 0000000..f0f4b4e --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml @@ -0,0 +1,28 @@ +type: object +required: + - sourceType + - currency + - customerId +properties: + sourceType: + type: string + const: REALTIME_FUNDING + description: Source type identifier + 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://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) + for the full list of supported fiat and crypto currencies. + example: USD +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.). diff --git a/openapi/components/schemas/quotes/QuoteSource.yaml b/openapi/components/schemas/quotes/QuoteSource.yaml index d12a92d..2a225b8 100644 --- a/openapi/components/schemas/quotes/QuoteSource.yaml +++ b/openapi/components/schemas/quotes/QuoteSource.yaml @@ -1,42 +1,10 @@ +required: + - sourceType oneOf: - - title: Account - type: object - required: - - accountId - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: >- - Currency code for the funding source. See - [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) - for the full list of supported fiat and crypto currencies. - example: USD - description: Source account details - - title: Real-time funding - type: object - required: - - currency - - customerId - properties: - 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://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) - for the full list of supported fiat and crypto currencies. - example: USD - 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.). + - $ref: ./QuoteAccountSource.yaml + - $ref: ./QuoteRealtimeFundingSource.yaml +discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./QuoteAccountSource.yaml + REALTIME_FUNDING: ./QuoteRealtimeFundingSource.yaml diff --git a/openapi/components/schemas/quotes/QuoteUmaAddressDestination.yaml b/openapi/components/schemas/quotes/QuoteUmaAddressDestination.yaml new file mode 100644 index 0000000..14bf5ab --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteUmaAddressDestination.yaml @@ -0,0 +1,28 @@ +type: object +required: + - destinationType + - umaAddress +properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + currency: + type: string + description: Currency code for the destination + example: EUR + counterpartyInformation: + type: object + description: >- + Information about the recipient, as required by the platform in their + configuration. + additionalProperties: true + example: + FULL_NAME: Jane Receiver + BIRTH_DATE: '1990-01-01' + NATIONALITY: FR +description: UMA address destination details diff --git a/openapi/components/schemas/transactions/AccountDestination.yaml b/openapi/components/schemas/transactions/AccountDestination.yaml new file mode 100644 index 0000000..847b568 --- /dev/null +++ b/openapi/components/schemas/transactions/AccountDestination.yaml @@ -0,0 +1,19 @@ +type: object +required: + - destinationType + - accountId + - currency +properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account + example: EUR +description: Destination account details diff --git a/openapi/components/schemas/transactions/Transaction.yaml b/openapi/components/schemas/transactions/Transaction.yaml index 83f5c80..05cfb01 100644 --- a/openapi/components/schemas/transactions/Transaction.yaml +++ b/openapi/components/schemas/transactions/Transaction.yaml @@ -17,34 +17,13 @@ properties: $ref: ./TransactionType.yaml destination: oneOf: - - title: Account Destination - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account - example: EUR - description: Destination account details - - title: UMA Address Destination - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination - example: EUR + - $ref: ./AccountDestination.yaml + - $ref: ./UmaAddressDestination.yaml + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./AccountDestination.yaml + UMA_ADDRESS: ./UmaAddressDestination.yaml customerId: type: string description: System ID of the customer (sender for outgoing, recipient for incoming) diff --git a/openapi/components/schemas/transactions/UmaAddressDestination.yaml b/openapi/components/schemas/transactions/UmaAddressDestination.yaml new file mode 100644 index 0000000..5b7e6a7 --- /dev/null +++ b/openapi/components/schemas/transactions/UmaAddressDestination.yaml @@ -0,0 +1,18 @@ +type: object +required: + - destinationType + - umaAddress +properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + currency: + type: string + description: Currency code for the destination + example: EUR +description: UMA address destination details diff --git a/openapi/paths/customers/customers.yaml b/openapi/paths/customers/customers.yaml index 9bced55..349c91b 100644 --- a/openapi/paths/customers/customers.yaml +++ b/openapi/paths/customers/customers.yaml @@ -13,55 +13,7 @@ post: content: application/json: schema: - oneOf: - - title: New Individual Customer - allOf: - - $ref: ../../components/schemas/customers/IndividualCustomerUpdate.yaml - - type: object - required: - - platformCustomerId - properties: - platformCustomerId: - type: string - description: Platform-specific customer identifier - example: 9f84e0c2a72c4fa - kycUrl: - type: string - description: A KYC URL to be shared with your individual customer if KYC needs to be completed - example: "https://example.com/kyc" - - title: New Business Customer - allOf: - - $ref: ../../components/schemas/customers/BusinessCustomerUpdate.yaml - - type: object - required: - - platformCustomerId - - businessInfo - properties: - platformCustomerId: - type: string - description: Platform-specific customer identifier - example: 9f84e0c2a72c4fa - kycUrl: - type: string - description: A KYC URL to be shared with your business customer if KYC needs to be completed - example: "https://example.com/kyc" - businessInfo: - type: object - required: - - legalName - properties: - legalName: - type: string - description: Legal name of the business - example: Acme Corporation, Inc. - registrationNumber: - type: string - description: Business registration number - example: BRN-123456789 - taxId: - type: string - description: Tax identification number - example: EIN-987654321 + $ref: ../../components/schemas/customers/CreateCustomerRequest.yaml examples: individualCustomerWithUmaAddress: summary: Create individual customer with UMA address, including deposit bank account information. diff --git a/openapi/paths/customers/customers_{customerId}.yaml b/openapi/paths/customers/customers_{customerId}.yaml index d3ed33c..82a8593 100644 --- a/openapi/paths/customers/customers_{customerId}.yaml +++ b/openapi/paths/customers/customers_{customerId}.yaml @@ -60,16 +60,7 @@ patch: content: application/json: schema: - oneOf: - - title: Update Individual Customer - $ref: ../../components/schemas/customers/IndividualCustomerUpdate.yaml - - title: Update Business Customer - $ref: ../../components/schemas/customers/BusinessCustomerUpdate.yaml - discriminator: - propertyName: customerType - mapping: - INDIVIDUAL: ../../components/schemas/customers/IndividualCustomerUpdate.yaml - BUSINESS: ../../components/schemas/customers/BusinessCustomerUpdate.yaml + $ref: ../../components/schemas/customers/UpdateCustomerRequest.yaml examples: individualUpdate: summary: Update individual customer example diff --git a/openapi/paths/internal-accounts/internal_accounts.yaml b/openapi/paths/internal-accounts/internal_accounts.yaml index 2e47010..94b3334 100644 --- a/openapi/paths/internal-accounts/internal_accounts.yaml +++ b/openapi/paths/internal-accounts/internal_accounts.yaml @@ -54,7 +54,7 @@ get: type: array description: List of internal accounts matching the filter criteria items: - $ref: ../../components/schemas/users/InternalAccount.yaml + $ref: ../../components/schemas/customers/InternalAccount.yaml hasMore: type: boolean description: Indicates if more results are available beyond this page From 1ad5157e5ab634184250347cf66e0adba6303c0a Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 15:50:42 -0800 Subject: [PATCH 04/10] client builds! --- .redocly.lint-ignore.yaml | 2 + .stainless/stainless.yml | 80 ++++- mintlify/openapi.yaml | 284 +++++++++++------- openapi.yaml | 284 +++++++++++------- .../common/{Error.yaml => GridError.yaml} | 2 + .../schemas/common/PaymentInstructions.yaml | 4 + .../BulkCustomerImportErrorEntry.yaml | 11 + .../customers/BulkCustomerImportJob.yaml | 12 +- .../customers/CreateCustomerRequest.yaml | 7 + .../customers/UpdateCustomerRequest.yaml | 7 + .../components/schemas/errors/Error400.yaml | 1 + .../components/schemas/errors/Error401.yaml | 1 + .../components/schemas/errors/Error403.yaml | 1 + .../components/schemas/errors/Error404.yaml | 1 + .../components/schemas/errors/Error409.yaml | 1 + .../components/schemas/errors/Error412.yaml | 1 + .../components/schemas/errors/Error424.yaml | 1 + .../components/schemas/errors/Error500.yaml | 1 + .../components/schemas/errors/Error501.yaml | 1 + .../schemas/quotes/QuoteAccountSource.yaml | 7 - .../schemas/quotes/QuoteRequest.yaml | 54 +--- .../QuoteRequestAccountDestination.yaml | 22 ++ ...uestExternalAccountDetailsDestination.yaml | 16 + .../QuoteRequestUmaAddressDestination.yaml | 22 ++ .../schemas/transactions/AccountSource.yaml | 19 ++ .../transactions/IncomingTransaction.yaml | 34 +-- .../transactions/OutgoingTransaction.yaml | 34 +-- .../transactions/UmaAddressSource.yaml | 18 ++ ...comingPaymentWebhookForbiddenResponse.yaml | 2 +- ...ngPaymentWebhookUnprocessableResponse.yaml | 2 +- openapi/openapi.yaml | 13 +- .../customers/customers_{customerId}.yaml | 2 +- .../platform/platform_external_accounts.yaml | 4 +- .../paths/quotes/quotes_{quoteId}_retry.yaml | 99 ++++++ 34 files changed, 698 insertions(+), 352 deletions(-) rename openapi/components/schemas/common/{Error.yaml => GridError.yaml} (81%) create mode 100644 openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml create mode 100644 openapi/components/schemas/quotes/QuoteRequestAccountDestination.yaml create mode 100644 openapi/components/schemas/quotes/QuoteRequestExternalAccountDetailsDestination.yaml create mode 100644 openapi/components/schemas/quotes/QuoteRequestUmaAddressDestination.yaml create mode 100644 openapi/components/schemas/transactions/AccountSource.yaml create mode 100644 openapi/components/schemas/transactions/UmaAddressSource.yaml create mode 100644 openapi/paths/quotes/quotes_{quoteId}_retry.yaml diff --git a/.redocly.lint-ignore.yaml b/.redocly.lint-ignore.yaml index 0329536..d1f236a 100644 --- a/.redocly.lint-ignore.yaml +++ b/.redocly.lint-ignore.yaml @@ -1,6 +1,8 @@ # This file instructs Redocly's linter to ignore the rules contained for specific parts of your API. # See https://redocly.com/docs/cli/ for more information. openapi.yaml: + no-unused-components: + - '#/components/schemas/AllErrors' no-invalid-media-type-examples: - >- #/paths/~1customers~1external-accounts/post/requestBody/content/application~1json/schema diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 594658f..e534b02 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -26,6 +26,12 @@ targets: production_repo: null publish: npm: false + kotlin: + edition: kotlin.2025-10-08 + reverse_domain: com.grid.api + production_repo: null + publish: + maven: false # `environments` are a map of the name of the environment (e.g. "sandbox", # "production") to the corresponding url to use. @@ -68,10 +74,14 @@ resources: individual_customer_update: '#/components/schemas/IndividualCustomerUpdate' business_customer_update: '#/components/schemas/BusinessCustomerUpdate' methods: - create: post /customers + create: + endpoint: post /customers + body_param_name: CreateCustomerRequest list: get /customers retrieve: get /customers/{customerId} - update: patch /customers/{customerId} + update: + endpoint: patch /customers/{customerId} + body_param_name: UpdateCustomerRequest delete: delete /customers/{customerId} get_kyc_link: get /customers/kyc-link list_internal_accounts: get /customers/internal-accounts @@ -105,11 +115,15 @@ resources: platform: methods: - list_internal_accounts: get /platform/internal-accounts + list_internal_accounts: + endpoint: get /platform/internal-accounts + paginated: false subresources: external_accounts: methods: - list: get /platform/external-accounts + list: + endpoint: get /platform/external-accounts + paginated: false create: post /platform/external-accounts plaid: @@ -221,8 +235,7 @@ client_settings: auth: security_scheme: BasicAuth role: username - description: API token authentication using format `:` + description: API token authentication using format `:` read_env: GRID_USERNAME password: type: string @@ -230,12 +243,11 @@ client_settings: auth: security_scheme: BasicAuth role: password - description: API token authentication using format `:` + description: API token authentication using format `:` read_env: GRID_PASSWORD webhook_signature: type: string - nullable: false + nullable: true auth: security_scheme: WebhookSignature description: | @@ -263,3 +275,53 @@ readme: type: request endpoint: get /config params: {} + pagination: + type: request + endpoint: get /customers + params: {} + +pagination: + - name: default_pagination + type: cursor + request: + cursor: + type: string + x-stainless-pagination-property: + purpose: next_cursor_param + response: + data: + type: array + items: + type: object + nextCursor: + type: string + x-stainless-pagination-property: + purpose: next_cursor_field + hasMore: + type: boolean + x-stainless-pagination-property: + purpose: has_next_page + totalCount: + type: integer + +openapi: + code_samples: mintlify + transformations: + - command: splitSchemasByEnumProperty + reason: Split error schemas with multiple enum values into distinct ones + args: + unionPath: AllErrors + enumProperty: code + +errors: + union: + source: AllErrors + discriminator: code + status_property: status + +codeflow: + detect_breaking_changes: true +diagnostics: + ignored: + Schema/ObjectHasNoProperties: + - pagination.0.response.data.items diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 0aff412..084f024 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -547,7 +547,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/GridError' '500': description: Internal service error content: @@ -942,9 +942,9 @@ paths: schema: type: object required: - - accounts + - data properties: - accounts: + data: type: array description: List of external accounts matching the filter criteria items: @@ -3830,6 +3830,17 @@ components: If the signature verification succeeds, the webhook is authentic. If not, it should be rejected. schemas: + AllErrors: + anyOf: + - $ref: '#/components/schemas/Error400' + - $ref: '#/components/schemas/Error401' + - $ref: '#/components/schemas/Error403' + - $ref: '#/components/schemas/Error404' + - $ref: '#/components/schemas/Error409' + - $ref: '#/components/schemas/Error412' + - $ref: '#/components/schemas/Error424' + - $ref: '#/components/schemas/Error500' + - $ref: '#/components/schemas/Error501' CustomerInfoFieldName: type: string enum: @@ -4006,6 +4017,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error500: type: object required: @@ -4033,6 +4045,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error400: type: object required: @@ -4110,6 +4123,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error501: type: object required: @@ -4137,6 +4151,7 @@ components: details: type: object description: Additional error details + additionalProperties: true CustomerType: type: string enum: @@ -4409,6 +4424,13 @@ components: type: object required: - customerType + properties: + customerType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Customer type discriminator oneOf: - $ref: '#/components/schemas/IndividualCustomerUpdate' - $ref: '#/components/schemas/BusinessCustomerUpdate' @@ -4444,6 +4466,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error404: type: object required: @@ -4483,8 +4506,10 @@ components: details: type: object description: Additional error details - Error: + additionalProperties: true + GridError: type: object + title: GridError properties: code: type: string @@ -4495,10 +4520,18 @@ components: details: type: object description: Additional error details + additionalProperties: true UpdateCustomerRequest: type: object required: - customerType + properties: + customerType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Customer type discriminator oneOf: - $ref: '#/components/schemas/IndividualCustomerUpdate' - $ref: '#/components/schemas/BusinessCustomerUpdate' @@ -4920,6 +4953,10 @@ components: 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: - title: CLABE Account @@ -5479,6 +5516,45 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + AccountSource: + type: object + required: + - sourceType + - accountId + - currency + properties: + sourceType: + type: string + const: ACCOUNT + description: Source type identifier + accountId: + type: string + description: Source account identifier + example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + currency: + type: string + description: Currency code for the source account + example: USD + description: Source account details + UmaAddressSource: + type: object + required: + - sourceType + - umaAddress + properties: + sourceType: + type: string + const: UMA_ADDRESS + description: Source type identifier + umaAddress: + type: string + description: UMA address of the sender + example: $sender@uma.domain.com + currency: + type: string + description: Currency code for the source + example: USD + description: UMA address source details ReconciliationInstructions: type: object required: @@ -5543,34 +5619,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressSource' receivedAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount received in the recipient's currency @@ -5672,34 +5728,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressSource' sentAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount sent in the sender's currency @@ -5870,6 +5906,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error424: type: object required: @@ -5901,6 +5938,7 @@ components: details: type: object description: Additional error details + additionalProperties: true QuoteAccountSource: type: object required: @@ -5915,10 +5953,6 @@ components: type: string description: Source account identifier example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the funding source. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: USD description: Source account details QuoteRealtimeFundingSource: type: object @@ -6104,6 +6138,59 @@ components: rateDetails: $ref: '#/components/schemas/OutgoingRateDetails' description: Details about the rate and fees for the transaction. + QuoteRequestAccountDestination: + type: object + required: + - destinationType + - accountId + - currency + properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: EUR + description: Destination account details + QuoteRequestUmaAddressDestination: + type: object + required: + - destinationType + - umaAddress + - currency + properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + 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://grid.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 + QuoteRequestExternalAccountDetailsDestination: + type: object + required: + - destinationType + - externalAccountDetails + properties: + destinationType: + type: string + const: EXTERNAL_ACCOUNT_DETAILS + description: Destination type identifier + externalAccountDetails: + $ref: '#/components/schemas/ExternalAccountCreateRequest' + description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. QuoteLockSide: type: string enum: @@ -6129,43 +6216,17 @@ components: destination: oneOf: - title: Account - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: EUR - description: Destination account details + $ref: '#/components/schemas/QuoteRequestAccountDestination' - title: UMA Address - type: object - required: - - umaAddress - - currency - properties: - 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://grid.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 + $ref: '#/components/schemas/QuoteRequestUmaAddressDestination' - title: External Account Details - type: object - required: - - externalAccountDetails - properties: - externalAccountDetails: - $ref: '#/components/schemas/ExternalAccountCreateRequest' - description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. + $ref: '#/components/schemas/QuoteRequestExternalAccountDetailsDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/QuoteRequestAccountDestination' + UMA_ADDRESS: '#/components/schemas/QuoteRequestUmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/QuoteRequestExternalAccountDetailsDestination' lockedCurrencySide: $ref: '#/components/schemas/QuoteLockSide' lockedCurrencyAmount: @@ -6211,6 +6272,18 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + BulkCustomerImportErrorEntry: + allOf: + - $ref: '#/components/schemas/GridError' + - type: object + description: Error information for a failed bulk import entry + required: + - correlationId + properties: + correlationId: + type: string + description: Platform customer ID or row number for the failed entry + example: biz456 BulkCustomerImportJob: type: object required: @@ -6259,17 +6332,7 @@ components: type: array description: Detailed error information for failed entries items: - type: object - required: - - correlationId - - error - properties: - correlationId: - type: string - description: Platform customer ID or row number for the failed entry - example: biz456 - error: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/BulkCustomerImportErrorEntry' completedAt: type: string format: date-time @@ -6364,6 +6427,7 @@ components: details: type: object description: Additional error details + additionalProperties: true UmaProvider: type: object properties: @@ -6582,7 +6646,7 @@ components: description: Information about the recipient, provided by the platform if requested in the webhook via `requestedReceiverCustomerInfoFields` and the payment is approved. IncomingPaymentWebhookForbiddenResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: reason: @@ -6591,7 +6655,7 @@ components: example: RESTRICTED_JURISDICTION IncomingPaymentWebhookUnprocessableResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: requiredFields: diff --git a/openapi.yaml b/openapi.yaml index 0aff412..084f024 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -547,7 +547,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/GridError' '500': description: Internal service error content: @@ -942,9 +942,9 @@ paths: schema: type: object required: - - accounts + - data properties: - accounts: + data: type: array description: List of external accounts matching the filter criteria items: @@ -3830,6 +3830,17 @@ components: If the signature verification succeeds, the webhook is authentic. If not, it should be rejected. schemas: + AllErrors: + anyOf: + - $ref: '#/components/schemas/Error400' + - $ref: '#/components/schemas/Error401' + - $ref: '#/components/schemas/Error403' + - $ref: '#/components/schemas/Error404' + - $ref: '#/components/schemas/Error409' + - $ref: '#/components/schemas/Error412' + - $ref: '#/components/schemas/Error424' + - $ref: '#/components/schemas/Error500' + - $ref: '#/components/schemas/Error501' CustomerInfoFieldName: type: string enum: @@ -4006,6 +4017,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error500: type: object required: @@ -4033,6 +4045,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error400: type: object required: @@ -4110,6 +4123,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error501: type: object required: @@ -4137,6 +4151,7 @@ components: details: type: object description: Additional error details + additionalProperties: true CustomerType: type: string enum: @@ -4409,6 +4424,13 @@ components: type: object required: - customerType + properties: + customerType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Customer type discriminator oneOf: - $ref: '#/components/schemas/IndividualCustomerUpdate' - $ref: '#/components/schemas/BusinessCustomerUpdate' @@ -4444,6 +4466,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error404: type: object required: @@ -4483,8 +4506,10 @@ components: details: type: object description: Additional error details - Error: + additionalProperties: true + GridError: type: object + title: GridError properties: code: type: string @@ -4495,10 +4520,18 @@ components: details: type: object description: Additional error details + additionalProperties: true UpdateCustomerRequest: type: object required: - customerType + properties: + customerType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Customer type discriminator oneOf: - $ref: '#/components/schemas/IndividualCustomerUpdate' - $ref: '#/components/schemas/BusinessCustomerUpdate' @@ -4920,6 +4953,10 @@ components: 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: - title: CLABE Account @@ -5479,6 +5516,45 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + AccountSource: + type: object + required: + - sourceType + - accountId + - currency + properties: + sourceType: + type: string + const: ACCOUNT + description: Source type identifier + accountId: + type: string + description: Source account identifier + example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + currency: + type: string + description: Currency code for the source account + example: USD + description: Source account details + UmaAddressSource: + type: object + required: + - sourceType + - umaAddress + properties: + sourceType: + type: string + const: UMA_ADDRESS + description: Source type identifier + umaAddress: + type: string + description: UMA address of the sender + example: $sender@uma.domain.com + currency: + type: string + description: Currency code for the source + example: USD + description: UMA address source details ReconciliationInstructions: type: object required: @@ -5543,34 +5619,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressSource' receivedAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount received in the recipient's currency @@ -5672,34 +5728,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressSource' sentAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount sent in the sender's currency @@ -5870,6 +5906,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error424: type: object required: @@ -5901,6 +5938,7 @@ components: details: type: object description: Additional error details + additionalProperties: true QuoteAccountSource: type: object required: @@ -5915,10 +5953,6 @@ components: type: string description: Source account identifier example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the funding source. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: USD description: Source account details QuoteRealtimeFundingSource: type: object @@ -6104,6 +6138,59 @@ components: rateDetails: $ref: '#/components/schemas/OutgoingRateDetails' description: Details about the rate and fees for the transaction. + QuoteRequestAccountDestination: + type: object + required: + - destinationType + - accountId + - currency + properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: Currency code for the destination account. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: EUR + description: Destination account details + QuoteRequestUmaAddressDestination: + type: object + required: + - destinationType + - umaAddress + - currency + properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + 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://grid.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 + QuoteRequestExternalAccountDetailsDestination: + type: object + required: + - destinationType + - externalAccountDetails + properties: + destinationType: + type: string + const: EXTERNAL_ACCOUNT_DETAILS + description: Destination type identifier + externalAccountDetails: + $ref: '#/components/schemas/ExternalAccountCreateRequest' + description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. QuoteLockSide: type: string enum: @@ -6129,43 +6216,17 @@ components: destination: oneOf: - title: Account - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: EUR - description: Destination account details + $ref: '#/components/schemas/QuoteRequestAccountDestination' - title: UMA Address - type: object - required: - - umaAddress - - currency - properties: - 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://grid.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 + $ref: '#/components/schemas/QuoteRequestUmaAddressDestination' - title: External Account Details - type: object - required: - - externalAccountDetails - properties: - externalAccountDetails: - $ref: '#/components/schemas/ExternalAccountCreateRequest' - description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. + $ref: '#/components/schemas/QuoteRequestExternalAccountDetailsDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/QuoteRequestAccountDestination' + UMA_ADDRESS: '#/components/schemas/QuoteRequestUmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/QuoteRequestExternalAccountDetailsDestination' lockedCurrencySide: $ref: '#/components/schemas/QuoteLockSide' lockedCurrencyAmount: @@ -6211,6 +6272,18 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + BulkCustomerImportErrorEntry: + allOf: + - $ref: '#/components/schemas/GridError' + - type: object + description: Error information for a failed bulk import entry + required: + - correlationId + properties: + correlationId: + type: string + description: Platform customer ID or row number for the failed entry + example: biz456 BulkCustomerImportJob: type: object required: @@ -6259,17 +6332,7 @@ components: type: array description: Detailed error information for failed entries items: - type: object - required: - - correlationId - - error - properties: - correlationId: - type: string - description: Platform customer ID or row number for the failed entry - example: biz456 - error: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/BulkCustomerImportErrorEntry' completedAt: type: string format: date-time @@ -6364,6 +6427,7 @@ components: details: type: object description: Additional error details + additionalProperties: true UmaProvider: type: object properties: @@ -6582,7 +6646,7 @@ components: description: Information about the recipient, provided by the platform if requested in the webhook via `requestedReceiverCustomerInfoFields` and the payment is approved. IncomingPaymentWebhookForbiddenResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: reason: @@ -6591,7 +6655,7 @@ components: example: RESTRICTED_JURISDICTION IncomingPaymentWebhookUnprocessableResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: requiredFields: diff --git a/openapi/components/schemas/common/Error.yaml b/openapi/components/schemas/common/GridError.yaml similarity index 81% rename from openapi/components/schemas/common/Error.yaml rename to openapi/components/schemas/common/GridError.yaml index b0eb270..4f956b6 100644 --- a/openapi/components/schemas/common/Error.yaml +++ b/openapi/components/schemas/common/GridError.yaml @@ -1,4 +1,5 @@ type: object +title: GridError properties: code: type: string @@ -9,3 +10,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/common/PaymentInstructions.yaml b/openapi/components/schemas/common/PaymentInstructions.yaml index 33d2181..791174d 100644 --- a/openapi/components/schemas/common/PaymentInstructions.yaml +++ b/openapi/components/schemas/common/PaymentInstructions.yaml @@ -8,6 +8,10 @@ properties: 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: - title: CLABE Account diff --git a/openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml b/openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml new file mode 100644 index 0000000..79bfb0b --- /dev/null +++ b/openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ../common/GridError.yaml + - type: object + description: Error information for a failed bulk import entry + required: + - correlationId + properties: + correlationId: + type: string + description: Platform customer ID or row number for the failed entry + example: biz456 diff --git a/openapi/components/schemas/customers/BulkCustomerImportJob.yaml b/openapi/components/schemas/customers/BulkCustomerImportJob.yaml index a550d9c..1c74dc1 100644 --- a/openapi/components/schemas/customers/BulkCustomerImportJob.yaml +++ b/openapi/components/schemas/customers/BulkCustomerImportJob.yaml @@ -45,17 +45,7 @@ properties: type: array description: Detailed error information for failed entries items: - type: object - required: - - correlationId - - error - properties: - correlationId: - type: string - description: Platform customer ID or row number for the failed entry - example: biz456 - error: - $ref: ../common/Error.yaml + $ref: BulkCustomerImportErrorEntry.yaml completedAt: type: string format: date-time diff --git a/openapi/components/schemas/customers/CreateCustomerRequest.yaml b/openapi/components/schemas/customers/CreateCustomerRequest.yaml index 0f57852..3b996ef 100644 --- a/openapi/components/schemas/customers/CreateCustomerRequest.yaml +++ b/openapi/components/schemas/customers/CreateCustomerRequest.yaml @@ -1,6 +1,13 @@ type: object required: - customerType +properties: + customerType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Customer type discriminator oneOf: - $ref: ./IndividualCustomerUpdate.yaml - $ref: ./BusinessCustomerUpdate.yaml diff --git a/openapi/components/schemas/customers/UpdateCustomerRequest.yaml b/openapi/components/schemas/customers/UpdateCustomerRequest.yaml index 0f57852..3b996ef 100644 --- a/openapi/components/schemas/customers/UpdateCustomerRequest.yaml +++ b/openapi/components/schemas/customers/UpdateCustomerRequest.yaml @@ -1,6 +1,13 @@ type: object required: - customerType +properties: + customerType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Customer type discriminator oneOf: - $ref: ./IndividualCustomerUpdate.yaml - $ref: ./BusinessCustomerUpdate.yaml diff --git a/openapi/components/schemas/errors/Error400.yaml b/openapi/components/schemas/errors/Error400.yaml index 7a7e69c..25ea279 100644 --- a/openapi/components/schemas/errors/Error400.yaml +++ b/openapi/components/schemas/errors/Error400.yaml @@ -74,3 +74,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error401.yaml b/openapi/components/schemas/errors/Error401.yaml index dc367d8..04d653a 100644 --- a/openapi/components/schemas/errors/Error401.yaml +++ b/openapi/components/schemas/errors/Error401.yaml @@ -24,3 +24,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error403.yaml b/openapi/components/schemas/errors/Error403.yaml index 520dea4..e93a32b 100644 --- a/openapi/components/schemas/errors/Error403.yaml +++ b/openapi/components/schemas/errors/Error403.yaml @@ -28,3 +28,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error404.yaml b/openapi/components/schemas/errors/Error404.yaml index 055b9ca..4c53ac3 100644 --- a/openapi/components/schemas/errors/Error404.yaml +++ b/openapi/components/schemas/errors/Error404.yaml @@ -36,3 +36,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error409.yaml b/openapi/components/schemas/errors/Error409.yaml index a529e0f..4bcefbc 100644 --- a/openapi/components/schemas/errors/Error409.yaml +++ b/openapi/components/schemas/errors/Error409.yaml @@ -24,3 +24,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error412.yaml b/openapi/components/schemas/errors/Error412.yaml index 923d19d..4dd24c3 100644 --- a/openapi/components/schemas/errors/Error412.yaml +++ b/openapi/components/schemas/errors/Error412.yaml @@ -21,3 +21,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error424.yaml b/openapi/components/schemas/errors/Error424.yaml index 6d60cf3..e546848 100644 --- a/openapi/components/schemas/errors/Error424.yaml +++ b/openapi/components/schemas/errors/Error424.yaml @@ -28,3 +28,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error500.yaml b/openapi/components/schemas/errors/Error500.yaml index d077e25..0fd1023 100644 --- a/openapi/components/schemas/errors/Error500.yaml +++ b/openapi/components/schemas/errors/Error500.yaml @@ -24,3 +24,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error501.yaml b/openapi/components/schemas/errors/Error501.yaml index 3c46735..c467f08 100644 --- a/openapi/components/schemas/errors/Error501.yaml +++ b/openapi/components/schemas/errors/Error501.yaml @@ -24,3 +24,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/quotes/QuoteAccountSource.yaml b/openapi/components/schemas/quotes/QuoteAccountSource.yaml index abcacbd..bc6582a 100644 --- a/openapi/components/schemas/quotes/QuoteAccountSource.yaml +++ b/openapi/components/schemas/quotes/QuoteAccountSource.yaml @@ -11,11 +11,4 @@ properties: type: string description: Source account identifier example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: >- - Currency code for the funding source. See - [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) - for the full list of supported fiat and crypto currencies. - example: USD description: Source account details diff --git a/openapi/components/schemas/quotes/QuoteRequest.yaml b/openapi/components/schemas/quotes/QuoteRequest.yaml index 5e27a72..842cc4d 100644 --- a/openapi/components/schemas/quotes/QuoteRequest.yaml +++ b/openapi/components/schemas/quotes/QuoteRequest.yaml @@ -19,53 +19,17 @@ properties: destination: oneOf: - title: Account - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: >- - Currency code for the destination account. See - [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) - for the full list of supported fiat and crypto currencies. - example: EUR - description: Destination account details + $ref: ./QuoteRequestAccountDestination.yaml - title: UMA Address - type: object - required: - - umaAddress - - currency - properties: - 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://grid.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 + $ref: ./QuoteRequestUmaAddressDestination.yaml - title: External Account Details - type: object - required: - - externalAccountDetails - properties: - externalAccountDetails: - $ref: ../external_accounts/ExternalAccountCreateRequest.yaml - description: >- - A convenient destination option which adds the external account and creates - the quote in one step rather than first needing to call /external-accounts - to add the account. Useful for one-off payments to some destination. - See the external accounts endpoints for test values in sandbox mode. + $ref: ./QuoteRequestExternalAccountDetailsDestination.yaml + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./QuoteRequestAccountDestination.yaml + UMA_ADDRESS: ./QuoteRequestUmaAddressDestination.yaml + EXTERNAL_ACCOUNT_DETAILS: ./QuoteRequestExternalAccountDetailsDestination.yaml lockedCurrencySide: $ref: ./QuoteLockSide.yaml lockedCurrencyAmount: diff --git a/openapi/components/schemas/quotes/QuoteRequestAccountDestination.yaml b/openapi/components/schemas/quotes/QuoteRequestAccountDestination.yaml new file mode 100644 index 0000000..4e38c1a --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteRequestAccountDestination.yaml @@ -0,0 +1,22 @@ +type: object +required: + - destinationType + - accountId + - currency +properties: + destinationType: + type: string + const: ACCOUNT + description: Destination type identifier + accountId: + type: string + description: Destination account identifier + example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + currency: + type: string + description: >- + Currency code for the destination account. See + [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) + for the full list of supported fiat and crypto currencies. + example: EUR +description: Destination account details diff --git a/openapi/components/schemas/quotes/QuoteRequestExternalAccountDetailsDestination.yaml b/openapi/components/schemas/quotes/QuoteRequestExternalAccountDetailsDestination.yaml new file mode 100644 index 0000000..18e66ee --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteRequestExternalAccountDetailsDestination.yaml @@ -0,0 +1,16 @@ +type: object +required: + - destinationType + - externalAccountDetails +properties: + destinationType: + type: string + const: EXTERNAL_ACCOUNT_DETAILS + description: Destination type identifier + externalAccountDetails: + $ref: ../external_accounts/ExternalAccountCreateRequest.yaml +description: >- + A convenient destination option which adds the external account and creates + the quote in one step rather than first needing to call /external-accounts + to add the account. Useful for one-off payments to some destination. + See the external accounts endpoints for test values in sandbox mode. diff --git a/openapi/components/schemas/quotes/QuoteRequestUmaAddressDestination.yaml b/openapi/components/schemas/quotes/QuoteRequestUmaAddressDestination.yaml new file mode 100644 index 0000000..aa9177d --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteRequestUmaAddressDestination.yaml @@ -0,0 +1,22 @@ +type: object +required: + - destinationType + - umaAddress + - currency +properties: + destinationType: + type: string + const: UMA_ADDRESS + description: Destination type identifier + 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://grid.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 diff --git a/openapi/components/schemas/transactions/AccountSource.yaml b/openapi/components/schemas/transactions/AccountSource.yaml new file mode 100644 index 0000000..4e049a7 --- /dev/null +++ b/openapi/components/schemas/transactions/AccountSource.yaml @@ -0,0 +1,19 @@ +type: object +required: + - sourceType + - accountId + - currency +properties: + sourceType: + type: string + const: ACCOUNT + description: Source type identifier + accountId: + type: string + description: Source account identifier + example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + currency: + type: string + description: Currency code for the source account + example: USD +description: Source account details diff --git a/openapi/components/schemas/transactions/IncomingTransaction.yaml b/openapi/components/schemas/transactions/IncomingTransaction.yaml index ebd4fe0..e2dc458 100644 --- a/openapi/components/schemas/transactions/IncomingTransaction.yaml +++ b/openapi/components/schemas/transactions/IncomingTransaction.yaml @@ -7,34 +7,14 @@ allOf: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: ./AccountSource.yaml - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: ./UmaAddressSource.yaml + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountSource.yaml + UMA_ADDRESS: ./UmaAddressSource.yaml receivedAmount: $ref: ../common/CurrencyAmount.yaml description: Amount received in the recipient's currency diff --git a/openapi/components/schemas/transactions/OutgoingTransaction.yaml b/openapi/components/schemas/transactions/OutgoingTransaction.yaml index 56700ff..d74532b 100644 --- a/openapi/components/schemas/transactions/OutgoingTransaction.yaml +++ b/openapi/components/schemas/transactions/OutgoingTransaction.yaml @@ -9,34 +9,14 @@ allOf: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: ./AccountSource.yaml - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: ./UmaAddressSource.yaml + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountSource.yaml + UMA_ADDRESS: ./UmaAddressSource.yaml sentAmount: $ref: ../common/CurrencyAmount.yaml description: Amount sent in the sender's currency diff --git a/openapi/components/schemas/transactions/UmaAddressSource.yaml b/openapi/components/schemas/transactions/UmaAddressSource.yaml new file mode 100644 index 0000000..5b5fc11 --- /dev/null +++ b/openapi/components/schemas/transactions/UmaAddressSource.yaml @@ -0,0 +1,18 @@ +type: object +required: + - sourceType + - umaAddress +properties: + sourceType: + type: string + const: UMA_ADDRESS + description: Source type identifier + umaAddress: + type: string + description: UMA address of the sender + example: $sender@uma.domain.com + currency: + type: string + description: Currency code for the source + example: USD +description: UMA address source details diff --git a/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml b/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml index 12c0b08..4d8b6c0 100644 --- a/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml +++ b/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml @@ -1,5 +1,5 @@ allOf: - - $ref: ../common/Error.yaml + - $ref: ../common/GridError.yaml - type: object properties: reason: diff --git a/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml b/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml index 83e0026..543ecce 100644 --- a/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml +++ b/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml @@ -1,5 +1,5 @@ allOf: - - $ref: ../common/Error.yaml + - $ref: ../common/GridError.yaml - type: object properties: requiredFields: diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index d69dfb1..26731ce 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -68,7 +68,18 @@ components: If the signature verification succeeds, the webhook is authentic. If not, it should be rejected. - + schemas: + AllErrors: + anyOf: + - $ref: components/schemas/errors/Error400.yaml + - $ref: components/schemas/errors/Error401.yaml + - $ref: components/schemas/errors/Error403.yaml + - $ref: components/schemas/errors/Error404.yaml + - $ref: components/schemas/errors/Error409.yaml + - $ref: components/schemas/errors/Error412.yaml + - $ref: components/schemas/errors/Error424.yaml + - $ref: components/schemas/errors/Error500.yaml + - $ref: components/schemas/errors/Error501.yaml paths: /config: $ref: paths/platform/config.yaml diff --git a/openapi/paths/customers/customers_{customerId}.yaml b/openapi/paths/customers/customers_{customerId}.yaml index 82a8593..f879c61 100644 --- a/openapi/paths/customers/customers_{customerId}.yaml +++ b/openapi/paths/customers/customers_{customerId}.yaml @@ -169,7 +169,7 @@ delete: content: application/json: schema: - $ref: ../../components/schemas/common/Error.yaml + $ref: ../../components/schemas/common/GridError.yaml '500': description: Internal service error content: diff --git a/openapi/paths/platform/platform_external_accounts.yaml b/openapi/paths/platform/platform_external_accounts.yaml index 15bc5fd..9a6920d 100644 --- a/openapi/paths/platform/platform_external_accounts.yaml +++ b/openapi/paths/platform/platform_external_accounts.yaml @@ -24,9 +24,9 @@ get: schema: type: object required: - - accounts + - data properties: - accounts: + data: type: array description: List of external accounts matching the filter criteria items: diff --git a/openapi/paths/quotes/quotes_{quoteId}_retry.yaml b/openapi/paths/quotes/quotes_{quoteId}_retry.yaml new file mode 100644 index 0000000..628757f --- /dev/null +++ b/openapi/paths/quotes/quotes_{quoteId}_retry.yaml @@ -0,0 +1,99 @@ +post: + summary: Retry an incomplete payment + description: > + In the case where a customer is debited but the Lightning payment fails to complete, integrators can retry the payment using this endpoint. + + + Payments retried with this endpoint will debit from the sender and deliver to the recipient the same amount as the original quote. + + As the Grid API does not persist customer PII, retries need to start with a lookup request to retrieve the original quote's recipient counter party data requirements then pass that sender information in the request body. + + Before calling this endpoint, you should reach out to the Lightspark team to investigate the underlying issue. As part of resolution, they'll update the transaction to the appropriate state. The quote / transaction to retry must be in a `FAILED` or `REFUNDED` state. + operationId: retryQuote + tags: + - Cross-Currency Transfers + security: + - BasicAuth: [] + parameters: + - name: quoteId + in: path + description: ID of the quote to retry + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + required: + - lookupId + properties: + lookupId: + type: string + description: >- + Unique identifier for the prior receiver uma address lookup + request. + example: Lookup:019542f5-b3e7-1d02-0000-000000000009 + senderCustomerInfo: + type: object + additionalProperties: true + description: > + Key-value pairs of information about the sender which was + requested by the counterparty (recipient) institution. + + Any fields specified in `requiredPayerDataFields` from the + response of the `/receiver/{receiverUmaAddress}` (lookupUma) + endpoint + + MUST be provided here if they were requested. If the + counterparty (recipient) institution did not request any + information, + + this field can be omitted. + example: + FULL_NAME: Jane Receiver + NATIONALITY: FR + responses: + '201': + description: > + Quote created successfully. The response includes payment instructions + + that the client can use to execute the payment through their banking + provider. + content: + application/json: + schema: + $ref: ../../components/schemas/quotes/Quote.yaml + '400': + description: Bad request - Missing or invalid parameters + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error400.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '422': + description: | + Unprocessable Entity - Additional counterparty information required, + or the payment cannot be completed for another reason. + content: + application/json: + schema: + allOf: + - $ref: ../../components/schemas/common/GridError.yaml + - type: object + properties: + code: + example: MISSING_MANDATORY_USER_INFO + message: + example: Additional counterparty information required + details: + example: + requiredFields: + - TAX_ID + - REGISTRATION_NUMBER From c8ee4aacabbb13a859f4dcd8271353a24ba3184c Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 16:14:27 -0800 Subject: [PATCH 05/10] fixing lint --- .stainless/stainless.yml | 4 + mintlify/openapi.yaml | 115 +----------------- openapi.yaml | 115 +----------------- .../customers/UltimateBeneficialOwner.yaml | 2 +- .../quotes/QuoteRealtimeFundingSource.yaml | 1 - openapi/paths/customers/customers.yaml | 44 ------- .../customers/customers_{customerId}.yaml | 27 ---- openapi/paths/quotes/quotes.yaml | 41 ------- 8 files changed, 7 insertions(+), 342 deletions(-) diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index e534b02..bf77dad 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -105,6 +105,8 @@ resources: external_account_info: '#/components/schemas/ExternalAccountInfo' external_account: '#/components/schemas/ExternalAccount' external_account_create: '#/components/schemas/ExternalAccountCreateRequest' + lightning_external_account_info: "#/components/schemas/LightningExternalAccountInfo" + ngn_account_external_account_info: "#/components/schemas/NgnAccountExternalAccountInfo" methods: list: get /customers/external-accounts create: post /customers/external-accounts @@ -169,6 +171,8 @@ resources: transaction_type: '#/components/schemas/TransactionType' incoming_transaction: '#/components/schemas/IncomingTransaction' transaction_status: '#/components/schemas/TransactionStatus' + account_source: "#/components/schemas/AccountSource" + uma_address_source: "#/components/schemas/UmaAddressSource" methods: list: get /transactions retrieve: get /transactions/{transactionId} diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 084f024..2f33f6f 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -155,50 +155,6 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateCustomerRequest' - examples: - individualCustomerWithUmaAddress: - summary: Create individual customer with UMA address, including deposit bank account information. - value: - umaAddress: $jane.doe@uma.domain.com - platformCustomerId: 7b3c5a89d2f1e0 - customerType: INDIVIDUAL - fullName: Jane Doe - birthDate: '1992-03-25' - address: - line1: 123 Pine Street - line2: Unit 501 - city: Seattle - state: WA - postalCode: '98101' - country: US - individualCustomerWithoutUmaAddress: - summary: Create individual customer without UMA address (will be generated) - value: - platformCustomerId: 7b3c5a89d2f1e0 - customerType: INDIVIDUAL - fullName: John Smith - birthDate: '1985-06-10' - address: - line1: 456 Oak Avenue - city: Portland - state: OR - postalCode: '97201' - country: US - businessCustomer: - summary: Create business customer example - value: - platformCustomerId: 6e4d2c0b8a9f3 - customerType: BUSINESS - businessInfo: - legalName: Acme Corporation - registrationNumber: BRN-456789123 - taxId: EIN-987123456 - address: - line1: 400 Commerce Way - city: Austin - state: TX - postalCode: '78701' - country: US responses: '201': description: Customer created successfully @@ -439,33 +395,6 @@ paths: application/json: schema: $ref: '#/components/schemas/UpdateCustomerRequest' - examples: - individualUpdate: - summary: Update individual customer example - value: - customerType: INDIVIDUAL - fullName: John Smith - birthDate: '1985-06-15' - address: - line1: 456 Market St - city: San Francisco - state: CA - postalCode: '94103' - country: US - businessUpdate: - summary: Update business customer example - value: - customerType: BUSINESS - businessInfo: - legalName: New Tech Solutions LLC - registrationNumber: BRN-987654321 - taxId: EIN-123456789 - address: - line1: 100 Technology Parkway - city: Palo Alto - state: CA - postalCode: '94304' - country: US responses: '200': description: Customer updated successfully @@ -1592,47 +1521,6 @@ paths: application/json: schema: $ref: '#/components/schemas/QuoteRequest' - examples: - accountToAccount: - summary: Account to Account Transfer - value: - source: - accountId: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - destination: - accountId: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: EUR - lockedCurrencySide: SENDING - lockedCurrencyAmount: 10000 - description: Transfer between accounts, either internal or external. - accountToUma: - summary: Account to UMA Address Transfer - value: - lookupId: LookupRequest:019542f5-b3e7-1d02-0000-000000000009 - source: - accountId: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - destination: - umaAddress: $receiver@uma.domain.com - currency: EUR - lockedCurrencySide: SENDING - lockedCurrencyAmount: 1000 - description: 'Payment for invoice #1234' - realTimeFundingToSparkWallet: - summary: Real-time funding to Spark Wallet as an on-ramp flow. Immediate execution. - value: - source: - customerId: Customer:019542f5-b3e7-1d02-0000-000000000009 - currency: USD - destination: - externalAccountDetails: - customerId: Customer:019542f5-b3e7-1d02-0000-000000000001 - currency: BTC - accountInfo: - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - lockedCurrencySide: RECEIVING - lockedCurrencyAmount: 10000 - immediatelyExecute: true - description: Bitcoin reward payout! responses: '201': description: | @@ -4274,7 +4162,7 @@ components: phoneNumber: type: string description: Phone number of the individual in E.164 format - example: 5555555555 + example: '+5555555555' pattern: ^\+[1-9]\d{1,14}$ taxId: type: string @@ -5959,7 +5847,6 @@ components: required: - sourceType - currency - - customerId properties: sourceType: type: string diff --git a/openapi.yaml b/openapi.yaml index 084f024..2f33f6f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -155,50 +155,6 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateCustomerRequest' - examples: - individualCustomerWithUmaAddress: - summary: Create individual customer with UMA address, including deposit bank account information. - value: - umaAddress: $jane.doe@uma.domain.com - platformCustomerId: 7b3c5a89d2f1e0 - customerType: INDIVIDUAL - fullName: Jane Doe - birthDate: '1992-03-25' - address: - line1: 123 Pine Street - line2: Unit 501 - city: Seattle - state: WA - postalCode: '98101' - country: US - individualCustomerWithoutUmaAddress: - summary: Create individual customer without UMA address (will be generated) - value: - platformCustomerId: 7b3c5a89d2f1e0 - customerType: INDIVIDUAL - fullName: John Smith - birthDate: '1985-06-10' - address: - line1: 456 Oak Avenue - city: Portland - state: OR - postalCode: '97201' - country: US - businessCustomer: - summary: Create business customer example - value: - platformCustomerId: 6e4d2c0b8a9f3 - customerType: BUSINESS - businessInfo: - legalName: Acme Corporation - registrationNumber: BRN-456789123 - taxId: EIN-987123456 - address: - line1: 400 Commerce Way - city: Austin - state: TX - postalCode: '78701' - country: US responses: '201': description: Customer created successfully @@ -439,33 +395,6 @@ paths: application/json: schema: $ref: '#/components/schemas/UpdateCustomerRequest' - examples: - individualUpdate: - summary: Update individual customer example - value: - customerType: INDIVIDUAL - fullName: John Smith - birthDate: '1985-06-15' - address: - line1: 456 Market St - city: San Francisco - state: CA - postalCode: '94103' - country: US - businessUpdate: - summary: Update business customer example - value: - customerType: BUSINESS - businessInfo: - legalName: New Tech Solutions LLC - registrationNumber: BRN-987654321 - taxId: EIN-123456789 - address: - line1: 100 Technology Parkway - city: Palo Alto - state: CA - postalCode: '94304' - country: US responses: '200': description: Customer updated successfully @@ -1592,47 +1521,6 @@ paths: application/json: schema: $ref: '#/components/schemas/QuoteRequest' - examples: - accountToAccount: - summary: Account to Account Transfer - value: - source: - accountId: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - destination: - accountId: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: EUR - lockedCurrencySide: SENDING - lockedCurrencyAmount: 10000 - description: Transfer between accounts, either internal or external. - accountToUma: - summary: Account to UMA Address Transfer - value: - lookupId: LookupRequest:019542f5-b3e7-1d02-0000-000000000009 - source: - accountId: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - destination: - umaAddress: $receiver@uma.domain.com - currency: EUR - lockedCurrencySide: SENDING - lockedCurrencyAmount: 1000 - description: 'Payment for invoice #1234' - realTimeFundingToSparkWallet: - summary: Real-time funding to Spark Wallet as an on-ramp flow. Immediate execution. - value: - source: - customerId: Customer:019542f5-b3e7-1d02-0000-000000000009 - currency: USD - destination: - externalAccountDetails: - customerId: Customer:019542f5-b3e7-1d02-0000-000000000001 - currency: BTC - accountInfo: - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - lockedCurrencySide: RECEIVING - lockedCurrencyAmount: 10000 - immediatelyExecute: true - description: Bitcoin reward payout! responses: '201': description: | @@ -4274,7 +4162,7 @@ components: phoneNumber: type: string description: Phone number of the individual in E.164 format - example: 5555555555 + example: '+5555555555' pattern: ^\+[1-9]\d{1,14}$ taxId: type: string @@ -5959,7 +5847,6 @@ components: required: - sourceType - currency - - customerId properties: sourceType: type: string diff --git a/openapi/components/schemas/customers/UltimateBeneficialOwner.yaml b/openapi/components/schemas/customers/UltimateBeneficialOwner.yaml index 388a3c3..4cee1fe 100644 --- a/openapi/components/schemas/customers/UltimateBeneficialOwner.yaml +++ b/openapi/components/schemas/customers/UltimateBeneficialOwner.yaml @@ -15,7 +15,7 @@ properties: phoneNumber: type: string description: Phone number of the individual in E.164 format - example: +5555555555 + example: '+5555555555' pattern: '^\+[1-9]\d{1,14}$' taxId: type: string diff --git a/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml b/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml index f0f4b4e..8f033e8 100644 --- a/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml +++ b/openapi/components/schemas/quotes/QuoteRealtimeFundingSource.yaml @@ -2,7 +2,6 @@ type: object required: - sourceType - currency - - customerId properties: sourceType: type: string diff --git a/openapi/paths/customers/customers.yaml b/openapi/paths/customers/customers.yaml index 349c91b..66b5188 100644 --- a/openapi/paths/customers/customers.yaml +++ b/openapi/paths/customers/customers.yaml @@ -14,50 +14,6 @@ post: application/json: schema: $ref: ../../components/schemas/customers/CreateCustomerRequest.yaml - examples: - individualCustomerWithUmaAddress: - summary: Create individual customer with UMA address, including deposit bank account information. - value: - umaAddress: $jane.doe@uma.domain.com - platformCustomerId: 7b3c5a89d2f1e0 - customerType: INDIVIDUAL - fullName: Jane Doe - birthDate: '1992-03-25' - address: - line1: 123 Pine Street - line2: Unit 501 - city: Seattle - state: WA - postalCode: '98101' - country: US - individualCustomerWithoutUmaAddress: - summary: Create individual customer without UMA address (will be generated) - value: - platformCustomerId: 7b3c5a89d2f1e0 - customerType: INDIVIDUAL - fullName: John Smith - birthDate: '1985-06-10' - address: - line1: 456 Oak Avenue - city: Portland - state: OR - postalCode: '97201' - country: US - businessCustomer: - summary: Create business customer example - value: - platformCustomerId: 6e4d2c0b8a9f3 - customerType: BUSINESS - businessInfo: - legalName: Acme Corporation - registrationNumber: BRN-456789123 - taxId: EIN-987123456 - address: - line1: 400 Commerce Way - city: Austin - state: TX - postalCode: '78701' - country: US responses: '201': description: Customer created successfully diff --git a/openapi/paths/customers/customers_{customerId}.yaml b/openapi/paths/customers/customers_{customerId}.yaml index f879c61..de62fda 100644 --- a/openapi/paths/customers/customers_{customerId}.yaml +++ b/openapi/paths/customers/customers_{customerId}.yaml @@ -61,33 +61,6 @@ patch: application/json: schema: $ref: ../../components/schemas/customers/UpdateCustomerRequest.yaml - examples: - individualUpdate: - summary: Update individual customer example - value: - customerType: INDIVIDUAL - fullName: John Smith - birthDate: '1985-06-15' - address: - line1: 456 Market St - city: San Francisco - state: CA - postalCode: '94103' - country: US - businessUpdate: - summary: Update business customer example - value: - customerType: BUSINESS - businessInfo: - legalName: New Tech Solutions LLC - registrationNumber: BRN-987654321 - taxId: EIN-123456789 - address: - line1: 100 Technology Parkway - city: Palo Alto - state: CA - postalCode: '94304' - country: US responses: '200': description: Customer updated successfully diff --git a/openapi/paths/quotes/quotes.yaml b/openapi/paths/quotes/quotes.yaml index 30c5e75..05b660a 100644 --- a/openapi/paths/quotes/quotes.yaml +++ b/openapi/paths/quotes/quotes.yaml @@ -37,47 +37,6 @@ post: application/json: schema: $ref: ../../components/schemas/quotes/QuoteRequest.yaml - examples: - accountToAccount: - summary: Account to Account Transfer - value: - source: - accountId: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - destination: - accountId: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: EUR - lockedCurrencySide: SENDING - lockedCurrencyAmount: 10000 - description: 'Transfer between accounts, either internal or external.' - accountToUma: - summary: Account to UMA Address Transfer - value: - lookupId: LookupRequest:019542f5-b3e7-1d02-0000-000000000009 - source: - accountId: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - destination: - umaAddress: $receiver@uma.domain.com - currency: EUR - lockedCurrencySide: SENDING - lockedCurrencyAmount: 1000 - description: 'Payment for invoice #1234' - realTimeFundingToSparkWallet: - summary: Real-time funding to Spark Wallet as an on-ramp flow. Immediate execution. - value: - source: - customerId: Customer:019542f5-b3e7-1d02-0000-000000000009 - currency: USD - destination: - externalAccountDetails: - customerId: Customer:019542f5-b3e7-1d02-0000-000000000001 - currency: BTC - accountInfo: - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - lockedCurrencySide: RECEIVING - lockedCurrencyAmount: 10000 - immediatelyExecute: true - description: 'Bitcoin reward payout!' responses: '201': description: | From 065f02bc3219361277f946d7b9fc97002788b80f Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 16:25:08 -0800 Subject: [PATCH 06/10] fixing examples --- mintlify/openapi.yaml | 112 ++++-------------- openapi.yaml | 112 ++++-------------- .../common/PaymentLightningInvoiceInfo.yaml | 3 +- openapi/components/schemas/quotes/Quote.yaml | 9 -- .../transactions/OutgoingTransaction.yaml | 9 -- 5 files changed, 45 insertions(+), 200 deletions(-) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 2f33f6f..fd90680 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -4662,40 +4662,8 @@ components: type: string description: Invoice for the payment example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s - NgnAccountInfo: - type: object - required: - - accountType - - accountNumber - - bankName - properties: - accountType: - const: NGN_ACCOUNT - example: NGN_ACCOUNT - accountNumber: - type: string - description: Nigerian bank account number - example: '0123456789' - minLength: 10 - maxLength: 10 - pattern: ^[0-9]{10}$ - bankName: - type: string - description: Name of the bank - example: First Bank of Nigeria - PaymentNgnAccountInfo: - allOf: - - $ref: '#/components/schemas/NgnAccountInfo' - 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 PaymentLightningInvoiceInfo: - allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' + type: object required: - accountType - invoice @@ -4772,45 +4740,6 @@ components: type: string description: Type of asset const: USDC - BankAccountOrWalletType: - type: string - enum: - - CLABE - - US_ACCOUNT - - PIX - - IBAN - - FBO - - UPI - - NGN_ACCOUNT - - SPARK_WALLET - - LIGHTNING - - SOLANA_WALLET - - TRON_WALLET - - POLYGON_WALLET - - BASE_WALLET - description: Type of account or wallet information - PaymentAccountOrWalletInfo: - type: object - required: - - accountType - properties: - accountType: - $ref: '#/components/schemas/BankAccountOrWalletType' - discriminator: - propertyName: accountType - mapping: - CLABE: '#/components/schemas/PaymentClabeAccountInfo' - US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' - PIX: '#/components/schemas/PaymentPixAccountInfo' - IBAN: '#/components/schemas/PaymentIbanAccountInfo' - FBO: '#/components/schemas/PaymentFboAccountInfo' - UPI: '#/components/schemas/PaymentUpiAccountInfo' - NGN_ACCOUNT: '#/components/schemas/PaymentNgnAccountInfo' - SPARK_WALLET: '#/components/schemas/PaymentSparkWalletInfo' - LIGHTNING: '#/components/schemas/PaymentLightningInvoiceInfo' - SOLANA_WALLET: '#/components/schemas/PaymentSolanaWalletInfo' - TRON_WALLET: '#/components/schemas/PaymentTronWalletInfo' - POLYGON_WALLET: '#/components/schemas/PaymentPolygonWalletInfo' BaseWalletInfo: type: object required: @@ -5075,6 +5004,27 @@ components: mapping: INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' + NgnAccountInfo: + type: object + required: + - accountType + - accountNumber + - bankName + properties: + accountType: + const: NGN_ACCOUNT + example: NGN_ACCOUNT + accountNumber: + type: string + description: Nigerian bank account number + example: '0123456789' + minLength: 10 + maxLength: 10 + pattern: ^[0-9]{10}$ + bankName: + type: string + description: Name of the bank + example: First Bank of Nigeria NgnAccountExternalAccountInfo: allOf: - $ref: '#/components/schemas/NgnAccountInfo' @@ -5654,15 +5604,6 @@ components: description: Payment instructions for executing the payment. items: $ref: '#/components/schemas/PaymentInstructions' - example: - - accountType: US_ACCOUNT - accountNumber: '1234567890' - routingNumber: '021000021' - bankName: Chase Bank - referenceCode: REF123456 - - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - invoice: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs refund: $ref: '#/components/schemas/Refund' description: The refund if transaction was refunded. @@ -6005,15 +5946,6 @@ components: description: Payment instructions for executing the payment. This is not required when using an internal account source. items: $ref: '#/components/schemas/PaymentInstructions' - example: - - accountType: US_ACCOUNT - accountNumber: '1234567890' - routingNumber: '021000021' - bankName: Chase Bank - referenceCode: REF123456 - - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - invoice: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs transactionId: type: string description: The ID of the transaction created from this quote. diff --git a/openapi.yaml b/openapi.yaml index 2f33f6f..fd90680 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4662,40 +4662,8 @@ components: type: string description: Invoice for the payment example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s - NgnAccountInfo: - type: object - required: - - accountType - - accountNumber - - bankName - properties: - accountType: - const: NGN_ACCOUNT - example: NGN_ACCOUNT - accountNumber: - type: string - description: Nigerian bank account number - example: '0123456789' - minLength: 10 - maxLength: 10 - pattern: ^[0-9]{10}$ - bankName: - type: string - description: Name of the bank - example: First Bank of Nigeria - PaymentNgnAccountInfo: - allOf: - - $ref: '#/components/schemas/NgnAccountInfo' - 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 PaymentLightningInvoiceInfo: - allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' + type: object required: - accountType - invoice @@ -4772,45 +4740,6 @@ components: type: string description: Type of asset const: USDC - BankAccountOrWalletType: - type: string - enum: - - CLABE - - US_ACCOUNT - - PIX - - IBAN - - FBO - - UPI - - NGN_ACCOUNT - - SPARK_WALLET - - LIGHTNING - - SOLANA_WALLET - - TRON_WALLET - - POLYGON_WALLET - - BASE_WALLET - description: Type of account or wallet information - PaymentAccountOrWalletInfo: - type: object - required: - - accountType - properties: - accountType: - $ref: '#/components/schemas/BankAccountOrWalletType' - discriminator: - propertyName: accountType - mapping: - CLABE: '#/components/schemas/PaymentClabeAccountInfo' - US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' - PIX: '#/components/schemas/PaymentPixAccountInfo' - IBAN: '#/components/schemas/PaymentIbanAccountInfo' - FBO: '#/components/schemas/PaymentFboAccountInfo' - UPI: '#/components/schemas/PaymentUpiAccountInfo' - NGN_ACCOUNT: '#/components/schemas/PaymentNgnAccountInfo' - SPARK_WALLET: '#/components/schemas/PaymentSparkWalletInfo' - LIGHTNING: '#/components/schemas/PaymentLightningInvoiceInfo' - SOLANA_WALLET: '#/components/schemas/PaymentSolanaWalletInfo' - TRON_WALLET: '#/components/schemas/PaymentTronWalletInfo' - POLYGON_WALLET: '#/components/schemas/PaymentPolygonWalletInfo' BaseWalletInfo: type: object required: @@ -5075,6 +5004,27 @@ components: mapping: INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' + NgnAccountInfo: + type: object + required: + - accountType + - accountNumber + - bankName + properties: + accountType: + const: NGN_ACCOUNT + example: NGN_ACCOUNT + accountNumber: + type: string + description: Nigerian bank account number + example: '0123456789' + minLength: 10 + maxLength: 10 + pattern: ^[0-9]{10}$ + bankName: + type: string + description: Name of the bank + example: First Bank of Nigeria NgnAccountExternalAccountInfo: allOf: - $ref: '#/components/schemas/NgnAccountInfo' @@ -5654,15 +5604,6 @@ components: description: Payment instructions for executing the payment. items: $ref: '#/components/schemas/PaymentInstructions' - example: - - accountType: US_ACCOUNT - accountNumber: '1234567890' - routingNumber: '021000021' - bankName: Chase Bank - referenceCode: REF123456 - - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - invoice: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs refund: $ref: '#/components/schemas/Refund' description: The refund if transaction was refunded. @@ -6005,15 +5946,6 @@ components: description: Payment instructions for executing the payment. This is not required when using an internal account source. items: $ref: '#/components/schemas/PaymentInstructions' - example: - - accountType: US_ACCOUNT - accountNumber: '1234567890' - routingNumber: '021000021' - bankName: Chase Bank - referenceCode: REF123456 - - accountType: SPARK_WALLET - address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu - invoice: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs transactionId: type: string description: The ID of the transaction created from this quote. diff --git a/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml b/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml index 514e4bd..a18bb24 100644 --- a/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml +++ b/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml @@ -1,5 +1,4 @@ -allOf: - - $ref: ./PaymentAccountOrWalletInfo.yaml +type: object required: - accountType - invoice diff --git a/openapi/components/schemas/quotes/Quote.yaml b/openapi/components/schemas/quotes/Quote.yaml index 1dd3434..e3fdd08 100644 --- a/openapi/components/schemas/quotes/Quote.yaml +++ b/openapi/components/schemas/quotes/Quote.yaml @@ -91,15 +91,6 @@ properties: description: Payment instructions for executing the payment. This is not required when using an internal account source. items: $ref: ../common/PaymentInstructions.yaml - example: - - accountType: US_ACCOUNT - accountNumber: "1234567890" - routingNumber: "021000021" - bankName: "Chase Bank" - referenceCode: "REF123456" - - accountType: SPARK_WALLET - address: "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu" - invoice: "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs" transactionId: type: string description: The ID of the transaction created from this quote. diff --git a/openapi/components/schemas/transactions/OutgoingTransaction.yaml b/openapi/components/schemas/transactions/OutgoingTransaction.yaml index d74532b..88ad323 100644 --- a/openapi/components/schemas/transactions/OutgoingTransaction.yaml +++ b/openapi/components/schemas/transactions/OutgoingTransaction.yaml @@ -50,15 +50,6 @@ allOf: description: Payment instructions for executing the payment. items: $ref: ../common/PaymentInstructions.yaml - example: - - accountType: US_ACCOUNT - accountNumber: "1234567890" - routingNumber: "021000021" - bankName: "Chase Bank" - referenceCode: "REF123456" - - accountType: SPARK_WALLET - address: "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu" - invoice: "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs" refund: $ref: ../common/Refund.yaml description: The refund if transaction was refunded. From d928df17cec7f4475ee725340f2e68c37370de12 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 16:28:04 -0800 Subject: [PATCH 07/10] adding extra line at end --- .../schemas/external_accounts/LightningExternalAccountInfo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml index 453dd90..a77cb28 100644 --- a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml @@ -16,4 +16,4 @@ properties: lightningAddress: type: string description: A lightning address which can be used as a payment destination. Note that for UMA addresses, no external account is needed. You can use the UMA address directly as a destination. - example: john.doe@lightningwallet.com \ No newline at end of file + example: john.doe@lightningwallet.com From 13ee0309c184c046e7835c9cfde6f35a7f34c979 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 16:36:59 -0800 Subject: [PATCH 08/10] fixing rebase issue --- .../paths/quotes/quotes_{quoteId}_retry.yaml | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100644 openapi/paths/quotes/quotes_{quoteId}_retry.yaml diff --git a/openapi/paths/quotes/quotes_{quoteId}_retry.yaml b/openapi/paths/quotes/quotes_{quoteId}_retry.yaml deleted file mode 100644 index 628757f..0000000 --- a/openapi/paths/quotes/quotes_{quoteId}_retry.yaml +++ /dev/null @@ -1,99 +0,0 @@ -post: - summary: Retry an incomplete payment - description: > - In the case where a customer is debited but the Lightning payment fails to complete, integrators can retry the payment using this endpoint. - - - Payments retried with this endpoint will debit from the sender and deliver to the recipient the same amount as the original quote. - - As the Grid API does not persist customer PII, retries need to start with a lookup request to retrieve the original quote's recipient counter party data requirements then pass that sender information in the request body. - - Before calling this endpoint, you should reach out to the Lightspark team to investigate the underlying issue. As part of resolution, they'll update the transaction to the appropriate state. The quote / transaction to retry must be in a `FAILED` or `REFUNDED` state. - operationId: retryQuote - tags: - - Cross-Currency Transfers - security: - - BasicAuth: [] - parameters: - - name: quoteId - in: path - description: ID of the quote to retry - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - required: - - lookupId - properties: - lookupId: - type: string - description: >- - Unique identifier for the prior receiver uma address lookup - request. - example: Lookup:019542f5-b3e7-1d02-0000-000000000009 - senderCustomerInfo: - type: object - additionalProperties: true - description: > - Key-value pairs of information about the sender which was - requested by the counterparty (recipient) institution. - - Any fields specified in `requiredPayerDataFields` from the - response of the `/receiver/{receiverUmaAddress}` (lookupUma) - endpoint - - MUST be provided here if they were requested. If the - counterparty (recipient) institution did not request any - information, - - this field can be omitted. - example: - FULL_NAME: Jane Receiver - NATIONALITY: FR - responses: - '201': - description: > - Quote created successfully. The response includes payment instructions - - that the client can use to execute the payment through their banking - provider. - content: - application/json: - schema: - $ref: ../../components/schemas/quotes/Quote.yaml - '400': - description: Bad request - Missing or invalid parameters - content: - application/json: - schema: - $ref: ../../components/schemas/errors/Error400.yaml - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: ../../components/schemas/errors/Error401.yaml - '422': - description: | - Unprocessable Entity - Additional counterparty information required, - or the payment cannot be completed for another reason. - content: - application/json: - schema: - allOf: - - $ref: ../../components/schemas/common/GridError.yaml - - type: object - properties: - code: - example: MISSING_MANDATORY_USER_INFO - message: - example: Additional counterparty information required - details: - example: - requiredFields: - - TAX_ID - - REGISTRATION_NUMBER From e669dac8f94a0c0c1b9a8a8886fd40aec8718a17 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 16:40:23 -0800 Subject: [PATCH 09/10] updaing stainless config --- .stainless/stainless.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index bf77dad..8f4aa1e 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -154,7 +154,6 @@ resources: quotes: models: currency: '#/components/schemas/Currency' - payment_account_or_wallet_info: '#/components/schemas/PaymentAccountOrWalletInfo' payment_instructions: '#/components/schemas/PaymentInstructions' outgoing_rate_details: '#/components/schemas/OutgoingRateDetails' quote_source: '#/components/schemas/QuoteSource' @@ -163,7 +162,6 @@ resources: retrieve: get /quotes/{quoteId} create: post /quotes list: get /quotes - retry: post /quotes/{quoteId}/retry execute: post /quotes/{quoteId}/execute transactions: From 16305aa16bf3b12be8827c0c3ce5741df85dcc75 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 16:56:53 -0800 Subject: [PATCH 10/10] adding lint ignore for false positive errors --- .redocly.lint-ignore.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.redocly.lint-ignore.yaml b/.redocly.lint-ignore.yaml index d1f236a..5a21589 100644 --- a/.redocly.lint-ignore.yaml +++ b/.redocly.lint-ignore.yaml @@ -3,6 +3,9 @@ openapi.yaml: no-unused-components: - '#/components/schemas/AllErrors' + no-required-schema-properties-undefined: + - '#/components/schemas/QuoteSource/required/0' + - '#/components/schemas/Quote/properties/destination/required/0' no-invalid-media-type-examples: - >- #/paths/~1customers~1external-accounts/post/requestBody/content/application~1json/schema