ChargebeeAPI

Payment sources

Updates

This API obsoletes the Cards API in Chargebee.

Represents the payment source for the customer. Specific types of payment source (Card, Direct Debit, Paypal Express Checkout, etc.) is defined as sub-resource in the response object. You can find the list of supported payment sources and the expected input parameters here. See Payment source attributes for a descriptive list of attributes and payment source types.

Sample Payment sourceJSON

Payment sources attributes

id
required, string, max chars=40

Identifier of the payment source

resource_version
optional, long

Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

updated_at
optional, timestamp(UTC) in seconds

Timestamp indicating when this payment source resource was last updated.

created_at
required, timestamp(UTC) in seconds

Timestamp indicating when this payment source resource is created.

customer_id
required, string, max chars=50

Identifier of the customer with whom this payment source is associated.

type
required, enumerated string

Type of payment source

Possible Enum Values
card

Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.

paypal_express_checkout

Payments made via PayPal Express Checkout.

amazon_payments

Payments made via Amazon Payments.

direct_debit

Represents bank account for which the direct debit or ACH agreement/mandate is created.

generic

Payments made via Generic Payment Method.

reference_id
required, string, max chars=200

The reference id. In the case of Amazon and PayPal this will be the 'billing agreement id'. For GoCardless direct debit this will be 'mandate id'. In the case of card payments this will be the identifier provided by the gateway/card vault for the specific payment method resource. Note: This is not the one time temporary token provided by gateways like Stripe.

status
required, enumerated string, default=valid

Current status of the payment source.

Possible Enum Values
valid

A payment source that is valid and active.

expiring

A payment source that is expiring (like card's status based on its expiry date).

expired

A payment source that has expired

invalid

The billing agreement cannot be used. It might become valid again either automatically or due to customer action.

pending_verification

The payment source needs to be verified

gateway
required, enumerated string

Name of the gateway this payment source is stored with.

Possible Enum Values
chargebee

Chargebee test gateway.

chargebee_payments

Chargebee Payments gateway

adyen

Adyen is a payment gateway.

stripe

Stripe is a payment gateway.

wepay

WePay is a payment gateway.

gateway_account_id
optional, string, max chars=50

The gateway account to which this payment source is stored with.

ip_address
optional, string, max chars=50

The IP address of the customer. Used primarily for referral integration and EU VAT validation.

issuing_country
optional, string, max chars=50

two-letter(alpha2) ISO country code.

deleted
required, boolean

Indicates that this resource has been deleted.

business_entity_id
optional, string, max chars=50

The unique ID of the business entity of this payment_source. This is always the same as the business entity of the customer.

card
optional, card

Card details associated with this payment source.

bank_account
optional, bank_account

Bank account details the direct debit or ACH or NetBanking agreement/mandate created with this payment source.

boleto
optional, cust_voucher_source

Boleto payment source details of the customer

billing_address
optional, billing_address

Billing address for the payment source.

amazon_payment
optional, amazon_payment

Amazon payments details associated with this payment source.

upi
optional, upi

Represents the payment method that allows you to make payments directly using a bank account.

paypal
optional, paypal

PayPal Express Checkout details associated with this payment source.

venmo
optional, venmo

Venmo details associated with this payment source.

klarna_pay_now
optional, klarna_pay_now

Klarna Pay Now payment source details of the customer

mandates
optional, list of mandate

Mandate details associated with the payment source.