ChargebeeAPI

Cards

This resource helps you to retrieve, update, and delete card details for a customer.

Sample CardJSON

API Index URL

https://[site].chargebee.com/api/v1/cards

Cards attributes

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.

stripe

Stripe is a payment gateway.

braintree

Braintree is a payment gateway.

authorize_net

Authorize.net is a payment gateway

paypal_pro

PayPal Pro Account is a payment gateway.

reference_id
optional, string, max chars=200

The identifier provided by the gateway/card vault for the specific payment method resource.

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.

diners_club

A Diner's Club card.

bancontact

A Bancontact card.

other

Card belonging to types other than those listed above.

not_applicable

Used for offline entries in transactions. Not applicable for cards

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

Card expiry month.

expiry_year
required, integer

Card expiry year.

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.

ip_address
optional, string, max chars=50

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

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.