diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 781afc91..d9185e43 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -210,6 +210,9 @@ resources: external_account_create: '#/components/schemas/ExternalAccountCreateRequest' external_account_info_one_of: "#/components/schemas/ExternalAccountInfoOneOf" business_beneficiary: "#/components/schemas/BusinessBeneficiary" + wallet_beneficiary_fields: "#/components/schemas/WalletBeneficiaryFields" + wallet_beneficiary_one_of: "#/components/schemas/WalletBeneficiaryOneOf" + wallet_individual_beneficiary: "#/components/schemas/WalletIndividualBeneficiary" # Ownership verification (challenge/verify) ownership_verification_method: "#/components/schemas/OwnershipVerificationMethod" ownership_challenge_request: "#/components/schemas/OwnershipChallengeRequest" diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index c024979a..4c8df200 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -19381,16 +19381,56 @@ components: mapping: INDIVIDUAL: '#/components/schemas/SwiftBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' + WalletIndividualBeneficiary: + title: Individual Beneficiary + type: object + required: + - beneficiaryType + - fullName + - countryOfResidence + properties: + beneficiaryType: + type: string + enum: + - INDIVIDUAL + fullName: + type: string + description: The full name of the beneficiary + example: John Michael Doe + countryOfResidence: + type: string + description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) + example: US + WalletBeneficiaryOneOf: + description: The person or business that owns a crypto wallet external account. + oneOf: + - title: Individual Beneficiary + $ref: '#/components/schemas/WalletIndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/WalletIndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + WalletBeneficiaryFields: + type: object + properties: + beneficiary: + description: The wallet's owner. Optional for `FIRST_PARTY` accounts — the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms with counterparty requirements (e.g. EU Travel Rule); if missing there, creation fails with `400 INVALID_INPUT`. + $ref: '#/components/schemas/WalletBeneficiaryOneOf' BaseWalletExternalAccountInfo: title: Base Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/BaseWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' EthereumWalletExternalAccountInfo: title: Ethereum L1 Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/EthereumWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' LightningInfo: type: object description: | @@ -19424,26 +19464,31 @@ components: allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PolygonWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' PlasmaWalletExternalAccountInfo: title: Plasma Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PlasmaWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' SolanaWalletExternalAccountInfo: title: Solana Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SolanaWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' SparkWalletExternalAccountInfo: title: Spark Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SparkWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' TronWalletExternalAccountInfo: title: Tron Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/TronWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' CnyBeneficiary: title: Individual Beneficiary type: object diff --git a/openapi.yaml b/openapi.yaml index c024979a..4c8df200 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -19381,16 +19381,56 @@ components: mapping: INDIVIDUAL: '#/components/schemas/SwiftBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' + WalletIndividualBeneficiary: + title: Individual Beneficiary + type: object + required: + - beneficiaryType + - fullName + - countryOfResidence + properties: + beneficiaryType: + type: string + enum: + - INDIVIDUAL + fullName: + type: string + description: The full name of the beneficiary + example: John Michael Doe + countryOfResidence: + type: string + description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) + example: US + WalletBeneficiaryOneOf: + description: The person or business that owns a crypto wallet external account. + oneOf: + - title: Individual Beneficiary + $ref: '#/components/schemas/WalletIndividualBeneficiary' + - title: Business Beneficiary + $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/WalletIndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + WalletBeneficiaryFields: + type: object + properties: + beneficiary: + description: The wallet's owner. Optional for `FIRST_PARTY` accounts — the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms with counterparty requirements (e.g. EU Travel Rule); if missing there, creation fails with `400 INVALID_INPUT`. + $ref: '#/components/schemas/WalletBeneficiaryOneOf' BaseWalletExternalAccountInfo: title: Base Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/BaseWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' EthereumWalletExternalAccountInfo: title: Ethereum L1 Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/EthereumWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' LightningInfo: type: object description: | @@ -19424,26 +19464,31 @@ components: allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PolygonWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' PlasmaWalletExternalAccountInfo: title: Plasma Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/PlasmaWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' SolanaWalletExternalAccountInfo: title: Solana Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SolanaWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' SparkWalletExternalAccountInfo: title: Spark Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/SparkWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' TronWalletExternalAccountInfo: title: Tron Wallet allOf: - $ref: '#/components/schemas/BaseExternalAccountInfo' - $ref: '#/components/schemas/TronWalletInfo' + - $ref: '#/components/schemas/WalletBeneficiaryFields' CnyBeneficiary: title: Individual Beneficiary type: object diff --git a/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml b/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml new file mode 100644 index 00000000..9a42dcdb --- /dev/null +++ b/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml @@ -0,0 +1,19 @@ +title: Individual Beneficiary +type: object +required: + - beneficiaryType + - fullName + - countryOfResidence +properties: + beneficiaryType: + type: string + enum: + - INDIVIDUAL + fullName: + type: string + description: The full name of the beneficiary + example: John Michael Doe + countryOfResidence: + type: string + description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) + example: US diff --git a/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml index 7bf6935f..effa3062 100644 --- a/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml @@ -2,4 +2,5 @@ title: Base Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/BaseWalletInfo.yaml - \ No newline at end of file + + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/EthereumWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/EthereumWalletExternalAccountInfo.yaml index 147cc380..30ce9d92 100644 --- a/openapi/components/schemas/external_accounts/EthereumWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/EthereumWalletExternalAccountInfo.yaml @@ -2,3 +2,4 @@ title: Ethereum L1 Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/EthereumWalletInfo.yaml + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/PlasmaWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PlasmaWalletExternalAccountInfo.yaml index bcddbab9..a4f8d247 100644 --- a/openapi/components/schemas/external_accounts/PlasmaWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PlasmaWalletExternalAccountInfo.yaml @@ -2,3 +2,4 @@ title: Plasma Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/PlasmaWalletInfo.yaml + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml index 8e6594f5..521b6535 100644 --- a/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/PolygonWalletExternalAccountInfo.yaml @@ -2,4 +2,5 @@ title: Polygon Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/PolygonWalletInfo.yaml - \ No newline at end of file + + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml index ff213403..f1cc9eae 100644 --- a/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SolanaWalletExternalAccountInfo.yaml @@ -2,4 +2,5 @@ title: Solana Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/SolanaWalletInfo.yaml - \ No newline at end of file + + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml index 267a5ddf..15427b7e 100644 --- a/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/SparkWalletExternalAccountInfo.yaml @@ -2,4 +2,5 @@ title: Spark Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/SparkWalletInfo.yaml - \ No newline at end of file + + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml index f3dedf87..a56249eb 100644 --- a/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml +++ b/openapi/components/schemas/external_accounts/TronWalletExternalAccountInfo.yaml @@ -2,4 +2,5 @@ title: Tron Wallet allOf: - $ref: ./BaseExternalAccountInfo.yaml - $ref: ../common/TronWalletInfo.yaml - \ No newline at end of file + + - $ref: ./WalletBeneficiaryFields.yaml diff --git a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml new file mode 100644 index 00000000..2d46d7ed --- /dev/null +++ b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml @@ -0,0 +1,9 @@ +type: object +properties: + beneficiary: + description: >- + The wallet's owner. Optional for `FIRST_PARTY` accounts — the + customer's verified identity is used. Required for `THIRD_PARTY` + wallets on platforms with counterparty requirements (e.g. EU Travel + Rule); if missing there, creation fails with `400 INVALID_INPUT`. + $ref: ./WalletBeneficiaryOneOf.yaml diff --git a/openapi/components/schemas/external_accounts/WalletBeneficiaryOneOf.yaml b/openapi/components/schemas/external_accounts/WalletBeneficiaryOneOf.yaml new file mode 100644 index 00000000..3bc3d1c7 --- /dev/null +++ b/openapi/components/schemas/external_accounts/WalletBeneficiaryOneOf.yaml @@ -0,0 +1,12 @@ +description: >- + The person or business that owns a crypto wallet external account. +oneOf: + - title: Individual Beneficiary + $ref: ../common/WalletIndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ../common/BusinessBeneficiary.yaml +discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: ../common/WalletIndividualBeneficiary.yaml + BUSINESS: ../common/BusinessBeneficiary.yaml