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

Idempotency Supported

Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is card.

Limitation

This request does not support switching between Braintree and Stripe payment gateways. Contact Chargebee Support to perform those actions.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/customers/{customer-id}/switch_gateway

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
Card object
Resource object representing card