The Payment Sources API , with its additional options and improvements, obsoletes the Cards APIs. Learn more .
The following table lists the Payment Sources API operations alongside the equivalent Card API operations:
{
"card_type": "american_express",
"created_at": 1517486946,
"customer_id": "__test__XpbTXGTSRp3ELNCY",
"expiry_month": 12,
"expiry_year": 2022,
"funding_type": "not_known",
"gateway": "chargebee",
"gateway_account_id": "gw___test__5SK2lMgOSRp3BOO1y",
"iin": "378282",
"last4": "0005",
"masked_number": "***********0005",
"object": "card",
"payment_source_id": "pm___test__XpbTXGTSRp3ENNCc",
"resource_version": 1517486946205,
"status": "valid",
"updated_at": 1517486946
}The ISO 3166-2 state/province code
without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
).
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code .
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.
This operation is obsoleted by the Retrieve a payment source API .
Retrieves the credit card for the customer id.
The Payment Sources API , with its additional options and improvements, obsoletes the Cards APIs . This operation is obsoleted by the following:
Adds or replaces card details of a customer. Updating card details replaces the present payment method.
Passing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable
Legacy behavior:
billing_address and vat_number of the customer are deleted and replaced by the values passed with this request. Ensure that you pass the billing address parameters and the vat_number parameters each time you make this request, to avoid losing the same information at the customer-level.billing_address and vat_number of the customer.The single-use card token returned by vaults like Stripe/Braintree which act as a substitute for your card details. Before calling this API, you should have submitted your card details to the gateway and gotten this token in return. Note: Supported only for Stripe, Braintree and Authorize.Net. If this value is specified, there is no need to specify other card details (like number, cvv, etc).
The credit card number without any format. If you are using Braintree.js , you can specify the Braintree encrypted card number here.
The card verification value (CVV). If you are using Braintree.js , you can specify the Braintree encrypted CVV here.
The ISO 3166-2 state/province code
without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
).
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code .
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom - Northern Ireland) is available as an option.
.
This request is obsoleted by the Switch gateway account API for Payment Sources.
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.
The Payment Sources API , with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the Export payment source API .
Copies the customer's card information to another payment gateway. This is useful if you want to port your customer's card details to another gateway.
Limitation
This request does not support copying of cards between Braintree and Stripe payment gateways. Contact Chargebee Support to perform those actions.
The Payment Sources API , with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the Delete a payment source API .
Deletes the card for a customer. Upon successful deletion the auto_collection attribute for the customer is set to off and a card_deleted event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.