Skip to content

Add CNY bank-transfer rail (B2B) alongside mobile wallet#554

Open
mohamedwane wants to merge 1 commit into
mainfrom
mohamed/cny-bank-rail
Open

Add CNY bank-transfer rail (B2B) alongside mobile wallet#554
mohamedwane wants to merge 1 commit into
mainfrom
mohamed/cny-bank-rail

Conversation

@mohamedwane
Copy link
Copy Markdown
Contributor

Summary

Adds the BANK_TRANSFER rail to the CNY account schema so CNY payouts can target a bank account (business-to-business), in addition to the existing MOBILE_MONEY wallet rail. Mirrors the dual-rail COP schema pattern.

Changes

  • CnyAccountInfoBase.yaml: bankName is now the only required field beyond accountType. phoneNumber becomes optional (MOBILE_MONEY only); new optional accountNumber added (BANK_TRANSFER only). Per-rail requirements documented on the schema and enforced at the application layer, exactly like COP.
  • CnyAccountInfo.yaml: add BANK_TRANSFER to the paymentRails enum.

The beneficiary oneOf already supports BUSINESS (BusinessBeneficiary) alongside INDIVIDUAL, so the B2B shape the bank rail requires (legalName + address) needs no further schema change. The credit-party identifier for the bank rail is just bank_account_number (confirmed against the live payer requirements).

Test plan

  • npm run build:openapi bundles cleanly
  • CI lint passes
  • After merge: regen grid_api in webdev, wire the bank rail in sparkcore (rails config, fields provider, account.py, B2B transaction-type resolution), add itests

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) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Jun 5, 2026 11:12pm

Request Review

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Jun 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

⚠️ Breaking OpenAPI changes detected

This PR introduces breaking changes to openapi.yaml:

API Changelog 2025-10-13 vs. 2025-10-13

API Changes

GET /agents/approvals

  • ⚠️ the response property data/items/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ the response property data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /agents/me/actions

  • ⚠️ the response property data/items/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ the response property data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /agents/me/actions/{actionId}

  • ⚠️ the response property quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ the response property transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /agents/me/external-accounts

  • ⚠️ the response property data/items/allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /agents/me/external-accounts

  • ⚠️ the response property allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

GET /agents/me/external-accounts/{externalAccountId}

  • ⚠️ the response property allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /agents/me/internal-accounts

  • ⚠️ the response property data/items/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /agents/me/quotes

  • ⚠️ the response property paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

GET /agents/me/quotes/{quoteId}

  • ⚠️ the response property paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /agents/me/quotes/{quoteId}/execute

  • ⚠️ the response property quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ the response property transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /agents/me/transactions

  • ⚠️ the response property data/items/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /agents/me/transactions/{transactionId}

  • ⚠️ the response property oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /agents/me/transfer-in

  • ⚠️ the response property quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ the response property transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

POST /agents/me/transfer-out

  • ⚠️ the response property quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ the response property transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

POST /agents/{agentId}/actions/{actionId}/approve

  • ⚠️ the response property quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ the response property transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /agents/{agentId}/actions/{actionId}/reject

  • ⚠️ the response property quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ the response property transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /customers/external-accounts

  • ⚠️ the response property data/items/allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /customers/external-accounts

  • ⚠️ the response property allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

GET /customers/external-accounts/{externalAccountId}

  • ⚠️ the response property allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /customers/internal-accounts

  • ⚠️ the response property data/items/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

PATCH /internal-accounts/{id}

  • ⚠️ the response property fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /platform/external-accounts

  • ⚠️ the response property data/items/allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /platform/external-accounts

  • ⚠️ the response property allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

GET /platform/external-accounts/{externalAccountId}

  • ⚠️ the response property allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #1]/accountInfo/oneOf[subschema #45: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /platform/internal-accounts

  • ⚠️ the response property data/items/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /quotes

  • ⚠️ the response property paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

GET /quotes/{quoteId}

  • ⚠️ the response property paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /quotes/{quoteId}/execute

  • ⚠️ the response property paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /sandbox/internal-accounts/{accountId}/fund

  • ⚠️ the response property fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /sandbox/send

  • ⚠️ the response property allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /transactions

  • ⚠️ the response property data/items/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the data/items/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

GET /transactions/{transactionId}

  • ⚠️ the response property oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /transactions/{transactionId}/confirm

  • ⚠️ the response property oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 200
  • ⚠️ added the new BANK_TRANSFER enum value to the oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 200

POST /transfer-in

  • ⚠️ the response property oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

POST /transfer-out

  • ⚠️ the response property oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[#/components/schemas/CnyAccountInfoBase]/phoneNumber became optional for the status 201
  • ⚠️ added the new BANK_TRANSFER enum value to the oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #39: CNY Account]/allOf[#/components/schemas/CnyAccountInfo]/allOf[subschema #2]/paymentRails/items/ response property for the response status 201

Detected by oasdiff. This PR will need approval from an API reviewer before merge.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

csharp

fix(types): make account_number/phone_number optional, add bank_transfer rail to cny_account

go

feat(api): add accountNumber, make phoneNumber optional across CNY account types

kotlin

feat(api): add accountNumber field and BANK_TRANSFER payment rail to CnyAccount

openapi

feat(api): add accountNumber/BANK_TRANSFER, make phoneNumber optional in CnyAccountInfo

php

feat(api): add BANK_TRANSFER rail support to CnyAccount

python

feat(api): add BANK_TRANSFER rail, account_number field to CNY external accounts

ruby

feat(api): add BANK_TRANSFER rail support to CNY accounts

typescript

feat(api): add BANK_TRANSFER rail support to CNY accounts with accountNumber field

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/637470137e19057fcce4c0782be879a3f17c5a6b/dist.tar.gz
grid-openapi studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅

grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@fe7ec3c47b97add215343b6f11d539d93b2f190e
⚠️ grid-kotlin studio · code · diff

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ✅build ✅lint ✅test ❗ (prev: test ✅)

grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/19538341f44131ed8e1dd4d30cbe6a01c116e09d/grid-0.0.1-py3-none-any.whl
grid-csharp studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ✅test ❗

grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-06-05 23:18:19 UTC

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 5, 2026

Greptile Summary

This PR adds BANK_TRANSFER as a second payment rail to the CNY account schema, enabling business-to-business payouts to a bank account alongside the existing MOBILE_MONEY wallet rail. The design closely mirrors the dual-rail COP schema: phoneNumber moves from required to optional and a new optional accountNumber field is introduced, with per-rail field requirements documented in the schema description and delegated to the application layer for enforcement.

  • CnyAccountInfoBase.yaml: bankName is the sole unconditionally required field; phoneNumber (MOBILE_MONEY) and accountNumber (BANK_TRANSFER) become optional with minLength/maxLength constraints; the inline description documents which fields each rail expects.
  • CnyAccountInfo.yaml: BANK_TRANSFER added to the paymentRails enum; no structural changes needed to beneficiary since BusinessBeneficiary already exists in the oneOf.
  • openapi.yaml / mintlify/openapi.yaml: bundled artifacts updated consistently.

Confidence Score: 4/5

Safe to merge; the schema change is additive and closely mirrors the established COP dual-rail pattern with no breaking API surface changes.

The base-schema example now demonstrates only the BANK_TRANSFER case, silently dropping the phoneNumber illustration that MOBILE_MONEY consumers would expect. Everything else — the enum extension, the field constraints, the required-field adjustment — is consistent with CopAccountInfoBase and introduces no structural risk.

openapi/components/schemas/common/CnyAccountInfoBase.yaml — the example object warrants a small touch to re-include phoneNumber for completeness.

Important Files Changed

Filename Overview
openapi/components/schemas/common/CnyAccountInfoBase.yaml Removes phoneNumber from required, adds optional accountNumber for BANK_TRANSFER rail; example now shows only BANK_TRANSFER fields, losing the MOBILE_MONEY illustration present in the COP counterpart.
openapi/components/schemas/common/CnyAccountInfo.yaml Adds BANK_TRANSFER to the paymentRails enum alongside MOBILE_MONEY; clean, minimal change consistent with CopAccountInfo.
openapi.yaml Bundled artifact reflecting the same base-schema changes; same example gap as the source YAML.
mintlify/openapi.yaml Mintlify-copy of the bundled spec; identical changes to openapi.yaml.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CNY Payout Request] --> B{paymentRails}
    B -->|MOBILE_MONEY| C[Required: bankName\nExpected: phoneNumber]
    B -->|BANK_TRANSFER| D[Required: bankName\nExpected: accountNumber]
    C --> E{beneficiary.type}
    D --> F{beneficiary.type}
    E -->|INDIVIDUAL| G[IndividualBeneficiary\nname + address]
    E -->|BUSINESS| H[BusinessBeneficiary\nlegalName + address]
    F -->|INDIVIDUAL| G
    F -->|BUSINESS| H
    G --> I[Submit Payout]
    H --> I
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
openapi/components/schemas/common/CnyAccountInfoBase.yaml:32-35
The updated example only illustrates the `BANK_TRANSFER` rail — `phoneNumber` has been dropped entirely. The `CopAccountInfoBase.yaml` counterpart includes all optional fields in its example so consumers can see every supported field at a glance. Without a `phoneNumber` entry here, a developer targeting the `MOBILE_MONEY` rail has no inline reference for that field in the base schema.

```suggestion
example:
  accountType: CNY_ACCOUNT
  accountNumber: '1234567890'
  phoneNumber: '+1234567890'
  bankName: China Construction Bank
```

Reviews (1): Last reviewed commit: "Add CNY bank-transfer rail (B2B) alongsi..." | Re-trigger Greptile

Comment on lines 32 to +35
example:
accountType: CNY_ACCOUNT
phoneNumber: '+1234567890'
bankName: Example Bank
accountNumber: '1234567890'
bankName: China Construction Bank
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The updated example only illustrates the BANK_TRANSFER rail — phoneNumber has been dropped entirely. The CopAccountInfoBase.yaml counterpart includes all optional fields in its example so consumers can see every supported field at a glance. Without a phoneNumber entry here, a developer targeting the MOBILE_MONEY rail has no inline reference for that field in the base schema.

Suggested change
example:
accountType: CNY_ACCOUNT
phoneNumber: '+1234567890'
bankName: Example Bank
accountNumber: '1234567890'
bankName: China Construction Bank
example:
accountType: CNY_ACCOUNT
accountNumber: '1234567890'
phoneNumber: '+1234567890'
bankName: China Construction Bank
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CnyAccountInfoBase.yaml
Line: 32-35

Comment:
The updated example only illustrates the `BANK_TRANSFER` rail — `phoneNumber` has been dropped entirely. The `CopAccountInfoBase.yaml` counterpart includes all optional fields in its example so consumers can see every supported field at a glance. Without a `phoneNumber` entry here, a developer targeting the `MOBILE_MONEY` rail has no inline reference for that field in the base schema.

```suggestion
example:
  accountType: CNY_ACCOUNT
  accountNumber: '1234567890'
  phoneNumber: '+1234567890'
  bankName: China Construction Bank
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant