From 6719730f8f8e1e1a65ae630e354d784c87d3e80f Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 5 Jun 2026 16:12:20 -0700 Subject: [PATCH] Add CNY bank-transfer rail (B2B) alongside mobile wallet CNY currently supports only the MOBILE_MONEY rail (individual beneficiary). Add the BANK_TRANSFER rail so CNY accounts can target a bank account, mirroring the dual-rail COP schema: - CnyAccountInfoBase: bankName is now the only required field beyond accountType; phoneNumber becomes optional (MOBILE_MONEY only) and a new optional accountNumber is added (BANK_TRANSFER only). Per-rail requirements are documented on the schema and enforced at the application layer, same as COP. - CnyAccountInfo: add BANK_TRANSFER to the paymentRails enum. The beneficiary oneOf already supports BUSINESS (BusinessBeneficiary) in addition to INDIVIDUAL, so the business-to-business shape the bank rail requires (legalName + address) needs no further schema change. Co-Authored-By: Claude Opus 4.8 (1M context) --- mintlify/openapi.yaml | 19 ++++++++++++++----- openapi.yaml | 19 ++++++++++++++----- .../schemas/common/CnyAccountInfo.yaml | 1 + .../schemas/common/CnyAccountInfoBase.yaml | 19 ++++++++++++++----- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index a73b3fd7..4ccf55c2 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -11875,29 +11875,37 @@ components: type: object required: - accountType - - phoneNumber - bankName + description: |- + Required fields depend on the selected paymentRails: + - BANK_TRANSFER: accountNumber, bankName + - MOBILE_MONEY: phoneNumber, bankName properties: accountType: type: string enum: - CNY_ACCOUNT + accountNumber: + type: string + description: The destination bank account number (BANK_TRANSFER rail) + minLength: 1 + maxLength: 34 phoneNumber: type: string - description: The phone number in international format + description: The phone number in international format (MOBILE_MONEY rail) example: '+1234567890' minLength: 7 maxLength: 15 pattern: ^\+[0-9]{6,14}$ bankName: type: string - description: The name of the bank + description: The name of the bank or mobile-wallet provider minLength: 1 maxLength: 255 example: accountType: CNY_ACCOUNT - phoneNumber: '+1234567890' - bankName: Example Bank + accountNumber: '1234567890' + bankName: China Construction Bank CnyAccountInfo: allOf: - $ref: '#/components/schemas/CnyAccountInfoBase' @@ -11911,6 +11919,7 @@ components: type: string enum: - MOBILE_MONEY + - BANK_TRANSFER PaymentCnyAccountInfo: title: CNY Account allOf: diff --git a/openapi.yaml b/openapi.yaml index a73b3fd7..4ccf55c2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11875,29 +11875,37 @@ components: type: object required: - accountType - - phoneNumber - bankName + description: |- + Required fields depend on the selected paymentRails: + - BANK_TRANSFER: accountNumber, bankName + - MOBILE_MONEY: phoneNumber, bankName properties: accountType: type: string enum: - CNY_ACCOUNT + accountNumber: + type: string + description: The destination bank account number (BANK_TRANSFER rail) + minLength: 1 + maxLength: 34 phoneNumber: type: string - description: The phone number in international format + description: The phone number in international format (MOBILE_MONEY rail) example: '+1234567890' minLength: 7 maxLength: 15 pattern: ^\+[0-9]{6,14}$ bankName: type: string - description: The name of the bank + description: The name of the bank or mobile-wallet provider minLength: 1 maxLength: 255 example: accountType: CNY_ACCOUNT - phoneNumber: '+1234567890' - bankName: Example Bank + accountNumber: '1234567890' + bankName: China Construction Bank CnyAccountInfo: allOf: - $ref: '#/components/schemas/CnyAccountInfoBase' @@ -11911,6 +11919,7 @@ components: type: string enum: - MOBILE_MONEY + - BANK_TRANSFER PaymentCnyAccountInfo: title: CNY Account allOf: diff --git a/openapi/components/schemas/common/CnyAccountInfo.yaml b/openapi/components/schemas/common/CnyAccountInfo.yaml index 37c10f69..dfea97d1 100644 --- a/openapi/components/schemas/common/CnyAccountInfo.yaml +++ b/openapi/components/schemas/common/CnyAccountInfo.yaml @@ -10,3 +10,4 @@ allOf: type: string enum: - MOBILE_MONEY + - BANK_TRANSFER diff --git a/openapi/components/schemas/common/CnyAccountInfoBase.yaml b/openapi/components/schemas/common/CnyAccountInfoBase.yaml index 52733867..75d7be5e 100644 --- a/openapi/components/schemas/common/CnyAccountInfoBase.yaml +++ b/openapi/components/schemas/common/CnyAccountInfoBase.yaml @@ -1,26 +1,35 @@ type: object required: - accountType -- phoneNumber - bankName +description: 'Required fields depend on the selected paymentRails: + + - BANK_TRANSFER: accountNumber, bankName + + - MOBILE_MONEY: phoneNumber, bankName' properties: accountType: type: string enum: - CNY_ACCOUNT + accountNumber: + type: string + description: The destination bank account number (BANK_TRANSFER rail) + minLength: 1 + maxLength: 34 phoneNumber: type: string - description: The phone number in international format + description: The phone number in international format (MOBILE_MONEY rail) example: '+1234567890' minLength: 7 maxLength: 15 pattern: ^\+[0-9]{6,14}$ bankName: type: string - description: The name of the bank + description: The name of the bank or mobile-wallet provider minLength: 1 maxLength: 255 example: accountType: CNY_ACCOUNT - phoneNumber: '+1234567890' - bankName: Example Bank + accountNumber: '1234567890' + bankName: China Construction Bank