From 20690d5a564c6bc386dca80a98186d1071a466a1 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Thu, 22 Jan 2026 15:41:31 -0800 Subject: [PATCH 1/3] 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 10af874..9eeaa43 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -4129,8 +4129,7 @@ components: - code properties: status: - enum: - - 401 + const: 401 type: integer description: HTTP status code code: @@ -4157,8 +4156,7 @@ components: - code properties: status: - enum: - - 500 + const: 500 type: integer description: HTTP status code code: @@ -4185,8 +4183,7 @@ components: - code properties: status: - enum: - - 400 + const: 400 type: integer description: HTTP status code code: @@ -4263,8 +4260,7 @@ components: - code properties: status: - enum: - - 501 + const: 501 type: integer description: HTTP status code code: @@ -4489,8 +4485,7 @@ components: properties: customerType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL description: Customer type fullName: type: string @@ -4521,8 +4516,7 @@ components: properties: customerType: type: string - enum: - - BUSINESS + const: BUSINESS description: Customer type umaAddress: type: string @@ -4557,8 +4551,7 @@ components: - code properties: status: - enum: - - 409 + const: 409 type: integer description: HTTP status code code: @@ -4585,8 +4578,7 @@ components: - code properties: status: - enum: - - 404 + const: 404 type: integer description: HTTP status code code: @@ -4662,9 +4654,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 @@ -4673,28 +4680,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: @@ -4704,9 +4689,7 @@ components: - accountCategory properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT accountNumber: type: string @@ -4732,7 +4715,6 @@ components: example: Chase Bank PaymentUsAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/UsAccountInfo' required: - reference @@ -4750,9 +4732,7 @@ components: - taxId properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX pixKey: type: string @@ -4774,7 +4754,6 @@ components: example: '1234567890' PaymentPixAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/PixAccountInfo' IbanAccountInfo: type: object @@ -4784,9 +4763,7 @@ components: - swiftBic properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN iban: type: string @@ -4802,7 +4779,6 @@ components: maxLength: 11 PaymentIbanAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/IbanAccountInfo' required: - reference @@ -4813,12 +4789,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 @@ -4838,9 +4817,7 @@ components: - vpa properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI vpa: type: string @@ -4848,8 +4825,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: @@ -4858,9 +4863,7 @@ components: - bankName properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT accountNumber: type: string @@ -4875,7 +4878,6 @@ components: example: First Bank of Nigeria PaymentNgnAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/NgnAccountInfo' required: - reference @@ -4884,38 +4886,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' @@ -4924,9 +4894,7 @@ components: - invoice properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING invoice: type: string @@ -4939,9 +4907,7 @@ components: - address properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET address: type: string @@ -4949,7 +4915,6 @@ components: example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg PaymentSolanaWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/SolanaWalletInfo' properties: assetType: @@ -4965,9 +4930,7 @@ components: - address properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET address: type: string @@ -4975,14 +4938,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: @@ -4990,9 +4951,7 @@ components: - address properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET address: type: string @@ -5000,14 +4959,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: @@ -5025,24 +4982,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: @@ -5050,9 +5011,7 @@ components: - address properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET address: type: string @@ -5060,14 +5019,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: @@ -5170,8 +5127,7 @@ components: properties: beneficiaryType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL example: INDIVIDUAL fullName: type: string @@ -5196,8 +5152,7 @@ components: properties: beneficiaryType: type: string - enum: - - BUSINESS + const: BUSINESS example: BUSINESS legalName: type: string @@ -5222,9 +5177,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT beneficiary: oneOf: @@ -5243,9 +5196,7 @@ components: - accountType properties: accountType: - type: string - enum: - - CLABE + const: CLABE example: CLABE beneficiary: oneOf: @@ -5264,9 +5215,7 @@ components: - accountType properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX beneficiary: oneOf: @@ -5285,9 +5234,7 @@ components: - accountType properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN beneficiary: oneOf: @@ -5306,9 +5253,7 @@ components: - accountType properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI beneficiary: oneOf: @@ -5329,9 +5274,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT beneficiary: oneOf: @@ -5367,9 +5310,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SPARK_WALLET + const: SPARK_WALLET example: SPARK_WALLET LightningExternalAccountInfo: allOf: @@ -5378,9 +5319,7 @@ components: - accountType properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING - oneOf: - title: Lightning Invoice @@ -5418,9 +5357,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET TronWalletExternalAccountInfo: allOf: @@ -5430,9 +5367,7 @@ components: - accountType properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET PolygonWalletExternalAccountInfo: allOf: @@ -5442,9 +5377,7 @@ components: - accountType properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET BaseWalletExternalAccountInfo: allOf: @@ -5454,9 +5387,7 @@ components: - accountType properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET ExternalAccountInfo: oneOf: @@ -6036,8 +5967,7 @@ components: - code properties: status: - enum: - - 412 + const: 412 type: integer description: HTTP status code code: @@ -6046,8 +5976,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 @@ -6062,8 +5991,7 @@ components: - code properties: status: - enum: - - 424 + const: 424 type: integer description: HTTP status code code: @@ -6488,8 +6416,7 @@ components: - code properties: status: - enum: - - 403 + const: 403 type: integer description: HTTP status code code: @@ -6704,8 +6631,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 10af874..9eeaa43 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4129,8 +4129,7 @@ components: - code properties: status: - enum: - - 401 + const: 401 type: integer description: HTTP status code code: @@ -4157,8 +4156,7 @@ components: - code properties: status: - enum: - - 500 + const: 500 type: integer description: HTTP status code code: @@ -4185,8 +4183,7 @@ components: - code properties: status: - enum: - - 400 + const: 400 type: integer description: HTTP status code code: @@ -4263,8 +4260,7 @@ components: - code properties: status: - enum: - - 501 + const: 501 type: integer description: HTTP status code code: @@ -4489,8 +4485,7 @@ components: properties: customerType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL description: Customer type fullName: type: string @@ -4521,8 +4516,7 @@ components: properties: customerType: type: string - enum: - - BUSINESS + const: BUSINESS description: Customer type umaAddress: type: string @@ -4557,8 +4551,7 @@ components: - code properties: status: - enum: - - 409 + const: 409 type: integer description: HTTP status code code: @@ -4585,8 +4578,7 @@ components: - code properties: status: - enum: - - 404 + const: 404 type: integer description: HTTP status code code: @@ -4662,9 +4654,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 @@ -4673,28 +4680,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: @@ -4704,9 +4689,7 @@ components: - accountCategory properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT accountNumber: type: string @@ -4732,7 +4715,6 @@ components: example: Chase Bank PaymentUsAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/UsAccountInfo' required: - reference @@ -4750,9 +4732,7 @@ components: - taxId properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX pixKey: type: string @@ -4774,7 +4754,6 @@ components: example: '1234567890' PaymentPixAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/PixAccountInfo' IbanAccountInfo: type: object @@ -4784,9 +4763,7 @@ components: - swiftBic properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN iban: type: string @@ -4802,7 +4779,6 @@ components: maxLength: 11 PaymentIbanAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/IbanAccountInfo' required: - reference @@ -4813,12 +4789,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 @@ -4838,9 +4817,7 @@ components: - vpa properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI vpa: type: string @@ -4848,8 +4825,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: @@ -4858,9 +4863,7 @@ components: - bankName properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT accountNumber: type: string @@ -4875,7 +4878,6 @@ components: example: First Bank of Nigeria PaymentNgnAccountInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/NgnAccountInfo' required: - reference @@ -4884,38 +4886,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' @@ -4924,9 +4894,7 @@ components: - invoice properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING invoice: type: string @@ -4939,9 +4907,7 @@ components: - address properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET address: type: string @@ -4949,7 +4915,6 @@ components: example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg PaymentSolanaWalletInfo: allOf: - - $ref: '#/components/schemas/PaymentAccountOrWalletInfo' - $ref: '#/components/schemas/SolanaWalletInfo' properties: assetType: @@ -4965,9 +4930,7 @@ components: - address properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET address: type: string @@ -4975,14 +4938,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: @@ -4990,9 +4951,7 @@ components: - address properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET address: type: string @@ -5000,14 +4959,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: @@ -5025,24 +4982,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: @@ -5050,9 +5011,7 @@ components: - address properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET address: type: string @@ -5060,14 +5019,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: @@ -5170,8 +5127,7 @@ components: properties: beneficiaryType: type: string - enum: - - INDIVIDUAL + const: INDIVIDUAL example: INDIVIDUAL fullName: type: string @@ -5196,8 +5152,7 @@ components: properties: beneficiaryType: type: string - enum: - - BUSINESS + const: BUSINESS example: BUSINESS legalName: type: string @@ -5222,9 +5177,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - US_ACCOUNT + const: US_ACCOUNT example: US_ACCOUNT beneficiary: oneOf: @@ -5243,9 +5196,7 @@ components: - accountType properties: accountType: - type: string - enum: - - CLABE + const: CLABE example: CLABE beneficiary: oneOf: @@ -5264,9 +5215,7 @@ components: - accountType properties: accountType: - type: string - enum: - - PIX + const: PIX example: PIX beneficiary: oneOf: @@ -5285,9 +5234,7 @@ components: - accountType properties: accountType: - type: string - enum: - - IBAN + const: IBAN example: IBAN beneficiary: oneOf: @@ -5306,9 +5253,7 @@ components: - accountType properties: accountType: - type: string - enum: - - UPI + const: UPI example: UPI beneficiary: oneOf: @@ -5329,9 +5274,7 @@ components: - beneficiary properties: accountType: - type: string - enum: - - NGN_ACCOUNT + const: NGN_ACCOUNT example: NGN_ACCOUNT beneficiary: oneOf: @@ -5367,9 +5310,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SPARK_WALLET + const: SPARK_WALLET example: SPARK_WALLET LightningExternalAccountInfo: allOf: @@ -5378,9 +5319,7 @@ components: - accountType properties: accountType: - type: string - enum: - - LIGHTNING + const: LIGHTNING example: LIGHTNING - oneOf: - title: Lightning Invoice @@ -5418,9 +5357,7 @@ components: - accountType properties: accountType: - type: string - enum: - - SOLANA_WALLET + const: SOLANA_WALLET example: SOLANA_WALLET TronWalletExternalAccountInfo: allOf: @@ -5430,9 +5367,7 @@ components: - accountType properties: accountType: - type: string - enum: - - TRON_WALLET + const: TRON_WALLET example: TRON_WALLET PolygonWalletExternalAccountInfo: allOf: @@ -5442,9 +5377,7 @@ components: - accountType properties: accountType: - type: string - enum: - - POLYGON_WALLET + const: POLYGON_WALLET example: POLYGON_WALLET BaseWalletExternalAccountInfo: allOf: @@ -5454,9 +5387,7 @@ components: - accountType properties: accountType: - type: string - enum: - - BASE_WALLET + const: BASE_WALLET example: BASE_WALLET ExternalAccountInfo: oneOf: @@ -6036,8 +5967,7 @@ components: - code properties: status: - enum: - - 412 + const: 412 type: integer description: HTTP status code code: @@ -6046,8 +5976,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 @@ -6062,8 +5991,7 @@ components: - code properties: status: - enum: - - 424 + const: 424 type: integer description: HTTP status code code: @@ -6488,8 +6416,7 @@ components: - code properties: status: - enum: - - 403 + const: 403 type: integer description: HTTP status code code: @@ -6704,8 +6631,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 7b884afe252762bfc8b5ace44c5e3e8c56614d3e Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Thu, 22 Jan 2026 15:46:09 -0800 Subject: [PATCH 2/3] 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 9eeaa43..57cd735 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -5325,8 +5325,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 @@ -5334,8 +5338,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 @@ -5343,12 +5351,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 9eeaa43..57cd735 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5325,8 +5325,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 @@ -5334,8 +5338,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 @@ -5343,12 +5351,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 130a06ebd7117430dfc493ee240aff1dac20a77b Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 23 Jan 2026 12:51:30 -0800 Subject: [PATCH 3/3] 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 57cd735..546d029 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 @@ -4502,6 +4445,10 @@ components: example: US address: $ref: '#/components/schemas/Address' + platformCustomerId: + type: string + description: Platform-specific customer identifier + example: 9f84e0c2a72c4fa umaAddress: type: string description: | @@ -4543,6 +4490,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: @@ -4621,6 +4580,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: @@ -5313,56 +5284,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' @@ -5577,34 +5517,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) @@ -5926,6 +5845,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: @@ -6028,37 +5986,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: @@ -6103,43 +6126,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 57cd735..546d029 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 @@ -4502,6 +4445,10 @@ components: example: US address: $ref: '#/components/schemas/Address' + platformCustomerId: + type: string + description: Platform-specific customer identifier + example: 9f84e0c2a72c4fa umaAddress: type: string description: | @@ -4543,6 +4490,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: @@ -4621,6 +4580,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: @@ -5313,56 +5284,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' @@ -5577,34 +5517,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) @@ -5926,6 +5845,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: @@ -6028,37 +5986,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: @@ -6103,43 +6126,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