From 6dde6374b2c9c0d91b0d9b8d1c7215f4bb58ecf9 Mon Sep 17 00:00:00 2001 From: shreyav Date: Thu, 13 Aug 2026 21:12:35 +0000 Subject: [PATCH 1/4] feat: add beneficiary to crypto wallet external accounts --- .stainless/stainless.yml | 1 + mintlify/openapi.yaml | 66 +++++++++++++++++++ openapi.yaml | 66 +++++++++++++++++++ .../BaseWalletExternalAccountInfo.yaml | 3 +- .../EthereumWalletExternalAccountInfo.yaml | 1 + .../PlasmaWalletExternalAccountInfo.yaml | 1 + .../PolygonWalletExternalAccountInfo.yaml | 3 +- .../SolanaWalletExternalAccountInfo.yaml | 3 +- .../SparkWalletExternalAccountInfo.yaml | 3 +- .../TronWalletExternalAccountInfo.yaml | 3 +- .../WalletBeneficiaryFields.yaml | 19 ++++++ 11 files changed, 164 insertions(+), 5 deletions(-) create mode 100644 openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 49100e04c..b611b9417 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -210,6 +210,7 @@ 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" address: "#/components/schemas/Address" beneficiary_verified_data: "#/components/schemas/BeneficiaryVerifiedData" # List response diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 6e4523f11..e64d277df 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -18991,16 +18991,77 @@ components: mapping: INDIVIDUAL: '#/components/schemas/SwiftBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' + BeneficiaryType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Whether the beneficiary is an individual or a business entity + example: INDIVIDUAL + BaseBeneficiary: + type: object + required: + - beneficiaryType + properties: + beneficiaryType: + $ref: '#/components/schemas/BeneficiaryType' + address: + $ref: '#/components/schemas/Address' + IndividualBeneficiary: + title: Individual Beneficiary + allOf: + - $ref: '#/components/schemas/BaseBeneficiary' + - type: object + required: + - fullName + - birthDate + - nationality + - beneficiaryType + properties: + beneficiaryType: + type: string + enum: + - 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 + WalletBeneficiaryFields: + type: object + properties: + beneficiary: + description: The person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. + 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' 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: | @@ -19034,26 +19095,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 6e4523f11..e64d277df 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -18991,16 +18991,77 @@ components: mapping: INDIVIDUAL: '#/components/schemas/SwiftBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' + BeneficiaryType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Whether the beneficiary is an individual or a business entity + example: INDIVIDUAL + BaseBeneficiary: + type: object + required: + - beneficiaryType + properties: + beneficiaryType: + $ref: '#/components/schemas/BeneficiaryType' + address: + $ref: '#/components/schemas/Address' + IndividualBeneficiary: + title: Individual Beneficiary + allOf: + - $ref: '#/components/schemas/BaseBeneficiary' + - type: object + required: + - fullName + - birthDate + - nationality + - beneficiaryType + properties: + beneficiaryType: + type: string + enum: + - 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 + WalletBeneficiaryFields: + type: object + properties: + beneficiary: + description: The person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. + 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' 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: | @@ -19034,26 +19095,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/external_accounts/BaseWalletExternalAccountInfo.yaml b/openapi/components/schemas/external_accounts/BaseWalletExternalAccountInfo.yaml index 7bf6935f4..effa30629 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 147cc3806..30ce9d92c 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 bcddbab97..a4f8d2475 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 8e6594f5e..521b65350 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 ff2134035..f1cc9eae6 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 267a5ddf6..15427b7e2 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 f3dedf87b..a56249eb2 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 000000000..f06d80d64 --- /dev/null +++ b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml @@ -0,0 +1,19 @@ +type: object +properties: + beneficiary: + description: >- + The person or business that owns this wallet. Optional for + `FIRST_PARTY` accounts — when omitted, the customer's verified identity + is used. Required for `THIRD_PARTY` wallets on platforms subject to + counterparty requirements — for example, under the EU Travel Rule or + similar requirements in other regions. + oneOf: + - title: Individual Beneficiary + $ref: ./IndividualBeneficiary.yaml + - title: Business Beneficiary + $ref: ../common/BusinessBeneficiary.yaml + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: ./IndividualBeneficiary.yaml + BUSINESS: ../common/BusinessBeneficiary.yaml From c0af306b8c447b5486aa025e548f527ba6bd11f2 Mon Sep 17 00:00:00 2001 From: shreyav Date: Fri, 14 Aug 2026 17:47:47 +0000 Subject: [PATCH 2/4] Require fullName and countryOfResidence for wallet individual beneficiaries Matches what is actually transmitted for Travel Rule counterparty info (name + country of residence) instead of the generic beneficiary's birthDate/nationality requirements, which are not transmitted and would force platforms to collect a third party's date of birth. --- .stainless/stainless.yml | 1 + mintlify/openapi.yaml | 71 +++++++++---------- openapi.yaml | 71 +++++++++---------- .../common/WalletIndividualBeneficiary.yaml | 37 ++++++++++ .../WalletBeneficiaryFields.yaml | 4 +- 5 files changed, 104 insertions(+), 80 deletions(-) create mode 100644 openapi/components/schemas/common/WalletIndividualBeneficiary.yaml diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 8474528cd..2a8b05395 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -211,6 +211,7 @@ resources: external_account_info_one_of: "#/components/schemas/ExternalAccountInfoOneOf" business_beneficiary: "#/components/schemas/BusinessBeneficiary" wallet_beneficiary_fields: "#/components/schemas/WalletBeneficiaryFields" + 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 43cc9008c..818b6a359 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -19381,50 +19381,43 @@ components: mapping: INDIVIDUAL: '#/components/schemas/SwiftBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' - BeneficiaryType: - type: string - enum: - - INDIVIDUAL - - BUSINESS - description: Whether the beneficiary is an individual or a business entity - example: INDIVIDUAL - BaseBeneficiary: + WalletIndividualBeneficiary: + title: Individual Beneficiary type: object required: - beneficiaryType + - fullName + - countryOfResidence properties: beneficiaryType: - $ref: '#/components/schemas/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 + birthDate: + type: string + format: date + description: The birth date of the beneficiary in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: The nationality of the beneficiary (ISO 3166-1 alpha-2) + example: US + email: + type: string + description: The email of the beneficiary + phoneNumber: + type: string + description: The phone number of the beneficiary address: $ref: '#/components/schemas/Address' - IndividualBeneficiary: - title: Individual Beneficiary - allOf: - - $ref: '#/components/schemas/BaseBeneficiary' - - type: object - required: - - fullName - - birthDate - - nationality - - beneficiaryType - properties: - beneficiaryType: - type: string - enum: - - 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 WalletBeneficiaryFields: type: object properties: @@ -19432,13 +19425,13 @@ components: description: The person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. oneOf: - title: Individual Beneficiary - $ref: '#/components/schemas/IndividualBeneficiary' + $ref: '#/components/schemas/WalletIndividualBeneficiary' - title: Business Beneficiary $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: - INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + INDIVIDUAL: '#/components/schemas/WalletIndividualBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' BaseWalletExternalAccountInfo: title: Base Wallet diff --git a/openapi.yaml b/openapi.yaml index 43cc9008c..818b6a359 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -19381,50 +19381,43 @@ components: mapping: INDIVIDUAL: '#/components/schemas/SwiftBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' - BeneficiaryType: - type: string - enum: - - INDIVIDUAL - - BUSINESS - description: Whether the beneficiary is an individual or a business entity - example: INDIVIDUAL - BaseBeneficiary: + WalletIndividualBeneficiary: + title: Individual Beneficiary type: object required: - beneficiaryType + - fullName + - countryOfResidence properties: beneficiaryType: - $ref: '#/components/schemas/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 + birthDate: + type: string + format: date + description: The birth date of the beneficiary in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: The nationality of the beneficiary (ISO 3166-1 alpha-2) + example: US + email: + type: string + description: The email of the beneficiary + phoneNumber: + type: string + description: The phone number of the beneficiary address: $ref: '#/components/schemas/Address' - IndividualBeneficiary: - title: Individual Beneficiary - allOf: - - $ref: '#/components/schemas/BaseBeneficiary' - - type: object - required: - - fullName - - birthDate - - nationality - - beneficiaryType - properties: - beneficiaryType: - type: string - enum: - - 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 WalletBeneficiaryFields: type: object properties: @@ -19432,13 +19425,13 @@ components: description: The person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. oneOf: - title: Individual Beneficiary - $ref: '#/components/schemas/IndividualBeneficiary' + $ref: '#/components/schemas/WalletIndividualBeneficiary' - title: Business Beneficiary $ref: '#/components/schemas/BusinessBeneficiary' discriminator: propertyName: beneficiaryType mapping: - INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + INDIVIDUAL: '#/components/schemas/WalletIndividualBeneficiary' BUSINESS: '#/components/schemas/BusinessBeneficiary' BaseWalletExternalAccountInfo: title: Base Wallet diff --git a/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml b/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml new file mode 100644 index 000000000..d3382241b --- /dev/null +++ b/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml @@ -0,0 +1,37 @@ +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 + birthDate: + type: string + format: date + description: The birth date of the beneficiary in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: The nationality of the beneficiary (ISO 3166-1 alpha-2) + example: US + email: + type: string + description: The email of the beneficiary + phoneNumber: + type: string + description: The phone number of the beneficiary + address: + $ref: ./Address.yaml diff --git a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml index f06d80d64..01c161228 100644 --- a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml +++ b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml @@ -9,11 +9,11 @@ properties: similar requirements in other regions. oneOf: - title: Individual Beneficiary - $ref: ./IndividualBeneficiary.yaml + $ref: ../common/WalletIndividualBeneficiary.yaml - title: Business Beneficiary $ref: ../common/BusinessBeneficiary.yaml discriminator: propertyName: beneficiaryType mapping: - INDIVIDUAL: ./IndividualBeneficiary.yaml + INDIVIDUAL: ../common/WalletIndividualBeneficiary.yaml BUSINESS: ../common/BusinessBeneficiary.yaml From 26ed1d4ebc6d61e3d22f53b5f3f56ebe6d5593ce Mon Sep 17 00:00:00 2001 From: shreyav Date: Fri, 14 Aug 2026 21:27:08 +0000 Subject: [PATCH 3/4] Name the wallet beneficiary union WalletBeneficiaryOneOf --- .stainless/stainless.yml | 1 + mintlify/openapi.yaml | 23 +++++++++++-------- openapi.yaml | 23 +++++++++++-------- .../WalletBeneficiaryFields.yaml | 11 +-------- .../WalletBeneficiaryOneOf.yaml | 12 ++++++++++ 5 files changed, 40 insertions(+), 30 deletions(-) create mode 100644 openapi/components/schemas/external_accounts/WalletBeneficiaryOneOf.yaml diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 2a8b05395..d9185e432 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -211,6 +211,7 @@ resources: 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" diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 818b6a359..bdf604af5 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -19418,21 +19418,24 @@ components: description: The phone number of the beneficiary address: $ref: '#/components/schemas/Address' + 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 person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. - 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' + $ref: '#/components/schemas/WalletBeneficiaryOneOf' BaseWalletExternalAccountInfo: title: Base Wallet allOf: diff --git a/openapi.yaml b/openapi.yaml index 818b6a359..bdf604af5 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -19418,21 +19418,24 @@ components: description: The phone number of the beneficiary address: $ref: '#/components/schemas/Address' + 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 person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. - 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' + $ref: '#/components/schemas/WalletBeneficiaryOneOf' BaseWalletExternalAccountInfo: title: Base Wallet allOf: diff --git a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml index 01c161228..5ab1ce74d 100644 --- a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml +++ b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml @@ -7,13 +7,4 @@ properties: is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. - 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 + $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 000000000..3bc3d1c7d --- /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 From b610c4176f22b07c5d2efad5f833f79b1ce11cfc Mon Sep 17 00:00:00 2001 From: shreyav Date: Fri, 14 Aug 2026 21:58:29 +0000 Subject: [PATCH 4/4] Trim wallet beneficiary to transmitted fields and tighten docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drops the never-transmitted optional PII (birthDate, nationality, email, phoneNumber, address) from WalletIndividualBeneficiary — optional fields can be added back without breaking; collected-but-unused PII cannot be removed as easily. Documents the 400 INVALID_INPUT on missing required beneficiary. --- mintlify/openapi.yaml | 19 +----------------- openapi.yaml | 19 +----------------- .../common/WalletIndividualBeneficiary.yaml | 20 +------------------ .../WalletBeneficiaryFields.yaml | 9 ++++----- 4 files changed, 7 insertions(+), 60 deletions(-) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index bdf604af5..4c8df2000 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -19401,23 +19401,6 @@ components: type: string description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) example: US - birthDate: - type: string - format: date - description: The birth date of the beneficiary in ISO 8601 format (YYYY-MM-DD) - example: '1990-01-15' - nationality: - type: string - description: The nationality of the beneficiary (ISO 3166-1 alpha-2) - example: US - email: - type: string - description: The email of the beneficiary - phoneNumber: - type: string - description: The phone number of the beneficiary - address: - $ref: '#/components/schemas/Address' WalletBeneficiaryOneOf: description: The person or business that owns a crypto wallet external account. oneOf: @@ -19434,7 +19417,7 @@ components: type: object properties: beneficiary: - description: The person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. + 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 diff --git a/openapi.yaml b/openapi.yaml index bdf604af5..4c8df2000 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -19401,23 +19401,6 @@ components: type: string description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) example: US - birthDate: - type: string - format: date - description: The birth date of the beneficiary in ISO 8601 format (YYYY-MM-DD) - example: '1990-01-15' - nationality: - type: string - description: The nationality of the beneficiary (ISO 3166-1 alpha-2) - example: US - email: - type: string - description: The email of the beneficiary - phoneNumber: - type: string - description: The phone number of the beneficiary - address: - $ref: '#/components/schemas/Address' WalletBeneficiaryOneOf: description: The person or business that owns a crypto wallet external account. oneOf: @@ -19434,7 +19417,7 @@ components: type: object properties: beneficiary: - description: The person or business that owns this wallet. Optional for `FIRST_PARTY` accounts — when omitted, the customer's verified identity is used. Required for `THIRD_PARTY` wallets on platforms subject to counterparty requirements — for example, under the EU Travel Rule or similar requirements in other regions. + 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 diff --git a/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml b/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml index d3382241b..9a42dcdb0 100644 --- a/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml +++ b/openapi/components/schemas/common/WalletIndividualBeneficiary.yaml @@ -15,23 +15,5 @@ properties: example: John Michael Doe countryOfResidence: type: string - description: >- - The country of residence of the beneficiary (ISO 3166-1 alpha-2) + description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) example: US - birthDate: - type: string - format: date - description: The birth date of the beneficiary in ISO 8601 format (YYYY-MM-DD) - example: '1990-01-15' - nationality: - type: string - description: The nationality of the beneficiary (ISO 3166-1 alpha-2) - example: US - email: - type: string - description: The email of the beneficiary - phoneNumber: - type: string - description: The phone number of the beneficiary - address: - $ref: ./Address.yaml diff --git a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml index 5ab1ce74d..2d46d7edb 100644 --- a/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml +++ b/openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml @@ -2,9 +2,8 @@ type: object properties: beneficiary: description: >- - The person or business that owns this wallet. Optional for - `FIRST_PARTY` accounts — when omitted, the customer's verified identity - is used. Required for `THIRD_PARTY` wallets on platforms subject to - counterparty requirements — for example, under the EU Travel Rule or - similar requirements in other regions. + 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