From a4fb73cc0906113ca4646b3d5d593fb36753ad07 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Wed, 28 Jan 2026 11:25:16 -0800 Subject: [PATCH] fix: reverting back to using enums instead of const for openapi generator --- mintlify/openapi.yaml | 1298 ++++++++++------- openapi.yaml | 1298 ++++++++++------- .../common/BankAccountOrWalletType.yaml | 1 - .../common/BasePaymentAccountInfo.yaml | 21 + .../schemas/common/BaseWalletInfo.yaml | 2 +- .../schemas/common/ClabeAccountInfo.yaml | 2 +- .../schemas/common/FboAccountInfo.yaml | 2 +- .../schemas/common/IbanAccountInfo.yaml | 2 +- .../schemas/common/NgnAccountInfo.yaml | 2 +- .../schemas/common/PaymentAccountType.yaml | 16 + .../schemas/common/PaymentBaseWalletInfo.yaml | 13 +- .../common/PaymentClabeAccountInfo.yaml | 20 +- .../common/PaymentIbanAccountInfo.yaml | 20 +- .../schemas/common/PaymentInstructions.yaml | 2 +- .../common/PaymentLightningInvoiceInfo.yaml | 23 +- .../schemas/common/PaymentNgnAccountInfo.yaml | 20 +- .../schemas/common/PaymentPixAccountInfo.yaml | 1 + .../common/PaymentPolygonWalletInfo.yaml | 14 +- .../common/PaymentSolanaWalletInfo.yaml | 16 +- .../common/PaymentSparkWalletInfo.yaml | 28 +- .../schemas/common/PaymentTronWalletInfo.yaml | 12 +- .../schemas/common/PaymentUpiAccountInfo.yaml | 1 + .../schemas/common/PaymentUsAccountInfo.yaml | 20 +- .../schemas/common/PixAccountInfo.yaml | 2 +- .../schemas/common/PolygonWalletInfo.yaml | 2 +- .../schemas/common/SolanaWalletInfo.yaml | 2 +- .../schemas/common/SparkWalletInfo.yaml | 2 +- .../schemas/common/TronWalletInfo.yaml | 2 +- .../schemas/common/UpiAccountInfo.yaml | 2 +- .../schemas/common/UsAccountInfo.yaml | 2 +- .../customers/BusinessCustomerUpdate.yaml | 2 +- .../components/schemas/errors/Error400.yaml | 2 +- .../components/schemas/errors/Error401.yaml | 2 +- .../components/schemas/errors/Error403.yaml | 2 +- .../components/schemas/errors/Error404.yaml | 2 +- .../components/schemas/errors/Error409.yaml | 2 +- .../components/schemas/errors/Error412.yaml | 4 +- .../components/schemas/errors/Error424.yaml | 2 +- .../components/schemas/errors/Error500.yaml | 2 +- .../components/schemas/errors/Error501.yaml | 2 +- .../external_accounts/BaseBeneficiary.yaml | 13 + .../BaseExternalAccountInfo.yaml | 25 + .../BaseWalletExternalAccountInfo.yaml | 9 +- .../external_accounts/BeneficiaryType.yaml | 6 + .../BusinessBeneficiary.yaml | 41 +- .../CadAccountExternalAccountInfo.yaml | 12 +- .../ClabeAccountExternalAccountInfo.yaml | 13 +- .../external_accounts/ExternalAccount.yaml | 53 +- .../ExternalAccountCreateRequest.yaml | 53 +- .../ExternalAccountInfo.yaml | 52 - .../ExternalAccountType.yaml | 20 + .../GbpAccountExternalAccountInfo.yaml | 12 +- .../IbanAccountExternalAccountInfo.yaml | 13 +- .../IndividualBeneficiary.yaml | 47 +- .../LightningExternalAccountInfo.yaml | 40 +- .../NgnAccountExternalAccountInfo.yaml | 12 +- .../PhpAccountExternalAccountInfo.yaml | 12 +- .../PixAccountExternalAccountInfo.yaml | 13 +- .../PolygonWalletExternalAccountInfo.yaml | 9 +- .../SgdAccountExternalAccountInfo.yaml | 12 +- .../SolanaWalletExternalAccountInfo.yaml | 9 +- .../SparkWalletExternalAccountInfo.yaml | 9 +- .../TronWalletExternalAccountInfo.yaml | 9 +- .../UpiAccountExternalAccountInfo.yaml | 13 +- .../UsAccountExternalAccountInfo.yaml | 14 +- .../schemas/quotes/AccountDestination.yaml | 11 + .../schemas/quotes/AccountQuoteSource.yaml | 15 + .../schemas/quotes/BaseDestination.yaml | 12 + .../schemas/quotes/BaseQuoteSource.yaml | 11 + .../schemas/quotes/DestinationType.yaml | 7 + .../ExternalAccountDetailsDestination.yaml | 13 + openapi/components/schemas/quotes/Quote.yaml | 61 +- .../schemas/quotes/QuoteRequest.yaml | 65 +- .../schemas/quotes/QuoteSourceType.yaml | 6 + ...e.yaml => RealtimeFundingQuoteSource.yaml} | 24 +- .../schemas/quotes/UmaAddressDestination.yaml | 28 + .../AccountTransactionDestination.yaml | 11 + .../AccountTransactionSource.yaml | 11 + .../BaseTransactionDestination.yaml | 15 + .../transactions/BaseTransactionSource.yaml | 15 + .../transactions/IncomingTransaction.yaml | 34 +- .../transactions/OutgoingTransaction.yaml | 34 +- .../schemas/transactions/Transaction.yaml | 33 +- .../TransactionDestinationType.yaml | 6 + .../transactions/TransactionSourceType.yaml | 7 + .../UmaAddressTransactionDestination.yaml | 11 + .../UmaAddressTransactionSource.yaml | 11 + .../webhooks/InvitationClaimedWebhook.yaml | 2 +- 88 files changed, 2221 insertions(+), 1613 deletions(-) create mode 100644 openapi/components/schemas/common/BasePaymentAccountInfo.yaml create mode 100644 openapi/components/schemas/common/PaymentAccountType.yaml create mode 100644 openapi/components/schemas/external_accounts/BaseBeneficiary.yaml create mode 100644 openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml create mode 100644 openapi/components/schemas/external_accounts/BeneficiaryType.yaml delete mode 100644 openapi/components/schemas/external_accounts/ExternalAccountInfo.yaml create mode 100644 openapi/components/schemas/external_accounts/ExternalAccountType.yaml create mode 100644 openapi/components/schemas/quotes/AccountDestination.yaml create mode 100644 openapi/components/schemas/quotes/AccountQuoteSource.yaml create mode 100644 openapi/components/schemas/quotes/BaseDestination.yaml create mode 100644 openapi/components/schemas/quotes/BaseQuoteSource.yaml create mode 100644 openapi/components/schemas/quotes/DestinationType.yaml create mode 100644 openapi/components/schemas/quotes/ExternalAccountDetailsDestination.yaml create mode 100644 openapi/components/schemas/quotes/QuoteSourceType.yaml rename openapi/components/schemas/quotes/{QuoteSource.yaml => RealtimeFundingQuoteSource.yaml} (62%) create mode 100644 openapi/components/schemas/quotes/UmaAddressDestination.yaml create mode 100644 openapi/components/schemas/transactions/AccountTransactionDestination.yaml create mode 100644 openapi/components/schemas/transactions/AccountTransactionSource.yaml create mode 100644 openapi/components/schemas/transactions/BaseTransactionDestination.yaml create mode 100644 openapi/components/schemas/transactions/BaseTransactionSource.yaml create mode 100644 openapi/components/schemas/transactions/TransactionDestinationType.yaml create mode 100644 openapi/components/schemas/transactions/TransactionSourceType.yaml create mode 100644 openapi/components/schemas/transactions/UmaAddressTransactionDestination.yaml create mode 100644 openapi/components/schemas/transactions/UmaAddressTransactionSource.yaml diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 673d433..77dac06 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -4044,8 +4044,9 @@ components: - code properties: status: - const: 401 type: integer + enum: + - 401 description: HTTP status code code: type: string @@ -4071,8 +4072,9 @@ components: - code properties: status: - const: 500 type: integer + enum: + - 500 description: HTTP status code code: type: string @@ -4098,8 +4100,9 @@ components: - code properties: status: - const: 400 type: integer + enum: + - 400 description: HTTP status code code: type: string @@ -4175,8 +4178,9 @@ components: - code properties: status: - const: 501 type: integer + enum: + - 501 description: HTTP status code code: type: string @@ -4432,7 +4436,8 @@ components: properties: customerType: type: string - const: BUSINESS + enum: + - BUSINESS description: Customer type umaAddress: type: string @@ -4467,8 +4472,9 @@ components: - code properties: status: - const: 409 type: integer + enum: + - 409 description: HTTP status code code: type: string @@ -4494,8 +4500,9 @@ components: - code properties: status: - const: 404 type: integer + enum: + - 404 description: HTTP status code code: type: string @@ -4570,33 +4577,40 @@ components: example: 12550 currency: $ref: '#/components/schemas/Currency' - ClabeAccountInfo: - type: object - required: - - accountType - - clabeNumber - properties: - accountType: - type: string - 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/BasePaymentAccountInfo' - $ref: '#/components/schemas/ClabeAccountInfo' + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF + BasePaymentAccountInfo: + type: object required: - - reference + - accountType properties: - reference: - type: string - description: Unique reference code that must be included with the payment to properly credit it - example: UMA-Q12345-REF + accountType: + $ref: '#/components/schemas/PaymentAccountType' + discriminator: + propertyName: accountType + mapping: + CLABE: '#/components/schemas/PaymentClabeAccountInfo' + US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' + PIX: '#/components/schemas/PaymentPixAccountInfo' + IBAN: '#/components/schemas/PaymentIbanAccountInfo' + 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' + BASE_WALLET: '#/components/schemas/PaymentBaseWalletInfo' UsAccountInfo: type: object required: @@ -4607,7 +4621,8 @@ components: properties: accountType: type: string - const: US_ACCOUNT + enum: + - US_ACCOUNT example: US_ACCOUNT accountNumber: type: string @@ -4633,14 +4648,16 @@ components: example: Chase Bank PaymentUsAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/UsAccountInfo' - required: - - reference - properties: - reference: - type: string - description: Unique reference code that must be included with the payment to properly credit it - example: UMA-Q12345-REF + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF PixAccountInfo: type: object required: @@ -4651,7 +4668,8 @@ components: properties: accountType: type: string - const: PIX + enum: + - PIX example: PIX pixKey: type: string @@ -4673,6 +4691,7 @@ components: example: '1234567890' PaymentPixAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/PixAccountInfo' IbanAccountInfo: type: object @@ -4683,7 +4702,8 @@ components: properties: accountType: type: string - const: IBAN + enum: + - IBAN example: IBAN iban: type: string @@ -4700,14 +4720,16 @@ components: pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$ PaymentIbanAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/IbanAccountInfo' - required: - - reference - properties: - reference: - type: string - description: Unique reference code that must be included with the payment to properly credit it - example: UMA-Q12345-REF + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF UpiAccountInfo: type: object required: @@ -4716,7 +4738,8 @@ components: properties: accountType: type: string - const: UPI + enum: + - UPI example: UPI vpa: type: string @@ -4724,7 +4747,43 @@ components: example: somecustomers@okbank PaymentUpiAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/UpiAccountInfo' + NgnAccountInfo: + type: object + required: + - accountType + - accountNumber + - bankName + properties: + accountType: + type: string + enum: + - NGN_ACCOUNT + example: NGN_ACCOUNT + accountNumber: + type: string + description: Nigerian bank account number + example: '0123456789' + minLength: 10 + maxLength: 10 + pattern: ^[0-9]{10}$ + bankName: + type: string + description: Name of the bank + example: First Bank of Nigeria + PaymentNgnAccountInfo: + allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' + - $ref: '#/components/schemas/NgnAccountInfo' + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF SparkWalletInfo: type: object required: @@ -4733,7 +4792,8 @@ components: properties: accountType: type: string - const: SPARK_WALLET + enum: + - SPARK_WALLET example: SPARK_WALLET address: type: string @@ -4741,33 +4801,33 @@ components: example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu PaymentSparkWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $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 + - type: object + required: + - assetType + properties: + assetType: + type: string + description: Type of asset + enum: + - BTC + - USDB + invoice: + type: string + description: Invoice for the payment + example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s PaymentLightningInvoiceInfo: - type: object - required: - - accountType - - invoice - properties: - accountType: - const: LIGHTNING - example: LIGHTNING - invoice: - type: string - description: Invoice for the payment - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' + - type: object + required: + - invoice + properties: + invoice: + type: string + description: Invoice for the payment + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs SolanaWalletInfo: type: object required: @@ -4776,7 +4836,8 @@ components: properties: accountType: type: string - const: SOLANA_WALLET + enum: + - SOLANA_WALLET example: SOLANA_WALLET address: type: string @@ -4784,14 +4845,16 @@ components: example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg PaymentSolanaWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/SolanaWalletInfo' - properties: - assetType: - type: string - description: Type of asset - enum: - - USDC - - USDT + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC + - USDT TronWalletInfo: type: object required: @@ -4800,7 +4863,8 @@ components: properties: accountType: type: string - const: TRON_WALLET + enum: + - TRON_WALLET example: TRON_WALLET address: type: string @@ -4808,12 +4872,15 @@ components: example: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL PaymentTronWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/TronWalletInfo' - properties: - assetType: - type: string - description: Type of asset - const: USDT + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDT PolygonWalletInfo: type: object required: @@ -4822,7 +4889,8 @@ components: properties: accountType: type: string - const: POLYGON_WALLET + enum: + - POLYGON_WALLET example: POLYGON_WALLET address: type: string @@ -4830,12 +4898,15 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentPolygonWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/PolygonWalletInfo' - properties: - assetType: - type: string - description: Type of asset - const: USDC + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC BaseWalletInfo: type: object required: @@ -4844,7 +4915,8 @@ components: properties: accountType: type: string - const: BASE_WALLET + enum: + - BASE_WALLET example: BASE_WALLET address: type: string @@ -4852,12 +4924,50 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentBaseWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/BaseWalletInfo' + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC + PaymentAccountType: + type: string + enum: + - CLABE + - US_ACCOUNT + - PIX + - IBAN + - UPI + - NGN_ACCOUNT + - SPARK_WALLET + - LIGHTNING + - SOLANA_WALLET + - TRON_WALLET + - POLYGON_WALLET + - BASE_WALLET + description: Type of payment account or wallet + example: US_ACCOUNT + ClabeAccountInfo: + type: object + required: + - accountType + - clabeNumber properties: - assetType: + accountType: + type: string + enum: + - CLABE + example: CLABE + clabeNumber: type: string - description: Type of asset - const: USDC + description: 18-digit CLABE number (Mexican banking standard) + example: '123456789012345678' + minLength: 18 + maxLength: 18 + pattern: ^[0-9]{18}$ PaymentInstructions: type: object required: @@ -4951,93 +5061,123 @@ components: - UNDER_REVIEW - INACTIVE description: Status of an external account - IndividualBeneficiary: + UsAccountExternalAccountInfo: + allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' + - $ref: '#/components/schemas/UsAccountInfo' + - type: object + properties: + beneficiary: + oneOf: + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + BaseExternalAccountInfo: type: object required: - - fullName - - birthDate - - nationality - - beneficiaryType + - accountType properties: - beneficiaryType: - type: string - const: INDIVIDUAL - example: INDIVIDUAL - fullName: - type: string - description: Individual's full name - example: John Michael Doe - birthDate: - type: string - format: date - description: Date of birth in ISO 8601 format (YYYY-MM-DD) - example: '1990-01-15' - nationality: - type: string - description: Country code (ISO 3166-1 alpha-2) - example: US - address: - $ref: '#/components/schemas/Address' - BusinessBeneficiary: + accountType: + $ref: '#/components/schemas/ExternalAccountType' + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' + CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' + PIX: '#/components/schemas/PixAccountExternalAccountInfo' + IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' + UPI: '#/components/schemas/UpiAccountExternalAccountInfo' + NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' + CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' + GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' + PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' + SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' + SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' + LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' + SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' + TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' + POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' + BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' + IndividualBeneficiary: + allOf: + - $ref: '#/components/schemas/BaseBeneficiary' + - type: object + required: + - fullName + - birthDate + - nationality + properties: + fullName: + type: string + description: Individual's full name + example: John Michael Doe + birthDate: + type: string + format: date + description: Date of birth in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: Country code (ISO 3166-1 alpha-2) + example: US + BaseBeneficiary: type: object required: - - legalName - beneficiaryType properties: beneficiaryType: - type: string - const: BUSINESS - example: BUSINESS - 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/BeneficiaryType' address: $ref: '#/components/schemas/Address' - UsAccountExternalAccountInfo: + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + BusinessBeneficiary: allOf: - - $ref: '#/components/schemas/UsAccountInfo' + - $ref: '#/components/schemas/BaseBeneficiary' - type: object required: - - accountType - - beneficiary + - legalName properties: - accountType: + legalName: type: string - const: US_ACCOUNT - example: US_ACCOUNT - beneficiary: - oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' - discriminator: - propertyName: beneficiaryType - mapping: - INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' - BUSINESS: '#/components/schemas/BusinessBeneficiary' + 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 + BeneficiaryType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Whether the beneficiary is an individual or a business entity + example: INDIVIDUAL ClabeAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/ClabeAccountInfo' - type: object - required: - - accountType properties: - accountType: - type: string - const: CLABE - example: CLABE beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5045,19 +5185,16 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' PixAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PixAccountInfo' - type: object - required: - - accountType properties: - accountType: - type: string - const: PIX - example: PIX beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5065,19 +5202,16 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' IbanAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/IbanAccountInfo' - type: object - required: - - accountType properties: - accountType: - type: string - const: IBAN - example: IBAN beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5085,63 +5219,36 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' UpiAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/UpiAccountInfo' - type: object - required: - - accountType - properties: - accountType: - type: string - const: UPI - example: UPI - beneficiary: - oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' - discriminator: - propertyName: beneficiaryType - mapping: - INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' - BUSINESS: '#/components/schemas/BusinessBeneficiary' - NgnAccountInfo: - type: object - required: - - accountType - - accountNumber - - bankName - properties: - accountType: - type: string - const: NGN_ACCOUNT - example: NGN_ACCOUNT - accountNumber: - type: string - description: Nigerian bank account number - example: '0123456789' - minLength: 10 - maxLength: 10 - pattern: ^[0-9]{10}$ - bankName: - type: string - description: Name of the bank - example: First Bank of Nigeria + properties: + beneficiary: + oneOf: + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' NgnAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/NgnAccountInfo' - type: object required: - - accountType - purposeOfPayment - beneficiary properties: - accountType: - type: string - const: NGN_ACCOUNT - example: NGN_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5200,21 +5307,18 @@ components: pattern: ^[0-9]{7,12}$ CadAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/CadAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - CAD_ACCOUNT - example: CAD_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5246,21 +5350,18 @@ components: pattern: ^[0-9]{8}$ GbpAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/GbpAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - GBP_ACCOUNT - example: GBP_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5288,21 +5389,18 @@ components: example: '001234567890' PhpAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PhpAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - PHP_ACCOUNT - example: PHP_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5338,21 +5436,18 @@ components: example: '0123456789' SgdAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SgdAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - SGD_ACCOUNT - example: SGD_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5360,135 +5455,64 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' SparkWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SparkWalletInfo' + LightningExternalAccountInfo: + allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - type: object - required: - - accountType + description: | + Lightning payment destination. Exactly one of `invoice`, `bolt12`, or `lightningAddress` must be provided. properties: - accountType: + invoice: type: string - const: SPARK_WALLET - example: SPARK_WALLET - LightningExternalAccountInfo: - type: object - required: - - accountType - description: | - Lightning payment destination. Exactly one of `invoice`, `bolt12`, or `lightningAddress` must be provided. - properties: - accountType: - type: string - 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 + 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/BaseExternalAccountInfo' - $ref: '#/components/schemas/SolanaWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: SOLANA_WALLET - example: SOLANA_WALLET TronWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/TronWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: TRON_WALLET - example: TRON_WALLET PolygonWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PolygonWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: POLYGON_WALLET - example: POLYGON_WALLET BaseWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/BaseWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: BASE_WALLET - example: BASE_WALLET - ExternalAccountInfo: - oneOf: - - title: US Account - $ref: '#/components/schemas/UsAccountExternalAccountInfo' - - title: CLABE Account - $ref: '#/components/schemas/ClabeAccountExternalAccountInfo' - - title: PIX Account - $ref: '#/components/schemas/PixAccountExternalAccountInfo' - - title: IBAN Account - $ref: '#/components/schemas/IbanAccountExternalAccountInfo' - - title: UPI Account - $ref: '#/components/schemas/UpiAccountExternalAccountInfo' - - title: NGN Account - $ref: '#/components/schemas/NgnAccountExternalAccountInfo' - - title: CAD Account - $ref: '#/components/schemas/CadAccountExternalAccountInfo' - - title: GBP Account - $ref: '#/components/schemas/GbpAccountExternalAccountInfo' - - title: PHP Account - $ref: '#/components/schemas/PhpAccountExternalAccountInfo' - - title: SGD Account - $ref: '#/components/schemas/SgdAccountExternalAccountInfo' - - title: Spark Wallet - $ref: '#/components/schemas/SparkWalletExternalAccountInfo' - - title: Lightning - $ref: '#/components/schemas/LightningExternalAccountInfo' - - title: Solana Wallet - $ref: '#/components/schemas/SolanaWalletExternalAccountInfo' - - title: Tron Wallet - $ref: '#/components/schemas/TronWalletExternalAccountInfo' - - title: Polygon Wallet - $ref: '#/components/schemas/PolygonWalletExternalAccountInfo' - - title: Base Wallet - $ref: '#/components/schemas/BaseWalletExternalAccountInfo' - discriminator: - propertyName: accountType - mapping: - US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' - CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' - PIX: '#/components/schemas/PixAccountExternalAccountInfo' - IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' - UPI: '#/components/schemas/UpiAccountExternalAccountInfo' - NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' - CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' - GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' - PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' - SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' - SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' - LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' - SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' - TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' - POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' - BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' + ExternalAccountType: + type: string + enum: + - US_ACCOUNT + - CLABE + - PIX + - IBAN + - UPI + - NGN_ACCOUNT + - CAD_ACCOUNT + - GBP_ACCOUNT + - PHP_ACCOUNT + - SGD_ACCOUNT + - SPARK_WALLET + - LIGHTNING + - SOLANA_WALLET + - TRON_WALLET + - POLYGON_WALLET + - BASE_WALLET + description: Type of external account or wallet + example: US_ACCOUNT ExternalAccount: allOf: - type: object @@ -5523,7 +5547,58 @@ components: description: Whether this account is the default UMA deposit account for the customer. If true, incoming UMA payments to this customer's UMA address will be automatically deposited into this account instead of the primary internal account. False if not provided. Note that at most, one external account can be set as the default UMA deposit account for a customer. If there is no default UMA deposit account, incoming UMA payments will be deposited into the primary internal account for the customer. example: false accountInfo: - $ref: '#/components/schemas/ExternalAccountInfo' + oneOf: + - title: US Account + $ref: '#/components/schemas/UsAccountExternalAccountInfo' + - title: CLABE Account + $ref: '#/components/schemas/ClabeAccountExternalAccountInfo' + - title: PIX Account + $ref: '#/components/schemas/PixAccountExternalAccountInfo' + - title: IBAN Account + $ref: '#/components/schemas/IbanAccountExternalAccountInfo' + - title: UPI Account + $ref: '#/components/schemas/UpiAccountExternalAccountInfo' + - title: NGN Account + $ref: '#/components/schemas/NgnAccountExternalAccountInfo' + - title: CAD Account + $ref: '#/components/schemas/CadAccountExternalAccountInfo' + - title: GBP Account + $ref: '#/components/schemas/GbpAccountExternalAccountInfo' + - title: PHP Account + $ref: '#/components/schemas/PhpAccountExternalAccountInfo' + - title: SGD Account + $ref: '#/components/schemas/SgdAccountExternalAccountInfo' + - title: Spark Wallet + $ref: '#/components/schemas/SparkWalletExternalAccountInfo' + - title: Lightning + $ref: '#/components/schemas/LightningExternalAccountInfo' + - title: Solana Wallet + $ref: '#/components/schemas/SolanaWalletExternalAccountInfo' + - title: Tron Wallet + $ref: '#/components/schemas/TronWalletExternalAccountInfo' + - title: Polygon Wallet + $ref: '#/components/schemas/PolygonWalletExternalAccountInfo' + - title: Base Wallet + $ref: '#/components/schemas/BaseWalletExternalAccountInfo' + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' + CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' + PIX: '#/components/schemas/PixAccountExternalAccountInfo' + IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' + UPI: '#/components/schemas/UpiAccountExternalAccountInfo' + NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' + CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' + GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' + PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' + SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' + SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' + LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' + SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' + TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' + POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' + BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' ExternalAccountCreateRequest: allOf: - type: object @@ -5548,7 +5623,58 @@ components: description: Whether to set the external account as the default UMA deposit account. When set to true, incoming payments to this customer's UMA address will be automatically deposited into this external account. False if not provided. Note that only one external account can be set as the default UMA deposit account for a customer, so if there is already a default UMA deposit account, this will override the existing default UMA deposit account. If there is no default UMA deposit account, incoming UMA payments will be deposited into the primary internal account for the customer. default: false accountInfo: - $ref: '#/components/schemas/ExternalAccountInfo' + oneOf: + - title: US Account + $ref: '#/components/schemas/UsAccountExternalAccountInfo' + - title: CLABE Account + $ref: '#/components/schemas/ClabeAccountExternalAccountInfo' + - title: PIX Account + $ref: '#/components/schemas/PixAccountExternalAccountInfo' + - title: IBAN Account + $ref: '#/components/schemas/IbanAccountExternalAccountInfo' + - title: UPI Account + $ref: '#/components/schemas/UpiAccountExternalAccountInfo' + - title: NGN Account + $ref: '#/components/schemas/NgnAccountExternalAccountInfo' + - title: CAD Account + $ref: '#/components/schemas/CadAccountExternalAccountInfo' + - title: GBP Account + $ref: '#/components/schemas/GbpAccountExternalAccountInfo' + - title: PHP Account + $ref: '#/components/schemas/PhpAccountExternalAccountInfo' + - title: SGD Account + $ref: '#/components/schemas/SgdAccountExternalAccountInfo' + - title: Spark Wallet + $ref: '#/components/schemas/SparkWalletExternalAccountInfo' + - title: Lightning + $ref: '#/components/schemas/LightningExternalAccountInfo' + - title: Solana Wallet + $ref: '#/components/schemas/SolanaWalletExternalAccountInfo' + - title: Tron Wallet + $ref: '#/components/schemas/TronWalletExternalAccountInfo' + - title: Polygon Wallet + $ref: '#/components/schemas/PolygonWalletExternalAccountInfo' + - title: Base Wallet + $ref: '#/components/schemas/BaseWalletExternalAccountInfo' + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' + CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' + PIX: '#/components/schemas/PixAccountExternalAccountInfo' + IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' + UPI: '#/components/schemas/UpiAccountExternalAccountInfo' + NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' + CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' + GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' + PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' + SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' + SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' + LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' + SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' + TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' + POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' + BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' PlaidLinkTokenRequest: type: object required: @@ -5623,33 +5749,14 @@ components: 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 + $ref: '#/components/schemas/AccountTransactionDestination' - 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/UmaAddressTransactionDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionDestination' customerId: type: string description: System ID of the customer (sender for outgoing, recipient for incoming) @@ -5690,6 +5797,54 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + AccountTransactionSource: + allOf: + - $ref: '#/components/schemas/BaseTransactionSource' + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Source account identifier + example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Source account details + BaseTransactionSource: + type: object + required: + - sourceType + properties: + sourceType: + $ref: '#/components/schemas/TransactionSourceType' + currency: + type: string + description: Currency code for the source + example: USD + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource' + UmaAddressTransactionSource: + allOf: + - $ref: '#/components/schemas/BaseTransactionSource' + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the sender + example: $sender@uma.domain.com + description: UMA address source details + TransactionSourceType: + type: string + enum: + - ACCOUNT + - UMA_ADDRESS + - REALTIME_FUNDING + description: Type of transaction source + example: ACCOUNT ReconciliationInstructions: type: object required: @@ -5754,34 +5909,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountTransactionSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressTransactionSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource' receivedAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount received in the recipient's currency @@ -5883,34 +6018,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountTransactionSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressTransactionSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource' sentAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount sent in the sender's currency @@ -5971,6 +6086,53 @@ components: - REFUNDED - EXPIRED description: Status of a payment transaction + AccountTransactionDestination: + allOf: + - $ref: '#/components/schemas/BaseTransactionDestination' + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination account details + BaseTransactionDestination: + type: object + required: + - destinationType + properties: + destinationType: + $ref: '#/components/schemas/TransactionDestinationType' + currency: + type: string + description: Currency code for the destination + example: EUR + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionDestination' + UmaAddressTransactionDestination: + allOf: + - $ref: '#/components/schemas/BaseTransactionDestination' + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + description: UMA address destination details + TransactionDestinationType: + type: string + enum: + - ACCOUNT + - UMA_ADDRESS + description: Type of transaction destination + example: ACCOUNT CurrencyPreference: type: object required: @@ -6026,8 +6188,9 @@ components: - code properties: status: - const: 412 type: integer + enum: + - 412 description: HTTP status code code: type: string @@ -6035,7 +6198,8 @@ components: | Error Code | Description | |------------|-------------| | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version | - const: UNSUPPORTED_UMA_VERSION + enum: + - UNSUPPORTED_UMA_VERSION message: type: string description: Error message @@ -6050,8 +6214,9 @@ components: - code properties: status: - const: 424 type: integer + enum: + - 424 description: HTTP status code code: type: string @@ -6073,10 +6238,10 @@ components: details: type: object description: Additional error details - QuoteSource: - oneOf: - - title: Account - type: object + AccountQuoteSource: + allOf: + - $ref: '#/components/schemas/BaseQuoteSource' + - type: object required: - accountId properties: @@ -6084,16 +6249,29 @@ components: type: string description: Source account identifier example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: + customerId: 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: Required when funding from an FBO account to identify the customer on whose behalf the transaction is being initiated. Otherwise, will default to the customerId of the account owner. + example: Customer:019542f5-b3e7-1d02-0000-000000000001 description: Source account details - - title: Real-time funding - type: object + BaseQuoteSource: + type: object + required: + - sourceType + properties: + sourceType: + $ref: '#/components/schemas/QuoteSourceType' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountQuoteSource' + REALTIME_FUNDING: '#/components/schemas/RealtimeFundingQuoteSource' + RealtimeFundingQuoteSource: + allOf: + - $ref: '#/components/schemas/BaseQuoteSource' + - type: object required: - currency - - customerId properties: customerId: type: string @@ -6104,6 +6282,80 @@ components: 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.). + QuoteSourceType: + type: string + enum: + - ACCOUNT + - REALTIME_FUNDING + description: Type of quote funding source + example: ACCOUNT + AccountDestination: + allOf: + - $ref: '#/components/schemas/BaseDestination' + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination account details + BaseDestination: + type: object + required: + - destinationType + properties: + destinationType: + $ref: '#/components/schemas/DestinationType' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/ExternalAccountDetailsDestination' + UmaAddressDestination: + allOf: + - $ref: '#/components/schemas/BaseDestination' + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + 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 + currency: + type: string + description: Currency code for the destination. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: EUR + description: UMA address destination details + ExternalAccountDetailsDestination: + allOf: + - $ref: '#/components/schemas/BaseDestination' + - type: object + required: + - externalAccountDetails + properties: + externalAccountDetails: + $ref: '#/components/schemas/ExternalAccountCreateRequest' + description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. + DestinationType: + type: string + enum: + - ACCOUNT + - UMA_ADDRESS + - EXTERNAL_ACCOUNT_DETAILS + description: Type of payment destination + example: ACCOUNT Quote: type: object required: @@ -6146,45 +6398,30 @@ components: description: When this quote expires (typically 1-5 minutes after creation) example: '2025-10-03T12:05:00Z' source: - $ref: '#/components/schemas/QuoteSource' + oneOf: + - title: Account + $ref: '#/components/schemas/AccountQuoteSource' + - title: Real-time Funding + $ref: '#/components/schemas/RealtimeFundingQuoteSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountQuoteSource' + REALTIME_FUNDING: '#/components/schemas/RealtimeFundingQuoteSource' destination: 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 + - title: Account + $ref: '#/components/schemas/AccountDestination' + - title: UMA Address + $ref: '#/components/schemas/UmaAddressDestination' + - title: External Account Details + $ref: '#/components/schemas/ExternalAccountDetailsDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/ExternalAccountDetailsDestination' sendingCurrency: $ref: '#/components/schemas/Currency' description: Currency for the sending amount @@ -6259,47 +6496,30 @@ components: NOTE: This is required for UMA destinations due to counterparty institution requirements. See `senderCustomerInfo` for more information. example: Lookup:019542f5-b3e7-1d02-0000-000000000009 source: - $ref: '#/components/schemas/QuoteSource' + oneOf: + - title: Account + $ref: '#/components/schemas/AccountQuoteSource' + - title: Real-time Funding + $ref: '#/components/schemas/RealtimeFundingQuoteSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountQuoteSource' + REALTIME_FUNDING: '#/components/schemas/RealtimeFundingQuoteSource' destination: oneOf: - title: Account - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: EUR - description: Destination account details + $ref: '#/components/schemas/AccountDestination' - title: UMA Address - type: object - required: - - umaAddress - - currency - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: EUR - description: UMA address destination details + $ref: '#/components/schemas/UmaAddressDestination' - title: External Account Details - type: object - required: - - externalAccountDetails - properties: - externalAccountDetails: - $ref: '#/components/schemas/ExternalAccountCreateRequest' - description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. + $ref: '#/components/schemas/ExternalAccountDetailsDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/ExternalAccountDetailsDestination' lockedCurrencySide: $ref: '#/components/schemas/QuoteLockSide' lockedCurrencyAmount: @@ -6475,8 +6695,9 @@ components: - code properties: status: - const: 403 type: integer + enum: + - 403 description: HTTP status code code: type: string @@ -6690,7 +6911,8 @@ components: $ref: '#/components/schemas/UmaInvitation' type: type: string - const: INVITATION_CLAIMED + enum: + - INVITATION_CLAIMED description: Type of webhook event example: INVITATION_CLAIMED KycStatusWebhook: diff --git a/openapi.yaml b/openapi.yaml index 673d433..77dac06 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4044,8 +4044,9 @@ components: - code properties: status: - const: 401 type: integer + enum: + - 401 description: HTTP status code code: type: string @@ -4071,8 +4072,9 @@ components: - code properties: status: - const: 500 type: integer + enum: + - 500 description: HTTP status code code: type: string @@ -4098,8 +4100,9 @@ components: - code properties: status: - const: 400 type: integer + enum: + - 400 description: HTTP status code code: type: string @@ -4175,8 +4178,9 @@ components: - code properties: status: - const: 501 type: integer + enum: + - 501 description: HTTP status code code: type: string @@ -4432,7 +4436,8 @@ components: properties: customerType: type: string - const: BUSINESS + enum: + - BUSINESS description: Customer type umaAddress: type: string @@ -4467,8 +4472,9 @@ components: - code properties: status: - const: 409 type: integer + enum: + - 409 description: HTTP status code code: type: string @@ -4494,8 +4500,9 @@ components: - code properties: status: - const: 404 type: integer + enum: + - 404 description: HTTP status code code: type: string @@ -4570,33 +4577,40 @@ components: example: 12550 currency: $ref: '#/components/schemas/Currency' - ClabeAccountInfo: - type: object - required: - - accountType - - clabeNumber - properties: - accountType: - type: string - 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/BasePaymentAccountInfo' - $ref: '#/components/schemas/ClabeAccountInfo' + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF + BasePaymentAccountInfo: + type: object required: - - reference + - accountType properties: - reference: - type: string - description: Unique reference code that must be included with the payment to properly credit it - example: UMA-Q12345-REF + accountType: + $ref: '#/components/schemas/PaymentAccountType' + discriminator: + propertyName: accountType + mapping: + CLABE: '#/components/schemas/PaymentClabeAccountInfo' + US_ACCOUNT: '#/components/schemas/PaymentUsAccountInfo' + PIX: '#/components/schemas/PaymentPixAccountInfo' + IBAN: '#/components/schemas/PaymentIbanAccountInfo' + 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' + BASE_WALLET: '#/components/schemas/PaymentBaseWalletInfo' UsAccountInfo: type: object required: @@ -4607,7 +4621,8 @@ components: properties: accountType: type: string - const: US_ACCOUNT + enum: + - US_ACCOUNT example: US_ACCOUNT accountNumber: type: string @@ -4633,14 +4648,16 @@ components: example: Chase Bank PaymentUsAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/UsAccountInfo' - required: - - reference - properties: - reference: - type: string - description: Unique reference code that must be included with the payment to properly credit it - example: UMA-Q12345-REF + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF PixAccountInfo: type: object required: @@ -4651,7 +4668,8 @@ components: properties: accountType: type: string - const: PIX + enum: + - PIX example: PIX pixKey: type: string @@ -4673,6 +4691,7 @@ components: example: '1234567890' PaymentPixAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/PixAccountInfo' IbanAccountInfo: type: object @@ -4683,7 +4702,8 @@ components: properties: accountType: type: string - const: IBAN + enum: + - IBAN example: IBAN iban: type: string @@ -4700,14 +4720,16 @@ components: pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$ PaymentIbanAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/IbanAccountInfo' - required: - - reference - properties: - reference: - type: string - description: Unique reference code that must be included with the payment to properly credit it - example: UMA-Q12345-REF + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF UpiAccountInfo: type: object required: @@ -4716,7 +4738,8 @@ components: properties: accountType: type: string - const: UPI + enum: + - UPI example: UPI vpa: type: string @@ -4724,7 +4747,43 @@ components: example: somecustomers@okbank PaymentUpiAccountInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/UpiAccountInfo' + NgnAccountInfo: + type: object + required: + - accountType + - accountNumber + - bankName + properties: + accountType: + type: string + enum: + - NGN_ACCOUNT + example: NGN_ACCOUNT + accountNumber: + type: string + description: Nigerian bank account number + example: '0123456789' + minLength: 10 + maxLength: 10 + pattern: ^[0-9]{10}$ + bankName: + type: string + description: Name of the bank + example: First Bank of Nigeria + PaymentNgnAccountInfo: + allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' + - $ref: '#/components/schemas/NgnAccountInfo' + - type: object + required: + - reference + properties: + reference: + type: string + description: Unique reference code that must be included with the payment to properly credit it + example: UMA-Q12345-REF SparkWalletInfo: type: object required: @@ -4733,7 +4792,8 @@ components: properties: accountType: type: string - const: SPARK_WALLET + enum: + - SPARK_WALLET example: SPARK_WALLET address: type: string @@ -4741,33 +4801,33 @@ components: example: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu PaymentSparkWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $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 + - type: object + required: + - assetType + properties: + assetType: + type: string + description: Type of asset + enum: + - BTC + - USDB + invoice: + type: string + description: Invoice for the payment + example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s PaymentLightningInvoiceInfo: - type: object - required: - - accountType - - invoice - properties: - accountType: - const: LIGHTNING - example: LIGHTNING - invoice: - type: string - description: Invoice for the payment - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs + allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' + - type: object + required: + - invoice + properties: + invoice: + type: string + description: Invoice for the payment + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs SolanaWalletInfo: type: object required: @@ -4776,7 +4836,8 @@ components: properties: accountType: type: string - const: SOLANA_WALLET + enum: + - SOLANA_WALLET example: SOLANA_WALLET address: type: string @@ -4784,14 +4845,16 @@ components: example: 4Nd1m6Qkq7RfKuE5vQ9qP9Tn6H94Ueqb4xXHzsAbd8Wg PaymentSolanaWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/SolanaWalletInfo' - properties: - assetType: - type: string - description: Type of asset - enum: - - USDC - - USDT + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC + - USDT TronWalletInfo: type: object required: @@ -4800,7 +4863,8 @@ components: properties: accountType: type: string - const: TRON_WALLET + enum: + - TRON_WALLET example: TRON_WALLET address: type: string @@ -4808,12 +4872,15 @@ components: example: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL PaymentTronWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/TronWalletInfo' - properties: - assetType: - type: string - description: Type of asset - const: USDT + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDT PolygonWalletInfo: type: object required: @@ -4822,7 +4889,8 @@ components: properties: accountType: type: string - const: POLYGON_WALLET + enum: + - POLYGON_WALLET example: POLYGON_WALLET address: type: string @@ -4830,12 +4898,15 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentPolygonWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/PolygonWalletInfo' - properties: - assetType: - type: string - description: Type of asset - const: USDC + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC BaseWalletInfo: type: object required: @@ -4844,7 +4915,8 @@ components: properties: accountType: type: string - const: BASE_WALLET + enum: + - BASE_WALLET example: BASE_WALLET address: type: string @@ -4852,12 +4924,50 @@ components: example: '0xAbCDEF1234567890aBCdEf1234567890ABcDef12' PaymentBaseWalletInfo: allOf: + - $ref: '#/components/schemas/BasePaymentAccountInfo' - $ref: '#/components/schemas/BaseWalletInfo' + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC + PaymentAccountType: + type: string + enum: + - CLABE + - US_ACCOUNT + - PIX + - IBAN + - UPI + - NGN_ACCOUNT + - SPARK_WALLET + - LIGHTNING + - SOLANA_WALLET + - TRON_WALLET + - POLYGON_WALLET + - BASE_WALLET + description: Type of payment account or wallet + example: US_ACCOUNT + ClabeAccountInfo: + type: object + required: + - accountType + - clabeNumber properties: - assetType: + accountType: + type: string + enum: + - CLABE + example: CLABE + clabeNumber: type: string - description: Type of asset - const: USDC + description: 18-digit CLABE number (Mexican banking standard) + example: '123456789012345678' + minLength: 18 + maxLength: 18 + pattern: ^[0-9]{18}$ PaymentInstructions: type: object required: @@ -4951,93 +5061,123 @@ components: - UNDER_REVIEW - INACTIVE description: Status of an external account - IndividualBeneficiary: + UsAccountExternalAccountInfo: + allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' + - $ref: '#/components/schemas/UsAccountInfo' + - type: object + properties: + beneficiary: + oneOf: + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + BaseExternalAccountInfo: type: object required: - - fullName - - birthDate - - nationality - - beneficiaryType + - accountType properties: - beneficiaryType: - type: string - const: INDIVIDUAL - example: INDIVIDUAL - fullName: - type: string - description: Individual's full name - example: John Michael Doe - birthDate: - type: string - format: date - description: Date of birth in ISO 8601 format (YYYY-MM-DD) - example: '1990-01-15' - nationality: - type: string - description: Country code (ISO 3166-1 alpha-2) - example: US - address: - $ref: '#/components/schemas/Address' - BusinessBeneficiary: + accountType: + $ref: '#/components/schemas/ExternalAccountType' + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' + CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' + PIX: '#/components/schemas/PixAccountExternalAccountInfo' + IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' + UPI: '#/components/schemas/UpiAccountExternalAccountInfo' + NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' + CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' + GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' + PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' + SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' + SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' + LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' + SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' + TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' + POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' + BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' + IndividualBeneficiary: + allOf: + - $ref: '#/components/schemas/BaseBeneficiary' + - type: object + required: + - fullName + - birthDate + - nationality + properties: + fullName: + type: string + description: Individual's full name + example: John Michael Doe + birthDate: + type: string + format: date + description: Date of birth in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: Country code (ISO 3166-1 alpha-2) + example: US + BaseBeneficiary: type: object required: - - legalName - beneficiaryType properties: beneficiaryType: - type: string - const: BUSINESS - example: BUSINESS - 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/BeneficiaryType' address: $ref: '#/components/schemas/Address' - UsAccountExternalAccountInfo: + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + BusinessBeneficiary: allOf: - - $ref: '#/components/schemas/UsAccountInfo' + - $ref: '#/components/schemas/BaseBeneficiary' - type: object required: - - accountType - - beneficiary + - legalName properties: - accountType: + legalName: type: string - const: US_ACCOUNT - example: US_ACCOUNT - beneficiary: - oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' - discriminator: - propertyName: beneficiaryType - mapping: - INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' - BUSINESS: '#/components/schemas/BusinessBeneficiary' + 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 + BeneficiaryType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Whether the beneficiary is an individual or a business entity + example: INDIVIDUAL ClabeAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/ClabeAccountInfo' - type: object - required: - - accountType properties: - accountType: - type: string - const: CLABE - example: CLABE beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5045,19 +5185,16 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' PixAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PixAccountInfo' - type: object - required: - - accountType properties: - accountType: - type: string - const: PIX - example: PIX beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5065,19 +5202,16 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' IbanAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/IbanAccountInfo' - type: object - required: - - accountType properties: - accountType: - type: string - const: IBAN - example: IBAN beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5085,63 +5219,36 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' UpiAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/UpiAccountInfo' - type: object - required: - - accountType - properties: - accountType: - type: string - const: UPI - example: UPI - beneficiary: - oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' - discriminator: - propertyName: beneficiaryType - mapping: - INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' - BUSINESS: '#/components/schemas/BusinessBeneficiary' - NgnAccountInfo: - type: object - required: - - accountType - - accountNumber - - bankName - properties: - accountType: - type: string - const: NGN_ACCOUNT - example: NGN_ACCOUNT - accountNumber: - type: string - description: Nigerian bank account number - example: '0123456789' - minLength: 10 - maxLength: 10 - pattern: ^[0-9]{10}$ - bankName: - type: string - description: Name of the bank - example: First Bank of Nigeria + properties: + beneficiary: + oneOf: + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' NgnAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/NgnAccountInfo' - type: object required: - - accountType - purposeOfPayment - beneficiary properties: - accountType: - type: string - const: NGN_ACCOUNT - example: NGN_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5200,21 +5307,18 @@ components: pattern: ^[0-9]{7,12}$ CadAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/CadAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - CAD_ACCOUNT - example: CAD_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5246,21 +5350,18 @@ components: pattern: ^[0-9]{8}$ GbpAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/GbpAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - GBP_ACCOUNT - example: GBP_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5288,21 +5389,18 @@ components: example: '001234567890' PhpAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PhpAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - PHP_ACCOUNT - example: PHP_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5338,21 +5436,18 @@ components: example: '0123456789' SgdAccountExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SgdAccountInfo' - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: - - SGD_ACCOUNT - example: SGD_ACCOUNT beneficiary: oneOf: - - $ref: '#/components/schemas/IndividualBeneficiary' - - $ref: '#/components/schemas/BusinessBeneficiary' + - title: Individual Beneficiary + $ref: '#/components/schemas/IndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: @@ -5360,135 +5455,64 @@ components: BUSINESS: '#/components/schemas/BusinessBeneficiary' SparkWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SparkWalletInfo' + LightningExternalAccountInfo: + allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - type: object - required: - - accountType + description: | + Lightning payment destination. Exactly one of `invoice`, `bolt12`, or `lightningAddress` must be provided. properties: - accountType: + invoice: type: string - const: SPARK_WALLET - example: SPARK_WALLET - LightningExternalAccountInfo: - type: object - required: - - accountType - description: | - Lightning payment destination. Exactly one of `invoice`, `bolt12`, or `lightningAddress` must be provided. - properties: - accountType: - type: string - 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 + 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/BaseExternalAccountInfo' - $ref: '#/components/schemas/SolanaWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: SOLANA_WALLET - example: SOLANA_WALLET TronWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/TronWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: TRON_WALLET - example: TRON_WALLET PolygonWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PolygonWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: POLYGON_WALLET - example: POLYGON_WALLET BaseWalletExternalAccountInfo: allOf: + - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/BaseWalletInfo' - - type: object - required: - - accountType - properties: - accountType: - type: string - const: BASE_WALLET - example: BASE_WALLET - ExternalAccountInfo: - oneOf: - - title: US Account - $ref: '#/components/schemas/UsAccountExternalAccountInfo' - - title: CLABE Account - $ref: '#/components/schemas/ClabeAccountExternalAccountInfo' - - title: PIX Account - $ref: '#/components/schemas/PixAccountExternalAccountInfo' - - title: IBAN Account - $ref: '#/components/schemas/IbanAccountExternalAccountInfo' - - title: UPI Account - $ref: '#/components/schemas/UpiAccountExternalAccountInfo' - - title: NGN Account - $ref: '#/components/schemas/NgnAccountExternalAccountInfo' - - title: CAD Account - $ref: '#/components/schemas/CadAccountExternalAccountInfo' - - title: GBP Account - $ref: '#/components/schemas/GbpAccountExternalAccountInfo' - - title: PHP Account - $ref: '#/components/schemas/PhpAccountExternalAccountInfo' - - title: SGD Account - $ref: '#/components/schemas/SgdAccountExternalAccountInfo' - - title: Spark Wallet - $ref: '#/components/schemas/SparkWalletExternalAccountInfo' - - title: Lightning - $ref: '#/components/schemas/LightningExternalAccountInfo' - - title: Solana Wallet - $ref: '#/components/schemas/SolanaWalletExternalAccountInfo' - - title: Tron Wallet - $ref: '#/components/schemas/TronWalletExternalAccountInfo' - - title: Polygon Wallet - $ref: '#/components/schemas/PolygonWalletExternalAccountInfo' - - title: Base Wallet - $ref: '#/components/schemas/BaseWalletExternalAccountInfo' - discriminator: - propertyName: accountType - mapping: - US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' - CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' - PIX: '#/components/schemas/PixAccountExternalAccountInfo' - IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' - UPI: '#/components/schemas/UpiAccountExternalAccountInfo' - NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' - CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' - GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' - PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' - SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' - SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' - LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' - SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' - TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' - POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' - BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' + ExternalAccountType: + type: string + enum: + - US_ACCOUNT + - CLABE + - PIX + - IBAN + - UPI + - NGN_ACCOUNT + - CAD_ACCOUNT + - GBP_ACCOUNT + - PHP_ACCOUNT + - SGD_ACCOUNT + - SPARK_WALLET + - LIGHTNING + - SOLANA_WALLET + - TRON_WALLET + - POLYGON_WALLET + - BASE_WALLET + description: Type of external account or wallet + example: US_ACCOUNT ExternalAccount: allOf: - type: object @@ -5523,7 +5547,58 @@ components: description: Whether this account is the default UMA deposit account for the customer. If true, incoming UMA payments to this customer's UMA address will be automatically deposited into this account instead of the primary internal account. False if not provided. Note that at most, one external account can be set as the default UMA deposit account for a customer. If there is no default UMA deposit account, incoming UMA payments will be deposited into the primary internal account for the customer. example: false accountInfo: - $ref: '#/components/schemas/ExternalAccountInfo' + oneOf: + - title: US Account + $ref: '#/components/schemas/UsAccountExternalAccountInfo' + - title: CLABE Account + $ref: '#/components/schemas/ClabeAccountExternalAccountInfo' + - title: PIX Account + $ref: '#/components/schemas/PixAccountExternalAccountInfo' + - title: IBAN Account + $ref: '#/components/schemas/IbanAccountExternalAccountInfo' + - title: UPI Account + $ref: '#/components/schemas/UpiAccountExternalAccountInfo' + - title: NGN Account + $ref: '#/components/schemas/NgnAccountExternalAccountInfo' + - title: CAD Account + $ref: '#/components/schemas/CadAccountExternalAccountInfo' + - title: GBP Account + $ref: '#/components/schemas/GbpAccountExternalAccountInfo' + - title: PHP Account + $ref: '#/components/schemas/PhpAccountExternalAccountInfo' + - title: SGD Account + $ref: '#/components/schemas/SgdAccountExternalAccountInfo' + - title: Spark Wallet + $ref: '#/components/schemas/SparkWalletExternalAccountInfo' + - title: Lightning + $ref: '#/components/schemas/LightningExternalAccountInfo' + - title: Solana Wallet + $ref: '#/components/schemas/SolanaWalletExternalAccountInfo' + - title: Tron Wallet + $ref: '#/components/schemas/TronWalletExternalAccountInfo' + - title: Polygon Wallet + $ref: '#/components/schemas/PolygonWalletExternalAccountInfo' + - title: Base Wallet + $ref: '#/components/schemas/BaseWalletExternalAccountInfo' + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' + CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' + PIX: '#/components/schemas/PixAccountExternalAccountInfo' + IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' + UPI: '#/components/schemas/UpiAccountExternalAccountInfo' + NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' + CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' + GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' + PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' + SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' + SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' + LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' + SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' + TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' + POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' + BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' ExternalAccountCreateRequest: allOf: - type: object @@ -5548,7 +5623,58 @@ components: description: Whether to set the external account as the default UMA deposit account. When set to true, incoming payments to this customer's UMA address will be automatically deposited into this external account. False if not provided. Note that only one external account can be set as the default UMA deposit account for a customer, so if there is already a default UMA deposit account, this will override the existing default UMA deposit account. If there is no default UMA deposit account, incoming UMA payments will be deposited into the primary internal account for the customer. default: false accountInfo: - $ref: '#/components/schemas/ExternalAccountInfo' + oneOf: + - title: US Account + $ref: '#/components/schemas/UsAccountExternalAccountInfo' + - title: CLABE Account + $ref: '#/components/schemas/ClabeAccountExternalAccountInfo' + - title: PIX Account + $ref: '#/components/schemas/PixAccountExternalAccountInfo' + - title: IBAN Account + $ref: '#/components/schemas/IbanAccountExternalAccountInfo' + - title: UPI Account + $ref: '#/components/schemas/UpiAccountExternalAccountInfo' + - title: NGN Account + $ref: '#/components/schemas/NgnAccountExternalAccountInfo' + - title: CAD Account + $ref: '#/components/schemas/CadAccountExternalAccountInfo' + - title: GBP Account + $ref: '#/components/schemas/GbpAccountExternalAccountInfo' + - title: PHP Account + $ref: '#/components/schemas/PhpAccountExternalAccountInfo' + - title: SGD Account + $ref: '#/components/schemas/SgdAccountExternalAccountInfo' + - title: Spark Wallet + $ref: '#/components/schemas/SparkWalletExternalAccountInfo' + - title: Lightning + $ref: '#/components/schemas/LightningExternalAccountInfo' + - title: Solana Wallet + $ref: '#/components/schemas/SolanaWalletExternalAccountInfo' + - title: Tron Wallet + $ref: '#/components/schemas/TronWalletExternalAccountInfo' + - title: Polygon Wallet + $ref: '#/components/schemas/PolygonWalletExternalAccountInfo' + - title: Base Wallet + $ref: '#/components/schemas/BaseWalletExternalAccountInfo' + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: '#/components/schemas/UsAccountExternalAccountInfo' + CLABE: '#/components/schemas/ClabeAccountExternalAccountInfo' + PIX: '#/components/schemas/PixAccountExternalAccountInfo' + IBAN: '#/components/schemas/IbanAccountExternalAccountInfo' + UPI: '#/components/schemas/UpiAccountExternalAccountInfo' + NGN_ACCOUNT: '#/components/schemas/NgnAccountExternalAccountInfo' + CAD_ACCOUNT: '#/components/schemas/CadAccountExternalAccountInfo' + GBP_ACCOUNT: '#/components/schemas/GbpAccountExternalAccountInfo' + PHP_ACCOUNT: '#/components/schemas/PhpAccountExternalAccountInfo' + SGD_ACCOUNT: '#/components/schemas/SgdAccountExternalAccountInfo' + SPARK_WALLET: '#/components/schemas/SparkWalletExternalAccountInfo' + LIGHTNING: '#/components/schemas/LightningExternalAccountInfo' + SOLANA_WALLET: '#/components/schemas/SolanaWalletExternalAccountInfo' + TRON_WALLET: '#/components/schemas/TronWalletExternalAccountInfo' + POLYGON_WALLET: '#/components/schemas/PolygonWalletExternalAccountInfo' + BASE_WALLET: '#/components/schemas/BaseWalletExternalAccountInfo' PlaidLinkTokenRequest: type: object required: @@ -5623,33 +5749,14 @@ components: 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 + $ref: '#/components/schemas/AccountTransactionDestination' - 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/UmaAddressTransactionDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionDestination' customerId: type: string description: System ID of the customer (sender for outgoing, recipient for incoming) @@ -5690,6 +5797,54 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + AccountTransactionSource: + allOf: + - $ref: '#/components/schemas/BaseTransactionSource' + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Source account identifier + example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Source account details + BaseTransactionSource: + type: object + required: + - sourceType + properties: + sourceType: + $ref: '#/components/schemas/TransactionSourceType' + currency: + type: string + description: Currency code for the source + example: USD + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource' + UmaAddressTransactionSource: + allOf: + - $ref: '#/components/schemas/BaseTransactionSource' + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the sender + example: $sender@uma.domain.com + description: UMA address source details + TransactionSourceType: + type: string + enum: + - ACCOUNT + - UMA_ADDRESS + - REALTIME_FUNDING + description: Type of transaction source + example: ACCOUNT ReconciliationInstructions: type: object required: @@ -5754,34 +5909,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountTransactionSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressTransactionSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource' receivedAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount received in the recipient's currency @@ -5883,34 +6018,14 @@ components: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: '#/components/schemas/AccountTransactionSource' - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: '#/components/schemas/UmaAddressTransactionSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionSource' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionSource' sentAmount: $ref: '#/components/schemas/CurrencyAmount' description: Amount sent in the sender's currency @@ -5971,6 +6086,53 @@ components: - REFUNDED - EXPIRED description: Status of a payment transaction + AccountTransactionDestination: + allOf: + - $ref: '#/components/schemas/BaseTransactionDestination' + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination account details + BaseTransactionDestination: + type: object + required: + - destinationType + properties: + destinationType: + $ref: '#/components/schemas/TransactionDestinationType' + currency: + type: string + description: Currency code for the destination + example: EUR + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountTransactionDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressTransactionDestination' + UmaAddressTransactionDestination: + allOf: + - $ref: '#/components/schemas/BaseTransactionDestination' + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + description: UMA address destination details + TransactionDestinationType: + type: string + enum: + - ACCOUNT + - UMA_ADDRESS + description: Type of transaction destination + example: ACCOUNT CurrencyPreference: type: object required: @@ -6026,8 +6188,9 @@ components: - code properties: status: - const: 412 type: integer + enum: + - 412 description: HTTP status code code: type: string @@ -6035,7 +6198,8 @@ components: | Error Code | Description | |------------|-------------| | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version | - const: UNSUPPORTED_UMA_VERSION + enum: + - UNSUPPORTED_UMA_VERSION message: type: string description: Error message @@ -6050,8 +6214,9 @@ components: - code properties: status: - const: 424 type: integer + enum: + - 424 description: HTTP status code code: type: string @@ -6073,10 +6238,10 @@ components: details: type: object description: Additional error details - QuoteSource: - oneOf: - - title: Account - type: object + AccountQuoteSource: + allOf: + - $ref: '#/components/schemas/BaseQuoteSource' + - type: object required: - accountId properties: @@ -6084,16 +6249,29 @@ components: type: string description: Source account identifier example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: + customerId: 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: Required when funding from an FBO account to identify the customer on whose behalf the transaction is being initiated. Otherwise, will default to the customerId of the account owner. + example: Customer:019542f5-b3e7-1d02-0000-000000000001 description: Source account details - - title: Real-time funding - type: object + BaseQuoteSource: + type: object + required: + - sourceType + properties: + sourceType: + $ref: '#/components/schemas/QuoteSourceType' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountQuoteSource' + REALTIME_FUNDING: '#/components/schemas/RealtimeFundingQuoteSource' + RealtimeFundingQuoteSource: + allOf: + - $ref: '#/components/schemas/BaseQuoteSource' + - type: object required: - currency - - customerId properties: customerId: type: string @@ -6104,6 +6282,80 @@ components: 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.). + QuoteSourceType: + type: string + enum: + - ACCOUNT + - REALTIME_FUNDING + description: Type of quote funding source + example: ACCOUNT + AccountDestination: + allOf: + - $ref: '#/components/schemas/BaseDestination' + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination account details + BaseDestination: + type: object + required: + - destinationType + properties: + destinationType: + $ref: '#/components/schemas/DestinationType' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/ExternalAccountDetailsDestination' + UmaAddressDestination: + allOf: + - $ref: '#/components/schemas/BaseDestination' + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + 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 + currency: + type: string + description: Currency code for the destination. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. + example: EUR + description: UMA address destination details + ExternalAccountDetailsDestination: + allOf: + - $ref: '#/components/schemas/BaseDestination' + - type: object + required: + - externalAccountDetails + properties: + externalAccountDetails: + $ref: '#/components/schemas/ExternalAccountCreateRequest' + description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. + DestinationType: + type: string + enum: + - ACCOUNT + - UMA_ADDRESS + - EXTERNAL_ACCOUNT_DETAILS + description: Type of payment destination + example: ACCOUNT Quote: type: object required: @@ -6146,45 +6398,30 @@ components: description: When this quote expires (typically 1-5 minutes after creation) example: '2025-10-03T12:05:00Z' source: - $ref: '#/components/schemas/QuoteSource' + oneOf: + - title: Account + $ref: '#/components/schemas/AccountQuoteSource' + - title: Real-time Funding + $ref: '#/components/schemas/RealtimeFundingQuoteSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountQuoteSource' + REALTIME_FUNDING: '#/components/schemas/RealtimeFundingQuoteSource' destination: 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 + - title: Account + $ref: '#/components/schemas/AccountDestination' + - title: UMA Address + $ref: '#/components/schemas/UmaAddressDestination' + - title: External Account Details + $ref: '#/components/schemas/ExternalAccountDetailsDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/ExternalAccountDetailsDestination' sendingCurrency: $ref: '#/components/schemas/Currency' description: Currency for the sending amount @@ -6259,47 +6496,30 @@ components: NOTE: This is required for UMA destinations due to counterparty institution requirements. See `senderCustomerInfo` for more information. example: Lookup:019542f5-b3e7-1d02-0000-000000000009 source: - $ref: '#/components/schemas/QuoteSource' + oneOf: + - title: Account + $ref: '#/components/schemas/AccountQuoteSource' + - title: Real-time Funding + $ref: '#/components/schemas/RealtimeFundingQuoteSource' + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: '#/components/schemas/AccountQuoteSource' + REALTIME_FUNDING: '#/components/schemas/RealtimeFundingQuoteSource' destination: oneOf: - title: Account - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: Currency code for the destination account. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: EUR - description: Destination account details + $ref: '#/components/schemas/AccountDestination' - title: UMA Address - type: object - required: - - umaAddress - - currency - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: Currency code for the destination. See [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) for the full list of supported fiat and crypto currencies. - example: EUR - description: UMA address destination details + $ref: '#/components/schemas/UmaAddressDestination' - title: External Account Details - type: object - required: - - externalAccountDetails - properties: - externalAccountDetails: - $ref: '#/components/schemas/ExternalAccountCreateRequest' - description: A convenient destination option which adds the external account and creates the quote in one step rather than first needing to call /external-accounts to add the account. Useful for one-off payments to some destination. See the external accounts endpoints for test values in sandbox mode. + $ref: '#/components/schemas/ExternalAccountDetailsDestination' + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: '#/components/schemas/AccountDestination' + UMA_ADDRESS: '#/components/schemas/UmaAddressDestination' + EXTERNAL_ACCOUNT_DETAILS: '#/components/schemas/ExternalAccountDetailsDestination' lockedCurrencySide: $ref: '#/components/schemas/QuoteLockSide' lockedCurrencyAmount: @@ -6475,8 +6695,9 @@ components: - code properties: status: - const: 403 type: integer + enum: + - 403 description: HTTP status code code: type: string @@ -6690,7 +6911,8 @@ components: $ref: '#/components/schemas/UmaInvitation' type: type: string - const: INVITATION_CLAIMED + enum: + - INVITATION_CLAIMED description: Type of webhook event example: INVITATION_CLAIMED KycStatusWebhook: diff --git a/openapi/components/schemas/common/BankAccountOrWalletType.yaml b/openapi/components/schemas/common/BankAccountOrWalletType.yaml index c6ee5d1..380fef9 100644 --- a/openapi/components/schemas/common/BankAccountOrWalletType.yaml +++ b/openapi/components/schemas/common/BankAccountOrWalletType.yaml @@ -4,7 +4,6 @@ enum: - US_ACCOUNT - PIX - IBAN - - FBO - UPI - NGN_ACCOUNT - SPARK_WALLET diff --git a/openapi/components/schemas/common/BasePaymentAccountInfo.yaml b/openapi/components/schemas/common/BasePaymentAccountInfo.yaml new file mode 100644 index 0000000..0549480 --- /dev/null +++ b/openapi/components/schemas/common/BasePaymentAccountInfo.yaml @@ -0,0 +1,21 @@ +type: object +required: + - accountType +properties: + accountType: + $ref: ./PaymentAccountType.yaml +discriminator: + propertyName: accountType + mapping: + CLABE: ./PaymentClabeAccountInfo.yaml + US_ACCOUNT: ./PaymentUsAccountInfo.yaml + PIX: ./PaymentPixAccountInfo.yaml + IBAN: ./PaymentIbanAccountInfo.yaml + UPI: ./PaymentUpiAccountInfo.yaml + NGN_ACCOUNT: ./PaymentNgnAccountInfo.yaml + SPARK_WALLET: ./PaymentSparkWalletInfo.yaml + LIGHTNING: ./PaymentLightningInvoiceInfo.yaml + SOLANA_WALLET: ./PaymentSolanaWalletInfo.yaml + TRON_WALLET: ./PaymentTronWalletInfo.yaml + POLYGON_WALLET: ./PaymentPolygonWalletInfo.yaml + BASE_WALLET: ./PaymentBaseWalletInfo.yaml diff --git a/openapi/components/schemas/common/BaseWalletInfo.yaml b/openapi/components/schemas/common/BaseWalletInfo.yaml index fca685c..8b0b2ec 100644 --- a/openapi/components/schemas/common/BaseWalletInfo.yaml +++ b/openapi/components/schemas/common/BaseWalletInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: BASE_WALLET + enum: [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 4fbde04..614eb48 100644 --- a/openapi/components/schemas/common/ClabeAccountInfo.yaml +++ b/openapi/components/schemas/common/ClabeAccountInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: CLABE + enum: [CLABE] example: CLABE clabeNumber: type: string diff --git a/openapi/components/schemas/common/FboAccountInfo.yaml b/openapi/components/schemas/common/FboAccountInfo.yaml index 3218acd..7152d82 100644 --- a/openapi/components/schemas/common/FboAccountInfo.yaml +++ b/openapi/components/schemas/common/FboAccountInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: FBO + enum: [FBO] example: FBO currencyCode: type: string diff --git a/openapi/components/schemas/common/IbanAccountInfo.yaml b/openapi/components/schemas/common/IbanAccountInfo.yaml index 453de4b..59ea47a 100644 --- a/openapi/components/schemas/common/IbanAccountInfo.yaml +++ b/openapi/components/schemas/common/IbanAccountInfo.yaml @@ -6,7 +6,7 @@ required: properties: accountType: type: string - const: IBAN + enum: [IBAN] example: IBAN iban: type: string diff --git a/openapi/components/schemas/common/NgnAccountInfo.yaml b/openapi/components/schemas/common/NgnAccountInfo.yaml index 9775a38..3c69767 100644 --- a/openapi/components/schemas/common/NgnAccountInfo.yaml +++ b/openapi/components/schemas/common/NgnAccountInfo.yaml @@ -6,7 +6,7 @@ required: properties: accountType: type: string - const: NGN_ACCOUNT + enum: [NGN_ACCOUNT] example: NGN_ACCOUNT accountNumber: type: string diff --git a/openapi/components/schemas/common/PaymentAccountType.yaml b/openapi/components/schemas/common/PaymentAccountType.yaml new file mode 100644 index 0000000..1b5f6af --- /dev/null +++ b/openapi/components/schemas/common/PaymentAccountType.yaml @@ -0,0 +1,16 @@ +type: string +enum: + - CLABE + - US_ACCOUNT + - PIX + - IBAN + - UPI + - NGN_ACCOUNT + - SPARK_WALLET + - LIGHTNING + - SOLANA_WALLET + - TRON_WALLET + - POLYGON_WALLET + - BASE_WALLET +description: Type of payment account or wallet +example: US_ACCOUNT diff --git a/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml b/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml index 422cddb..e2d3c2f 100644 --- a/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentBaseWalletInfo.yaml @@ -1,7 +1,10 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./BaseWalletInfo.yaml -properties: - assetType: - type: string - description: Type of asset - const: USDC \ No newline at end of file + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC diff --git a/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml b/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml index 0b19558..29f6d4a 100644 --- a/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentClabeAccountInfo.yaml @@ -1,11 +1,13 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./ClabeAccountInfo.yaml -required: - - reference -properties: - reference: - type: string - description: >- - Unique reference code that must be included with the payment to properly - credit it - example: UMA-Q12345-REF \ No newline at end of file + - type: object + required: + - reference + properties: + reference: + type: string + description: >- + Unique reference code that must be included with the payment to properly + credit it + example: UMA-Q12345-REF diff --git a/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml b/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml index 76315f5..d5c67fb 100644 --- a/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentIbanAccountInfo.yaml @@ -1,11 +1,13 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./IbanAccountInfo.yaml -required: - - reference -properties: - reference: - type: string - description: >- - Unique reference code that must be included with the payment to properly - credit it - example: UMA-Q12345-REF \ No newline at end of file + - type: object + required: + - reference + properties: + reference: + type: string + description: >- + Unique reference code that must be included with the payment to properly + credit it + example: UMA-Q12345-REF diff --git a/openapi/components/schemas/common/PaymentInstructions.yaml b/openapi/components/schemas/common/PaymentInstructions.yaml index 7c0ae2b..313d0cb 100644 --- a/openapi/components/schemas/common/PaymentInstructions.yaml +++ b/openapi/components/schemas/common/PaymentInstructions.yaml @@ -49,4 +49,4 @@ properties: SOLANA_WALLET: ../common/PaymentSolanaWalletInfo.yaml TRON_WALLET: ../common/PaymentTronWalletInfo.yaml POLYGON_WALLET: ../common/PaymentPolygonWalletInfo.yaml - BASE_WALLET: ../common/PaymentBaseWalletInfo.yaml \ No newline at end of file + BASE_WALLET: ../common/PaymentBaseWalletInfo.yaml diff --git a/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml b/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml index 05166c8..2750adf 100644 --- a/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml +++ b/openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml @@ -1,13 +1,10 @@ -type: object -required: - - accountType - - invoice -properties: - accountType: - type: string - const: LIGHTNING - example: LIGHTNING - invoice: - type: string - description: Invoice for the payment - example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs \ No newline at end of file +allOf: + - $ref: ./BasePaymentAccountInfo.yaml + - type: object + required: + - invoice + properties: + invoice: + type: string + description: Invoice for the payment + example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs diff --git a/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml b/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml index 587f52a..b32b47b 100644 --- a/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentNgnAccountInfo.yaml @@ -1,11 +1,13 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./NgnAccountInfo.yaml -required: - - reference -properties: - reference: - type: string - description: >- - Unique reference code that must be included with the payment to properly - credit it - example: UMA-Q12345-REF + - type: object + required: + - reference + properties: + reference: + type: string + description: >- + Unique reference code that must be included with the payment to properly + credit it + example: UMA-Q12345-REF diff --git a/openapi/components/schemas/common/PaymentPixAccountInfo.yaml b/openapi/components/schemas/common/PaymentPixAccountInfo.yaml index a586649..f8e0b0b 100644 --- a/openapi/components/schemas/common/PaymentPixAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentPixAccountInfo.yaml @@ -1,2 +1,3 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./PixAccountInfo.yaml diff --git a/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml b/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml index 1bd4efa..76f3b86 100644 --- a/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml @@ -1,7 +1,11 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./PolygonWalletInfo.yaml -properties: - assetType: - type: string - description: Type of asset - const: USDC \ No newline at end of file + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC + \ No newline at end of file diff --git a/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml b/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml index bc9e7f8..5e674ab 100644 --- a/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml @@ -1,9 +1,11 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./SolanaWalletInfo.yaml -properties: - assetType: - type: string - description: Type of asset - enum: - - USDC - - USDT \ No newline at end of file + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: + - USDC + - USDT diff --git a/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml b/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml index 2b0cbe6..b4a0b24 100644 --- a/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentSparkWalletInfo.yaml @@ -1,15 +1,17 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./SparkWalletInfo.yaml -required: - - assetType -properties: - assetType: - type: string - description: Type of asset - enum: - - BTC - - USDB - invoice: - type: string - description: Invoice for the payment - example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s \ No newline at end of file + - type: object + required: + - assetType + properties: + assetType: + type: string + description: Type of asset + enum: + - BTC + - USDB + invoice: + type: string + description: Invoice for the payment + example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s diff --git a/openapi/components/schemas/common/PaymentTronWalletInfo.yaml b/openapi/components/schemas/common/PaymentTronWalletInfo.yaml index 4aa2cc9..1dbebb9 100644 --- a/openapi/components/schemas/common/PaymentTronWalletInfo.yaml +++ b/openapi/components/schemas/common/PaymentTronWalletInfo.yaml @@ -1,7 +1,9 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./TronWalletInfo.yaml -properties: - assetType: - type: string - description: Type of asset - const: USDT \ No newline at end of file + - type: object + properties: + assetType: + type: string + description: Type of asset + enum: [USDT] diff --git a/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml b/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml index 0dc0366..af4b990 100644 --- a/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentUpiAccountInfo.yaml @@ -1,2 +1,3 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./UpiAccountInfo.yaml diff --git a/openapi/components/schemas/common/PaymentUsAccountInfo.yaml b/openapi/components/schemas/common/PaymentUsAccountInfo.yaml index c03cbce..526d5d0 100644 --- a/openapi/components/schemas/common/PaymentUsAccountInfo.yaml +++ b/openapi/components/schemas/common/PaymentUsAccountInfo.yaml @@ -1,11 +1,13 @@ allOf: + - $ref: ./BasePaymentAccountInfo.yaml - $ref: ./UsAccountInfo.yaml -required: - - reference -properties: - reference: - type: string - description: >- - Unique reference code that must be included with the payment to properly - credit it - example: UMA-Q12345-REF + - type: object + required: + - reference + properties: + reference: + type: string + description: >- + Unique reference code that must be included with the payment to properly + credit it + example: UMA-Q12345-REF diff --git a/openapi/components/schemas/common/PixAccountInfo.yaml b/openapi/components/schemas/common/PixAccountInfo.yaml index 48be7f9..2bc15d0 100644 --- a/openapi/components/schemas/common/PixAccountInfo.yaml +++ b/openapi/components/schemas/common/PixAccountInfo.yaml @@ -7,7 +7,7 @@ required: properties: accountType: type: string - const: PIX + enum: [PIX] example: PIX pixKey: type: string diff --git a/openapi/components/schemas/common/PolygonWalletInfo.yaml b/openapi/components/schemas/common/PolygonWalletInfo.yaml index 2839130..5542aa4 100644 --- a/openapi/components/schemas/common/PolygonWalletInfo.yaml +++ b/openapi/components/schemas/common/PolygonWalletInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: POLYGON_WALLET + enum: [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 598e38b..352b350 100644 --- a/openapi/components/schemas/common/SolanaWalletInfo.yaml +++ b/openapi/components/schemas/common/SolanaWalletInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: SOLANA_WALLET + enum: [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 fa51ca5..f1a33d6 100644 --- a/openapi/components/schemas/common/SparkWalletInfo.yaml +++ b/openapi/components/schemas/common/SparkWalletInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: SPARK_WALLET + enum: [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 5532087..e2965b8 100644 --- a/openapi/components/schemas/common/TronWalletInfo.yaml +++ b/openapi/components/schemas/common/TronWalletInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: TRON_WALLET + enum: [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 b64f54c..6c5136c 100644 --- a/openapi/components/schemas/common/UpiAccountInfo.yaml +++ b/openapi/components/schemas/common/UpiAccountInfo.yaml @@ -5,7 +5,7 @@ required: properties: accountType: type: string - const: UPI + enum: [UPI] example: UPI vpa: type: string diff --git a/openapi/components/schemas/common/UsAccountInfo.yaml b/openapi/components/schemas/common/UsAccountInfo.yaml index d61a5be..ecc1e50 100644 --- a/openapi/components/schemas/common/UsAccountInfo.yaml +++ b/openapi/components/schemas/common/UsAccountInfo.yaml @@ -7,7 +7,7 @@ required: properties: accountType: type: string - const: US_ACCOUNT + enum: [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 70f8b6d..b146b34 100644 --- a/openapi/components/schemas/customers/BusinessCustomerUpdate.yaml +++ b/openapi/components/schemas/customers/BusinessCustomerUpdate.yaml @@ -4,7 +4,7 @@ required: properties: customerType: type: string - const: BUSINESS + enum: [BUSINESS] description: Customer type umaAddress: type: string diff --git a/openapi/components/schemas/errors/Error400.yaml b/openapi/components/schemas/errors/Error400.yaml index 7a7e69c..3186d1f 100644 --- a/openapi/components/schemas/errors/Error400.yaml +++ b/openapi/components/schemas/errors/Error400.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 400 type: integer + enum: [400] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error401.yaml b/openapi/components/schemas/errors/Error401.yaml index dc367d8..10ba8c2 100644 --- a/openapi/components/schemas/errors/Error401.yaml +++ b/openapi/components/schemas/errors/Error401.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 401 type: integer + enum: [401] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error403.yaml b/openapi/components/schemas/errors/Error403.yaml index 520dea4..de837cc 100644 --- a/openapi/components/schemas/errors/Error403.yaml +++ b/openapi/components/schemas/errors/Error403.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 403 type: integer + enum: [403] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error404.yaml b/openapi/components/schemas/errors/Error404.yaml index 055b9ca..8a08b47 100644 --- a/openapi/components/schemas/errors/Error404.yaml +++ b/openapi/components/schemas/errors/Error404.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 404 type: integer + enum: [404] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error409.yaml b/openapi/components/schemas/errors/Error409.yaml index a529e0f..e1f9c36 100644 --- a/openapi/components/schemas/errors/Error409.yaml +++ b/openapi/components/schemas/errors/Error409.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 409 type: integer + enum: [409] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error412.yaml b/openapi/components/schemas/errors/Error412.yaml index 923d19d..193af70 100644 --- a/openapi/components/schemas/errors/Error412.yaml +++ b/openapi/components/schemas/errors/Error412.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 412 type: integer + enum: [412] description: HTTP status code code: type: string @@ -14,7 +14,7 @@ properties: | Error Code | Description | |------------|-------------| | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version | - const: UNSUPPORTED_UMA_VERSION + enum: [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 6d60cf3..b405b45 100644 --- a/openapi/components/schemas/errors/Error424.yaml +++ b/openapi/components/schemas/errors/Error424.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 424 type: integer + enum: [424] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error500.yaml b/openapi/components/schemas/errors/Error500.yaml index d077e25..bcb18fc 100644 --- a/openapi/components/schemas/errors/Error500.yaml +++ b/openapi/components/schemas/errors/Error500.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 500 type: integer + enum: [500] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/errors/Error501.yaml b/openapi/components/schemas/errors/Error501.yaml index 3c46735..8c63a60 100644 --- a/openapi/components/schemas/errors/Error501.yaml +++ b/openapi/components/schemas/errors/Error501.yaml @@ -5,8 +5,8 @@ required: - code properties: status: - const: 501 type: integer + enum: [501] description: HTTP status code code: type: string diff --git a/openapi/components/schemas/external_accounts/BaseBeneficiary.yaml b/openapi/components/schemas/external_accounts/BaseBeneficiary.yaml new file mode 100644 index 0000000..27bd7e8 --- /dev/null +++ b/openapi/components/schemas/external_accounts/BaseBeneficiary.yaml @@ -0,0 +1,13 @@ +type: object +required: + - beneficiaryType +properties: + beneficiaryType: + $ref: ./BeneficiaryType.yaml + address: + $ref: ../common/Address.yaml +discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: ./IndividualBeneficiary.yaml + BUSINESS: ./BusinessBeneficiary.yaml diff --git a/openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml new file mode 100644 index 0000000..ea40286 --- /dev/null +++ b/openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml @@ -0,0 +1,25 @@ +type: object +required: + - accountType +properties: + accountType: + $ref: ./ExternalAccountType.yaml +discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: ./UsAccountExternalAccountInfo.yaml + CLABE: ./ClabeAccountExternalAccountInfo.yaml + PIX: ./PixAccountExternalAccountInfo.yaml + IBAN: ./IbanAccountExternalAccountInfo.yaml + UPI: ./UpiAccountExternalAccountInfo.yaml + NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml + CAD_ACCOUNT: ./CadAccountExternalAccountInfo.yaml + GBP_ACCOUNT: ./GbpAccountExternalAccountInfo.yaml + PHP_ACCOUNT: ./PhpAccountExternalAccountInfo.yaml + SGD_ACCOUNT: ./SgdAccountExternalAccountInfo.yaml + SPARK_WALLET: ./SparkWalletExternalAccountInfo.yaml + LIGHTNING: ./LightningExternalAccountInfo.yaml + SOLANA_WALLET: ./SolanaWalletExternalAccountInfo.yaml + TRON_WALLET: ./TronWalletExternalAccountInfo.yaml + POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml + BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml diff --git a/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml index f33d671..6310206 100644 --- a/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml @@ -1,10 +1,3 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/BaseWalletInfo.yaml - - type: object - required: - - accountType - properties: - accountType: - type: string - const: BASE_WALLET - example: BASE_WALLET diff --git a/openapi/components/schemas/external_accounts/BeneficiaryType.yaml b/openapi/components/schemas/external_accounts/BeneficiaryType.yaml new file mode 100644 index 0000000..b83d51a --- /dev/null +++ b/openapi/components/schemas/external_accounts/BeneficiaryType.yaml @@ -0,0 +1,6 @@ +type: string +enum: + - INDIVIDUAL + - BUSINESS +description: Whether the beneficiary is an individual or a business entity +example: INDIVIDUAL diff --git a/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml b/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml index 10ddea3..43cf3a6 100644 --- a/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml +++ b/openapi/components/schemas/external_accounts/BusinessBeneficiary.yaml @@ -1,23 +1,18 @@ -type: object -required: - - legalName - - beneficiaryType -properties: - beneficiaryType: - type: string - const: BUSINESS - example: BUSINESS - 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 - address: - $ref: ../common/Address.yaml +allOf: + - $ref: ./BaseBeneficiary.yaml + - 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 diff --git a/openapi/components/schemas/external_accounts/CadAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/CadAccountExternalAccountInfo.yaml index a569985..2cd60ab 100644 --- a/openapi/components/schemas/external_accounts/CadAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/CadAccountExternalAccountInfo.yaml @@ -1,18 +1,16 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/CadAccountInfo.yaml - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: [CAD_ACCOUNT] - example: CAD_ACCOUNT beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml index 38c7e8d..1319877 100644 --- a/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/ClabeAccountExternalAccountInfo.yaml @@ -1,17 +1,14 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/ClabeAccountInfo.yaml - type: object - required: - - accountType properties: - accountType: - type: string - const: CLABE - example: CLABE beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/ExternalAccount.yaml b/openapi/components/schemas/external_accounts/ExternalAccount.yaml index 0541df2..a7242d3 100644 --- a/openapi/components/schemas/external_accounts/ExternalAccount.yaml +++ b/openapi/components/schemas/external_accounts/ExternalAccount.yaml @@ -35,4 +35,55 @@ allOf: If there is no default UMA deposit account, incoming UMA payments will be deposited into the primary internal account for the customer. example: false accountInfo: - $ref: ./ExternalAccountInfo.yaml + oneOf: + - title: US Account + $ref: ./UsAccountExternalAccountInfo.yaml + - title: CLABE Account + $ref: ./ClabeAccountExternalAccountInfo.yaml + - title: PIX Account + $ref: ./PixAccountExternalAccountInfo.yaml + - title: IBAN Account + $ref: ./IbanAccountExternalAccountInfo.yaml + - title: UPI Account + $ref: ./UpiAccountExternalAccountInfo.yaml + - title: NGN Account + $ref: ./NgnAccountExternalAccountInfo.yaml + - title: CAD Account + $ref: ./CadAccountExternalAccountInfo.yaml + - title: GBP Account + $ref: ./GbpAccountExternalAccountInfo.yaml + - title: PHP Account + $ref: ./PhpAccountExternalAccountInfo.yaml + - title: SGD Account + $ref: ./SgdAccountExternalAccountInfo.yaml + - title: Spark Wallet + $ref: ./SparkWalletExternalAccountInfo.yaml + - title: Lightning + $ref: ./LightningExternalAccountInfo.yaml + - title: Solana Wallet + $ref: ./SolanaWalletExternalAccountInfo.yaml + - title: Tron Wallet + $ref: ./TronWalletExternalAccountInfo.yaml + - title: Polygon Wallet + $ref: ./PolygonWalletExternalAccountInfo.yaml + - title: Base Wallet + $ref: ./BaseWalletExternalAccountInfo.yaml + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: ./UsAccountExternalAccountInfo.yaml + CLABE: ./ClabeAccountExternalAccountInfo.yaml + PIX: ./PixAccountExternalAccountInfo.yaml + IBAN: ./IbanAccountExternalAccountInfo.yaml + UPI: ./UpiAccountExternalAccountInfo.yaml + NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml + CAD_ACCOUNT: ./CadAccountExternalAccountInfo.yaml + GBP_ACCOUNT: ./GbpAccountExternalAccountInfo.yaml + PHP_ACCOUNT: ./PhpAccountExternalAccountInfo.yaml + SGD_ACCOUNT: ./SgdAccountExternalAccountInfo.yaml + SPARK_WALLET: ./SparkWalletExternalAccountInfo.yaml + LIGHTNING: ./LightningExternalAccountInfo.yaml + SOLANA_WALLET: ./SolanaWalletExternalAccountInfo.yaml + TRON_WALLET: ./TronWalletExternalAccountInfo.yaml + POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml + BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml diff --git a/openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml b/openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml index 5b8a018..cfc446a 100644 --- a/openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml +++ b/openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml @@ -29,4 +29,55 @@ allOf: incoming UMA payments will be deposited into the primary internal account for the customer. default: false accountInfo: - $ref: ./ExternalAccountInfo.yaml \ No newline at end of file + oneOf: + - title: US Account + $ref: ./UsAccountExternalAccountInfo.yaml + - title: CLABE Account + $ref: ./ClabeAccountExternalAccountInfo.yaml + - title: PIX Account + $ref: ./PixAccountExternalAccountInfo.yaml + - title: IBAN Account + $ref: ./IbanAccountExternalAccountInfo.yaml + - title: UPI Account + $ref: ./UpiAccountExternalAccountInfo.yaml + - title: NGN Account + $ref: ./NgnAccountExternalAccountInfo.yaml + - title: CAD Account + $ref: ./CadAccountExternalAccountInfo.yaml + - title: GBP Account + $ref: ./GbpAccountExternalAccountInfo.yaml + - title: PHP Account + $ref: ./PhpAccountExternalAccountInfo.yaml + - title: SGD Account + $ref: ./SgdAccountExternalAccountInfo.yaml + - title: Spark Wallet + $ref: ./SparkWalletExternalAccountInfo.yaml + - title: Lightning + $ref: ./LightningExternalAccountInfo.yaml + - title: Solana Wallet + $ref: ./SolanaWalletExternalAccountInfo.yaml + - title: Tron Wallet + $ref: ./TronWalletExternalAccountInfo.yaml + - title: Polygon Wallet + $ref: ./PolygonWalletExternalAccountInfo.yaml + - title: Base Wallet + $ref: ./BaseWalletExternalAccountInfo.yaml + discriminator: + propertyName: accountType + mapping: + US_ACCOUNT: ./UsAccountExternalAccountInfo.yaml + CLABE: ./ClabeAccountExternalAccountInfo.yaml + PIX: ./PixAccountExternalAccountInfo.yaml + IBAN: ./IbanAccountExternalAccountInfo.yaml + UPI: ./UpiAccountExternalAccountInfo.yaml + NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml + CAD_ACCOUNT: ./CadAccountExternalAccountInfo.yaml + GBP_ACCOUNT: ./GbpAccountExternalAccountInfo.yaml + PHP_ACCOUNT: ./PhpAccountExternalAccountInfo.yaml + SGD_ACCOUNT: ./SgdAccountExternalAccountInfo.yaml + SPARK_WALLET: ./SparkWalletExternalAccountInfo.yaml + LIGHTNING: ./LightningExternalAccountInfo.yaml + SOLANA_WALLET: ./SolanaWalletExternalAccountInfo.yaml + TRON_WALLET: ./TronWalletExternalAccountInfo.yaml + POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml + BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml diff --git a/openapi/components/schemas/external_accounts/ExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/ExternalAccountInfo.yaml deleted file mode 100644 index 3833c6b..0000000 --- a/openapi/components/schemas/external_accounts/ExternalAccountInfo.yaml +++ /dev/null @@ -1,52 +0,0 @@ -oneOf: - - title: US Account - $ref: ./UsAccountExternalAccountInfo.yaml - - title: CLABE Account - $ref: ./ClabeAccountExternalAccountInfo.yaml - - title: PIX Account - $ref: ./PixAccountExternalAccountInfo.yaml - - title: IBAN Account - $ref: ./IbanAccountExternalAccountInfo.yaml - - title: UPI Account - $ref: ./UpiAccountExternalAccountInfo.yaml - - title: NGN Account - $ref: ./NgnAccountExternalAccountInfo.yaml - - title: CAD Account - $ref: ./CadAccountExternalAccountInfo.yaml - - title: GBP Account - $ref: ./GbpAccountExternalAccountInfo.yaml - - title: PHP Account - $ref: ./PhpAccountExternalAccountInfo.yaml - - title: SGD Account - $ref: ./SgdAccountExternalAccountInfo.yaml - - title: Spark Wallet - $ref: ./SparkWalletExternalAccountInfo.yaml - - title: Lightning - $ref: ./LightningExternalAccountInfo.yaml - - title: Solana Wallet - $ref: ./SolanaWalletExternalAccountInfo.yaml - - title: Tron Wallet - $ref: ./TronWalletExternalAccountInfo.yaml - - title: Polygon Wallet - $ref: ./PolygonWalletExternalAccountInfo.yaml - - title: Base Wallet - $ref: ./BaseWalletExternalAccountInfo.yaml -discriminator: - propertyName: accountType - mapping: - US_ACCOUNT: ./UsAccountExternalAccountInfo.yaml - CLABE: ./ClabeAccountExternalAccountInfo.yaml - PIX: ./PixAccountExternalAccountInfo.yaml - IBAN: ./IbanAccountExternalAccountInfo.yaml - UPI: ./UpiAccountExternalAccountInfo.yaml - NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml - CAD_ACCOUNT: ./CadAccountExternalAccountInfo.yaml - GBP_ACCOUNT: ./GbpAccountExternalAccountInfo.yaml - PHP_ACCOUNT: ./PhpAccountExternalAccountInfo.yaml - SGD_ACCOUNT: ./SgdAccountExternalAccountInfo.yaml - SPARK_WALLET: ./SparkWalletExternalAccountInfo.yaml - LIGHTNING: ./LightningExternalAccountInfo.yaml - SOLANA_WALLET: ./SolanaWalletExternalAccountInfo.yaml - TRON_WALLET: ./TronWalletExternalAccountInfo.yaml - POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml - BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml diff --git a/openapi/components/schemas/external_accounts/ExternalAccountType.yaml b/openapi/components/schemas/external_accounts/ExternalAccountType.yaml new file mode 100644 index 0000000..66c8d8b --- /dev/null +++ b/openapi/components/schemas/external_accounts/ExternalAccountType.yaml @@ -0,0 +1,20 @@ +type: string +enum: + - US_ACCOUNT + - CLABE + - PIX + - IBAN + - UPI + - NGN_ACCOUNT + - CAD_ACCOUNT + - GBP_ACCOUNT + - PHP_ACCOUNT + - SGD_ACCOUNT + - SPARK_WALLET + - LIGHTNING + - SOLANA_WALLET + - TRON_WALLET + - POLYGON_WALLET + - BASE_WALLET +description: Type of external account or wallet +example: US_ACCOUNT diff --git a/openapi/components/schemas/external_accounts/GbpAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/GbpAccountExternalAccountInfo.yaml index 58f0d32..148d64a 100644 --- a/openapi/components/schemas/external_accounts/GbpAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/GbpAccountExternalAccountInfo.yaml @@ -1,18 +1,16 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/GbpAccountInfo.yaml - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: [GBP_ACCOUNT] - example: GBP_ACCOUNT beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml index 18366cc..748dbf9 100644 --- a/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/IbanAccountExternalAccountInfo.yaml @@ -1,17 +1,14 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/IbanAccountInfo.yaml - type: object - required: - - accountType properties: - accountType: - type: string - const: IBAN - example: IBAN beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml b/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml index 6a86b51..4b3880c 100644 --- a/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml +++ b/openapi/components/schemas/external_accounts/IndividualBeneficiary.yaml @@ -1,26 +1,21 @@ -type: object -required: - - fullName - - birthDate - - nationality - - beneficiaryType -properties: - beneficiaryType: - type: string - const: INDIVIDUAL - example: INDIVIDUAL - fullName: - type: string - description: Individual's full name - example: John Michael Doe - birthDate: - type: string - format: date - description: Date of birth in ISO 8601 format (YYYY-MM-DD) - example: '1990-01-15' - nationality: - type: string - description: Country code (ISO 3166-1 alpha-2) - example: US - address: - $ref: ../common/Address.yaml +allOf: + - $ref: ./BaseBeneficiary.yaml + - type: object + required: + - fullName + - birthDate + - nationality + properties: + fullName: + type: string + description: Individual's full name + example: John Michael Doe + birthDate: + type: string + format: date + description: Date of birth in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: Country code (ISO 3166-1 alpha-2) + example: US diff --git a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml index fd8b921..a06cdd9 100644 --- a/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/LightningExternalAccountInfo.yaml @@ -1,22 +1,18 @@ -type: object -required: - - accountType -description: > - Lightning payment destination. Exactly one of `invoice`, `bolt12`, or `lightningAddress` must be provided. -properties: - accountType: - type: string - 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 +allOf: + - $ref: ./BaseExternalAccountInfo.yaml + - type: object + description: > + Lightning payment destination. Exactly one of `invoice`, `bolt12`, or `lightningAddress` must be provided. + properties: + 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 diff --git a/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml index a493565..a0d540f 100644 --- a/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml @@ -1,19 +1,17 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/NgnAccountInfo.yaml - type: object required: - - accountType - purposeOfPayment - beneficiary properties: - accountType: - type: string - const: NGN_ACCOUNT - example: NGN_ACCOUNT beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/PhpAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PhpAccountExternalAccountInfo.yaml index 977eed5..f94ba22 100644 --- a/openapi/components/schemas/external_accounts/PhpAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PhpAccountExternalAccountInfo.yaml @@ -1,18 +1,16 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/PhpAccountInfo.yaml - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: [PHP_ACCOUNT] - example: PHP_ACCOUNT beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml index a6b6d04..c14f3b6 100644 --- a/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PixAccountExternalAccountInfo.yaml @@ -1,17 +1,14 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/PixAccountInfo.yaml - type: object - required: - - accountType properties: - accountType: - type: string - const: PIX - example: PIX beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml index f0ff0e4..b8ca69f 100644 --- a/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml @@ -1,10 +1,3 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/PolygonWalletInfo.yaml - - type: object - required: - - accountType - properties: - accountType: - type: string - const: POLYGON_WALLET - example: POLYGON_WALLET diff --git a/openapi/components/schemas/external_accounts/SgdAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/SgdAccountExternalAccountInfo.yaml index a74a508..30cda03 100644 --- a/openapi/components/schemas/external_accounts/SgdAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SgdAccountExternalAccountInfo.yaml @@ -1,18 +1,16 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/SgdAccountInfo.yaml - type: object required: - - accountType - beneficiary properties: - accountType: - type: string - enum: [SGD_ACCOUNT] - example: SGD_ACCOUNT beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml index c1c80d7..c82b5a4 100644 --- a/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml @@ -1,10 +1,3 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/SolanaWalletInfo.yaml - - type: object - required: - - accountType - properties: - accountType: - type: string - 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 9eb34cf..67c4110 100644 --- a/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml @@ -1,10 +1,3 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/SparkWalletInfo.yaml - - type: object - required: - - accountType - properties: - accountType: - type: string - 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 404243d..ad5397e 100644 --- a/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml @@ -1,10 +1,3 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/TronWalletInfo.yaml - - type: object - required: - - accountType - properties: - accountType: - type: string - 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 f30fe79..1c2252d 100644 --- a/openapi/components/schemas/external_accounts/UpiAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/UpiAccountExternalAccountInfo.yaml @@ -1,17 +1,14 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/UpiAccountInfo.yaml - type: object - required: - - accountType properties: - accountType: - type: string - const: UPI - example: UPI beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml index c9b2b54..c9fc747 100644 --- a/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/UsAccountExternalAccountInfo.yaml @@ -1,18 +1,14 @@ allOf: + - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/UsAccountInfo.yaml - type: object - required: - - accountType - - beneficiary properties: - accountType: - type: string - const: US_ACCOUNT - example: US_ACCOUNT beneficiary: oneOf: - - $ref: ./IndividualBeneficiary.yaml - - $ref: ./BusinessBeneficiary.yaml + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ./BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: diff --git a/openapi/components/schemas/quotes/AccountDestination.yaml b/openapi/components/schemas/quotes/AccountDestination.yaml new file mode 100644 index 0000000..457f6d9 --- /dev/null +++ b/openapi/components/schemas/quotes/AccountDestination.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ./BaseDestination.yaml + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination account details diff --git a/openapi/components/schemas/quotes/AccountQuoteSource.yaml b/openapi/components/schemas/quotes/AccountQuoteSource.yaml new file mode 100644 index 0000000..a95bee4 --- /dev/null +++ b/openapi/components/schemas/quotes/AccountQuoteSource.yaml @@ -0,0 +1,15 @@ +allOf: + - $ref: ./BaseQuoteSource.yaml + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Source account identifier + example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + customerId: + type: string + description: Required when funding from an FBO account to identify the customer on whose behalf the transaction is being initiated. Otherwise, will default to the customerId of the account owner. + example: Customer:019542f5-b3e7-1d02-0000-000000000001 + description: Source account details diff --git a/openapi/components/schemas/quotes/BaseDestination.yaml b/openapi/components/schemas/quotes/BaseDestination.yaml new file mode 100644 index 0000000..c4c8164 --- /dev/null +++ b/openapi/components/schemas/quotes/BaseDestination.yaml @@ -0,0 +1,12 @@ +type: object +required: + - destinationType +properties: + destinationType: + $ref: ./DestinationType.yaml +discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./AccountDestination.yaml + UMA_ADDRESS: ./UmaAddressDestination.yaml + EXTERNAL_ACCOUNT_DETAILS: ./ExternalAccountDetailsDestination.yaml diff --git a/openapi/components/schemas/quotes/BaseQuoteSource.yaml b/openapi/components/schemas/quotes/BaseQuoteSource.yaml new file mode 100644 index 0000000..f584b5a --- /dev/null +++ b/openapi/components/schemas/quotes/BaseQuoteSource.yaml @@ -0,0 +1,11 @@ +type: object +required: + - sourceType +properties: + sourceType: + $ref: ./QuoteSourceType.yaml +discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountQuoteSource.yaml + REALTIME_FUNDING: ./RealtimeFundingQuoteSource.yaml diff --git a/openapi/components/schemas/quotes/DestinationType.yaml b/openapi/components/schemas/quotes/DestinationType.yaml new file mode 100644 index 0000000..9ebdbeb --- /dev/null +++ b/openapi/components/schemas/quotes/DestinationType.yaml @@ -0,0 +1,7 @@ +type: string +enum: + - ACCOUNT + - UMA_ADDRESS + - EXTERNAL_ACCOUNT_DETAILS +description: Type of payment destination +example: ACCOUNT diff --git a/openapi/components/schemas/quotes/ExternalAccountDetailsDestination.yaml b/openapi/components/schemas/quotes/ExternalAccountDetailsDestination.yaml new file mode 100644 index 0000000..0d25864 --- /dev/null +++ b/openapi/components/schemas/quotes/ExternalAccountDetailsDestination.yaml @@ -0,0 +1,13 @@ +allOf: + - $ref: ./BaseDestination.yaml + - type: object + required: + - externalAccountDetails + properties: + externalAccountDetails: + $ref: ../external_accounts/ExternalAccountCreateRequest.yaml + description: >- + A convenient destination option which adds the external account and creates + the quote in one step rather than first needing to call /external-accounts + to add the account. Useful for one-off payments to some destination. + See the external accounts endpoints for test values in sandbox mode. diff --git a/openapi/components/schemas/quotes/Quote.yaml b/openapi/components/schemas/quotes/Quote.yaml index 92edf2a..a44df25 100644 --- a/openapi/components/schemas/quotes/Quote.yaml +++ b/openapi/components/schemas/quotes/Quote.yaml @@ -40,47 +40,30 @@ properties: example: '2025-10-03T12:05:00Z' # Transfer details source: - $ref: ./QuoteSource.yaml + oneOf: + - title: Account + $ref: ./AccountQuoteSource.yaml + - title: Real-time Funding + $ref: ./RealtimeFundingQuoteSource.yaml + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountQuoteSource.yaml + REALTIME_FUNDING: ./RealtimeFundingQuoteSource.yaml destination: 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 + - title: Account + $ref: ./AccountDestination.yaml + - title: UMA Address + $ref: ./UmaAddressDestination.yaml + - title: External Account Details + $ref: ./ExternalAccountDetailsDestination.yaml + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./AccountDestination.yaml + UMA_ADDRESS: ./UmaAddressDestination.yaml + EXTERNAL_ACCOUNT_DETAILS: ./ExternalAccountDetailsDestination.yaml sendingCurrency: $ref: ../common/Currency.yaml description: Currency for the sending amount diff --git a/openapi/components/schemas/quotes/QuoteRequest.yaml b/openapi/components/schemas/quotes/QuoteRequest.yaml index 5e27a72..2153859 100644 --- a/openapi/components/schemas/quotes/QuoteRequest.yaml +++ b/openapi/components/schemas/quotes/QuoteRequest.yaml @@ -15,57 +15,30 @@ properties: See `senderCustomerInfo` for more information. example: Lookup:019542f5-b3e7-1d02-0000-000000000009 source: - $ref: ./QuoteSource.yaml + oneOf: + - title: Account + $ref: ./AccountQuoteSource.yaml + - title: Real-time Funding + $ref: ./RealtimeFundingQuoteSource.yaml + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountQuoteSource.yaml + REALTIME_FUNDING: ./RealtimeFundingQuoteSource.yaml destination: oneOf: - title: Account - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Destination account identifier - example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - currency: - type: string - description: >- - Currency code for the destination account. See - [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) - for the full list of supported fiat and crypto currencies. - example: EUR - description: Destination account details + $ref: ./AccountDestination.yaml - title: UMA Address - type: object - required: - - umaAddress - - currency - properties: - umaAddress: - type: string - description: UMA address of the recipient - example: $receiver@uma.domain.com - currency: - type: string - description: >- - Currency code for the destination. See - [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) - for the full list of supported fiat and crypto currencies. - example: EUR - description: UMA address destination details + $ref: ./UmaAddressDestination.yaml - title: External Account Details - type: object - required: - - externalAccountDetails - properties: - externalAccountDetails: - $ref: ../external_accounts/ExternalAccountCreateRequest.yaml - description: >- - A convenient destination option which adds the external account and creates - the quote in one step rather than first needing to call /external-accounts - to add the account. Useful for one-off payments to some destination. - See the external accounts endpoints for test values in sandbox mode. + $ref: ./ExternalAccountDetailsDestination.yaml + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./AccountDestination.yaml + UMA_ADDRESS: ./UmaAddressDestination.yaml + EXTERNAL_ACCOUNT_DETAILS: ./ExternalAccountDetailsDestination.yaml lockedCurrencySide: $ref: ./QuoteLockSide.yaml lockedCurrencyAmount: diff --git a/openapi/components/schemas/quotes/QuoteSourceType.yaml b/openapi/components/schemas/quotes/QuoteSourceType.yaml new file mode 100644 index 0000000..dd6f3a9 --- /dev/null +++ b/openapi/components/schemas/quotes/QuoteSourceType.yaml @@ -0,0 +1,6 @@ +type: string +enum: + - ACCOUNT + - REALTIME_FUNDING +description: Type of quote funding source +example: ACCOUNT diff --git a/openapi/components/schemas/quotes/QuoteSource.yaml b/openapi/components/schemas/quotes/RealtimeFundingQuoteSource.yaml similarity index 62% rename from openapi/components/schemas/quotes/QuoteSource.yaml rename to openapi/components/schemas/quotes/RealtimeFundingQuoteSource.yaml index d12a92d..5657e4f 100644 --- a/openapi/components/schemas/quotes/QuoteSource.yaml +++ b/openapi/components/schemas/quotes/RealtimeFundingQuoteSource.yaml @@ -1,26 +1,8 @@ -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 +allOf: + - $ref: ./BaseQuoteSource.yaml + - type: object required: - currency - - customerId properties: customerId: type: string diff --git a/openapi/components/schemas/quotes/UmaAddressDestination.yaml b/openapi/components/schemas/quotes/UmaAddressDestination.yaml new file mode 100644 index 0000000..39769e0 --- /dev/null +++ b/openapi/components/schemas/quotes/UmaAddressDestination.yaml @@ -0,0 +1,28 @@ +allOf: + - $ref: ./BaseDestination.yaml + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + 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 + currency: + type: string + description: >- + Currency code for the destination. See + [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) + for the full list of supported fiat and crypto currencies. + example: EUR + description: UMA address destination details diff --git a/openapi/components/schemas/transactions/AccountTransactionDestination.yaml b/openapi/components/schemas/transactions/AccountTransactionDestination.yaml new file mode 100644 index 0000000..f1b5f7e --- /dev/null +++ b/openapi/components/schemas/transactions/AccountTransactionDestination.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ./BaseTransactionDestination.yaml + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Destination account identifier + example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination account details diff --git a/openapi/components/schemas/transactions/AccountTransactionSource.yaml b/openapi/components/schemas/transactions/AccountTransactionSource.yaml new file mode 100644 index 0000000..765bf15 --- /dev/null +++ b/openapi/components/schemas/transactions/AccountTransactionSource.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ./BaseTransactionSource.yaml + - type: object + required: + - accountId + properties: + accountId: + type: string + description: Source account identifier + example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Source account details diff --git a/openapi/components/schemas/transactions/BaseTransactionDestination.yaml b/openapi/components/schemas/transactions/BaseTransactionDestination.yaml new file mode 100644 index 0000000..fab727b --- /dev/null +++ b/openapi/components/schemas/transactions/BaseTransactionDestination.yaml @@ -0,0 +1,15 @@ +type: object +required: + - destinationType +properties: + destinationType: + $ref: ./TransactionDestinationType.yaml + currency: + type: string + description: Currency code for the destination + example: EUR +discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./AccountTransactionDestination.yaml + UMA_ADDRESS: ./UmaAddressTransactionDestination.yaml diff --git a/openapi/components/schemas/transactions/BaseTransactionSource.yaml b/openapi/components/schemas/transactions/BaseTransactionSource.yaml new file mode 100644 index 0000000..de82afa --- /dev/null +++ b/openapi/components/schemas/transactions/BaseTransactionSource.yaml @@ -0,0 +1,15 @@ +type: object +required: + - sourceType +properties: + sourceType: + $ref: ./TransactionSourceType.yaml + currency: + type: string + description: Currency code for the source + example: USD +discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountTransactionSource.yaml + UMA_ADDRESS: ./UmaAddressTransactionSource.yaml diff --git a/openapi/components/schemas/transactions/IncomingTransaction.yaml b/openapi/components/schemas/transactions/IncomingTransaction.yaml index ebd4fe0..f05372c 100644 --- a/openapi/components/schemas/transactions/IncomingTransaction.yaml +++ b/openapi/components/schemas/transactions/IncomingTransaction.yaml @@ -7,34 +7,14 @@ allOf: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: ./AccountTransactionSource.yaml - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: ./UmaAddressTransactionSource.yaml + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountTransactionSource.yaml + UMA_ADDRESS: ./UmaAddressTransactionSource.yaml receivedAmount: $ref: ../common/CurrencyAmount.yaml description: Amount received in the recipient's currency diff --git a/openapi/components/schemas/transactions/OutgoingTransaction.yaml b/openapi/components/schemas/transactions/OutgoingTransaction.yaml index 56700ff..9b8c2d9 100644 --- a/openapi/components/schemas/transactions/OutgoingTransaction.yaml +++ b/openapi/components/schemas/transactions/OutgoingTransaction.yaml @@ -9,34 +9,14 @@ allOf: source: oneOf: - title: Account Source - type: object - required: - - accountId - - currency - properties: - accountId: - type: string - description: Source account identifier - example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - currency: - type: string - description: Currency code for the source account - example: USD - description: Source account details + $ref: ./AccountTransactionSource.yaml - title: UMA Address Source - type: object - required: - - umaAddress - properties: - umaAddress: - type: string - description: UMA address of the sender - example: $sender@uma.domain.com - currency: - type: string - description: Currency code for the source - example: USD - description: UMA address source details + $ref: ./UmaAddressTransactionSource.yaml + discriminator: + propertyName: sourceType + mapping: + ACCOUNT: ./AccountTransactionSource.yaml + UMA_ADDRESS: ./UmaAddressTransactionSource.yaml sentAmount: $ref: ../common/CurrencyAmount.yaml description: Amount sent in the sender's currency diff --git a/openapi/components/schemas/transactions/Transaction.yaml b/openapi/components/schemas/transactions/Transaction.yaml index 83f5c80..e8050b9 100644 --- a/openapi/components/schemas/transactions/Transaction.yaml +++ b/openapi/components/schemas/transactions/Transaction.yaml @@ -18,33 +18,14 @@ properties: 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 + $ref: ./AccountTransactionDestination.yaml - 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: ./UmaAddressTransactionDestination.yaml + discriminator: + propertyName: destinationType + mapping: + ACCOUNT: ./AccountTransactionDestination.yaml + UMA_ADDRESS: ./UmaAddressTransactionDestination.yaml customerId: type: string description: System ID of the customer (sender for outgoing, recipient for incoming) diff --git a/openapi/components/schemas/transactions/TransactionDestinationType.yaml b/openapi/components/schemas/transactions/TransactionDestinationType.yaml new file mode 100644 index 0000000..f2b9006 --- /dev/null +++ b/openapi/components/schemas/transactions/TransactionDestinationType.yaml @@ -0,0 +1,6 @@ +type: string +enum: + - ACCOUNT + - UMA_ADDRESS +description: Type of transaction destination +example: ACCOUNT diff --git a/openapi/components/schemas/transactions/TransactionSourceType.yaml b/openapi/components/schemas/transactions/TransactionSourceType.yaml new file mode 100644 index 0000000..469546c --- /dev/null +++ b/openapi/components/schemas/transactions/TransactionSourceType.yaml @@ -0,0 +1,7 @@ +type: string +enum: + - ACCOUNT + - UMA_ADDRESS + - REALTIME_FUNDING +description: Type of transaction source +example: ACCOUNT diff --git a/openapi/components/schemas/transactions/UmaAddressTransactionDestination.yaml b/openapi/components/schemas/transactions/UmaAddressTransactionDestination.yaml new file mode 100644 index 0000000..09ff939 --- /dev/null +++ b/openapi/components/schemas/transactions/UmaAddressTransactionDestination.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ./BaseTransactionDestination.yaml + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the recipient + example: $receiver@uma.domain.com + description: UMA address destination details diff --git a/openapi/components/schemas/transactions/UmaAddressTransactionSource.yaml b/openapi/components/schemas/transactions/UmaAddressTransactionSource.yaml new file mode 100644 index 0000000..115a29d --- /dev/null +++ b/openapi/components/schemas/transactions/UmaAddressTransactionSource.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ./BaseTransactionSource.yaml + - type: object + required: + - umaAddress + properties: + umaAddress: + type: string + description: UMA address of the sender + example: $sender@uma.domain.com + description: UMA address source details diff --git a/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml b/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml index a57b766..a9087f3 100644 --- a/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml +++ b/openapi/components/schemas/webhooks/InvitationClaimedWebhook.yaml @@ -8,6 +8,6 @@ allOf: $ref: ../invitations/UmaInvitation.yaml type: type: string - const: INVITATION_CLAIMED + enum: [INVITATION_CLAIMED] description: Type of webhook event example: INVITATION_CLAIMED