Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now
ChargebeeAPI

Switch gateway account

Idempotency Supported

Moves a card payment source from one gateway account to another.

Use this operation to migrate payment methods between gateway accounts, such as when:

  • consolidating gateway accounts
  • switching from Spreedly to direct gateway integration
  • aligning payment sources with regional/business unit gateway configurations

Supported gateways

See the Use Cases section for the list of supported source-destination gateway combinations.

Prerequisites & Constraints

Impacts

Payment source

Use Cases

Supported source-destination gateway combinations

The API supports only the following source-destination gateway combinations:

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/payment_sources/{cust-payment-source-id}/switch_gateway_account

Input Parameters

gateway_account_id
required, string, max chars=50

The gateway account you want to switch to.

Returns

Customer object
Resource object representing customer
Payment source object
Resource object representing payment_source