From 6719730f8f8e1e1a65ae630e354d784c87d3e80f Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 5 Jun 2026 16:12:20 -0700 Subject: [PATCH 1/2] 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 a73b3fd70..4ccf55c23 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 a73b3fd70..4ccf55c23 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 37c10f698..dfea97d10 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 527338672..75d7be5ea 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 From 0d4d24e4e2166ca6082835d38b598bbadb35ff50 Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 11 Jun 2026 15:09:32 -0700 Subject: [PATCH 2/2] Address review: include phoneNumber in CnyAccountInfoBase example The example only showed the BANK_TRANSFER fields (accountNumber + bankName); add phoneNumber back so MOBILE_MONEY consumers have an inline reference for every supported field, matching the CopAccountInfoBase example convention. Co-Authored-By: Claude Opus 4.8 (1M context) --- mintlify/openapi.yaml | 1 + openapi.yaml | 1 + openapi/components/schemas/common/CnyAccountInfoBase.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 4ccf55c23..186d55ffa 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -11905,6 +11905,7 @@ components: example: accountType: CNY_ACCOUNT accountNumber: '1234567890' + phoneNumber: '+1234567890' bankName: China Construction Bank CnyAccountInfo: allOf: diff --git a/openapi.yaml b/openapi.yaml index 4ccf55c23..186d55ffa 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11905,6 +11905,7 @@ components: example: accountType: CNY_ACCOUNT accountNumber: '1234567890' + phoneNumber: '+1234567890' bankName: China Construction Bank CnyAccountInfo: allOf: diff --git a/openapi/components/schemas/common/CnyAccountInfoBase.yaml b/openapi/components/schemas/common/CnyAccountInfoBase.yaml index 75d7be5ea..7dc178141 100644 --- a/openapi/components/schemas/common/CnyAccountInfoBase.yaml +++ b/openapi/components/schemas/common/CnyAccountInfoBase.yaml @@ -32,4 +32,5 @@ properties: example: accountType: CNY_ACCOUNT accountNumber: '1234567890' + phoneNumber: '+1234567890' bankName: China Construction Bank