ChargebeeAPI

Cards

Deprecated

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:

Sample CardJSON

Cards attributes

payment_source_id
required, string, max chars=40

Identifier of the payment source

status
required, enumerated string

Current status of the card.

Possible Enum Values
valid

A valid and active credit card

expiring

A card which is expiring in the current month.

expired

An expired card

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.

ref_tx_id
optional, string, max chars=50

Reference transaction id which used for transactions

first_name
optional, string, max chars=50

Cardholder's first name

last_name
optional, string, max chars=50

Cardholder's last name

iin
required, string, min chars=6, max chars=6

The Issuer Identification Number, i.e. the first six digits of the card number

last4
required, string, min chars=4, max chars=4

Last four digits of the card number

card_type
optional, enumerated string

Card type

Possible Enum Values
visa

A Visa card.

mastercard

A MasterCard.

american_express

An American Express card.

discover

A Discover card.

jcb

A JCB card.

funding_type
required, enumerated string

Card Funding type

Possible Enum Values
credit

A credit card.

debit

A debit card.

prepaid

A prepaid card.

not_known

An unknown card.

not_applicable

Used for ACH. Not applicable for cards

expiry_month
required, integer, min=1, max=12

Card expiry month.

expiry_year
required, integer

Card expiry year.

issuing_country
optional, string, max chars=50

two-letter(alpha2) ISO country code.

billing_addr1
optional, string, max chars=150

Address line 1, as available in card billing address.

billing_addr2
optional, string, max chars=150

Address line 2, as available in card billing address.

billing_city
optional, string, max chars=50

City, as available in card billing address.

billing_state_code
optional, string, max chars=50

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 ).

billing_state
optional, string, max chars=50

The state/province name.

billing_country
optional, string, max chars=50

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.

billing_zip
optional, string, max chars=20

Postal or Zip code, as available in card billing address.

created_at
required, timestamp(UTC) in seconds

Timestamp indicating when this card resource is created.

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 credit card resource was last updated.

ip_address
optional, string, max chars=50

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

powered_by
optional, enumerated string

Card is powered by payment method.

Possible Enum Values
ideal

ideal

sofort

sofort

bancontact

bancontact

giropay

giropay

card

card

latam_local_card

latam_local_card

payconiq

payconiq

not_applicable

not_applicable

customer_id
required, string, max chars=50

Identifier of the customer.

masked_number
optional, string, max chars=19

Masked credit card number that is safe to show.