Skip to content

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

Merged
mohamedwane merged 2 commits into
mainfrom
mohamed/cny-bank-rail
Jun 11, 2026
Merged

Add CNY bank-transfer rail (B2B) alongside mobile wallet#554
mohamedwane merged 2 commits 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

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

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 Preview Jun 11, 2026 10:09pm

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

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ 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

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

✱ 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
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

grid-ruby studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-go studio · code

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

go get github.com/stainless-sdks/grid-go@5b4a2da7641f75c39f48c4fdfa8a8a76794df187
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-python studio · code

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

pip install https://pkg.stainless.com/s/grid-python/c7cc01a4caee8400416c659f96cb3f680b530754/grid-0.0.1-py3-none-any.whl
⚠️ grid-csharp studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
generate ⚠️build ❗lint ✅test ❗

grid-php studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅lint ✅test ✅

grid-typescript studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/d0e7b9a52cfbbe1d89bd75fafb2b7636d927092b/dist.tar.gz
⚠️ grid-cli studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
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-11 22:41:00 UTC

@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends the CNY account schema to support a BANK_TRANSFER rail alongside the existing MOBILE_MONEY rail, enabling B2B payouts to Chinese bank accounts. It mirrors the established dual-rail COP pattern: phoneNumber is moved from required to optional, a new optional accountNumber field is added, and per-rail validation is delegated to the application layer.

  • CnyAccountInfoBase.yaml: phoneNumber removed from required; new accountNumber field added (optional, minLength: 1 / maxLength: 34); description updated to document per-rail requirements; example updated to show both rails' fields.
  • CnyAccountInfo.yaml: BANK_TRANSFER added to the paymentRails enum.
  • openapi.yaml / mintlify/openapi.yaml: Bundled outputs updated to reflect the above changes.

Confidence Score: 5/5

Safe to merge — the changes are additive schema relaxations that mirror the well-established COP dual-rail pattern, with no removals of existing valid fields.

The change removes phoneNumber from required (a backward-compatible relaxation), adds an optional accountNumber, and extends the paymentRails enum — all closely following the COP template. The bundled YAML files match the source schemas exactly. No logic or runtime code is touched; per-rail enforcement remains at the application layer as with COP.

No files require special attention. The source YAML schemas and their two bundled counterparts are all consistent.

Important Files Changed

Filename Overview
openapi/components/schemas/common/CnyAccountInfoBase.yaml Removes phoneNumber from required fields, adds optional accountNumber for BANK_TRANSFER rail, updates description and example to cover both rails — mirrors CopAccountInfoBase pattern cleanly.
openapi/components/schemas/common/CnyAccountInfo.yaml Adds BANK_TRANSFER to the paymentRails enum, consistent with the CopAccountInfo pattern.
openapi.yaml Bundled output reflecting CnyAccountInfoBase and CnyAccountInfo changes; content mirrors the source YAML files exactly.
mintlify/openapi.yaml Mintlify-facing bundled output; identical changes to openapi.yaml, no separate concerns.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CNY Payout Request] --> B{paymentRails}
    B -->|MOBILE_MONEY| C[Required: bankName\nRequired: phoneNumber\nOptional: accountNumber]
    B -->|BANK_TRANSFER| D[Required: bankName\nRequired: accountNumber\nOptional: phoneNumber]
    C --> E{Schema validation}
    D --> E
    E -->|bankName present| F[Pass schema layer]
    F --> G[Application layer enforces\nper-rail required fields]
    G --> H[Payout processed]
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:15-19
The `accountNumber` property has no inline `example`, whereas `phoneNumber` includes `example: '+1234567890'`. The `CopAccountInfoBase.yaml` counterpart also omits it, so this isn't a breaking inconsistency, but adding one here would give tooling (e.g. Mintlify "Try it" panels, code generators) a concrete value to use for the BANK_TRANSFER rail without relying solely on the top-level `example` block.

```suggestion
  accountNumber:
    type: string
    description: The destination bank account number (BANK_TRANSFER rail)
    example: '1234567890'
    minLength: 1
    maxLength: 34
```

Reviews (3): Last reviewed commit: "Address review: include phoneNumber in C..." | Re-trigger Greptile

Comment thread openapi/components/schemas/common/CnyAccountInfoBase.yaml
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) <noreply@anthropic.com>
@mohamedwane

Copy link
Copy Markdown
Contributor Author

@greptileai please re-review

@mohamedwane mohamedwane merged commit 2442b86 into main Jun 11, 2026
9 checks passed
@mohamedwane mohamedwane deleted the mohamed/cny-bank-rail branch June 11, 2026 22:31
pengying pushed a commit that referenced this pull request Jun 12, 2026
## Summary
- Added `Mobile Money` to CNY `allRails` array (alongside `Bank
Transfer`)
- Added `accountNumber` field to `CNY_ACCOUNT` spec for BANK_TRANSFER
rail
- Added field descriptions clarifying which fields are for which rail

These changes sync the Grid Visualizer data with the OpenAPI schema
updates from #554 (commit 2442b86), which added CNY bank-transfer rail
(B2B) alongside mobile wallet.

## Test plan
- [ ] Verify Grid Visualizer generates correct CNY account info for both
rails
- [ ] Verify code samples include `accountNumber` when BANK_TRANSFER
rail is selected

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants