Docs

Cards 

We want to assure that we are well informed about the recent regulatory update concerning EU regulations for co-branded cards, specifically impacting transactions processed with Cartes Bancaires (CB) in France.

With a deadline set for the end of September, Chargebee is fully committed to implementing the required changes well ahead of time.

  • For users of Chargebee's checkout, components, and fields, rest assured that the necessary adjustments will be seamlessly handled by Chargebee.
  • However, for those who utilize their own or gateway checkout systems, it will be imperative to ensure independent compliance.

Chargebee is here to facilitate a smooth transition for you during this period of regulatory change.

Chargebee supports card payments and other payment methods such as PayPal Express Checkout and Amazon Payments. The first step to process card payments using Chargebee is to get a payment gateway and a merchant account ready. Chargebee is a subscription billing management service that eases the complexities involved in managing recurring payments.

What is a Payment Gateway? 

A payment gateway is a service that lets you process online card payments made by your customers. It is the online equivalent of a swipe machine which is present in a brick and mortar store. A payment gateway routes the details of a transaction to the merchant bank's processor which in turn is routed to the card processing network and finally to the card issuing bank. The results of the transaction are delivered back to the payment gateway which are then delivered to the merchant's website.

What is a Merchant Account? 

A merchant account is a type of bank account that allows merchants to accept card payments. When a payment is made, funds are transferred to the merchant account, before they are actually transferred to your business bank account. The bank which provides a merchant account is usually called an acquiring bank.

Unlike regular holding accounts (checking/saving), merchant accounts are a line of credit. After due risk assessment, acquiring banks extend this line of credit. Let us say the merchant becomes insolvent. In this scenario, the acquiring bank must pay the customer if they request a chargeback. Due to this credit liability, merchant accounts are said to be a line of credit, and hence, a stringent process is followed in issuing a merchant account.

To get a merchant account, you will have to undergo an underwriting process which includes a credit check, supplying data related to your finances etc. Learn more about merchant accounts here 

Note

Certain payment gateways like Stripe, Braintree, etc. also provide you with a bundled merchant account.

Chargebee's Role in Processing Card Payments 

Chargebee places itself between your website and the payment gateway you use. The process related to the payment flow works as follows:

  1. Customers subscribe for a service through your website by entering their card details in the payment page (The payment page can either be hosted at your website or at Chargebee).
  2. Chargebee forwards the card details to the payment gateway for processing.
  3. The gateway passes the secure information to the processor of the merchant bank which in turn passes it on to the credit card network (MasterCard, Visa, etc.).
  4. The credit card network then routes the transaction to the card issuing bank.
  5. The issuing bank authorizes the transaction based on certain factors like sufficient funds, expiry date of the card etc. and then conveys the result of the transaction to the card network which in turn relays the results to the merchant bank processor and finally to the gateway.
  6. The gateway then delivers these results to Chargebee. In case of a success, Chargebee displays a success message and records the transaction details. In case of a failure, Chargebee displays a corresponding error message.
  7. If the transaction is successful, the funds are settled to the merchant account and after a few days transferred to the business bank account of the merchant.

Chargebee stores your customers' card details in the payment gateway's card vault or in Spreedly's (Chargebee's gateway partner) card vault depending on your choice of payment gateway. When the card details are stored in a vault, a token corresponding to the card is generated. Chargebee makes use of those card tokens to charge customers for all future payments.

Note

As a merchant, you will not have direct access to the complete card details of your customer, but you do have access to the last 4 digits of the card number along with the expiry dates and card type. This information will be helpful for you to handle customer support related to payments.

Configuring a Payment Gateway 

Once you have a payment gateway and a merchant account in place, the next step would be configuring the payment gateway with Chargebee. Details about configuring a card payment gateway in Chargebee are discussed here.

Card Verification 

Card verification is the process of validating a card to ensure that the card number provided is tied to a valid bank account, can be charged, and can be vaulted(stored).

Card Verification has to be enabled at the gateway's end for the following gateways:

  • Stripe
  • Braintree
  • Pin Payments
  • Mollie
  • Adyen
  • BlueSnap
  • Quickbooks Payments
  • eWAY Rapid

Chargebee provides the option of card verification for the following gateways:

  • Authorize.net
  • WorldPay
  • Razorpay
  • Bank of America
  • Checkout.com
  • Global Payments
  • PayPal Payments Pro
  • Exact (Direct Integration)
  • PayPal Payflow Pro
  • Orbital (Chase Paymentech)
  • Moneris
  • Worldpay
  • Elavon
  • Network Merchants Incorporated (NMI)
  • Worldline Online Payments (formerly Ingenico)
  • CyberSource
  • BluePay
  • Sage Pay
  • Paymill
  • Bambora

Chargebee carries out card verification by performing a one-unit charge (1 USD, 1 GBP, 1 AUD, 1 EUR, and more) which is voided as soon as the authorization is complete.
If there is an immediate payment involved, Chargebee does not perform card verification.

To enable card verification for the above-mentioned gateways, in the web interface, go to Settings > Configure Chargebee > Payment Gateways, select your gateway and enable the card verification option.

Note

It is a good idea to indicate to customers signing up or updating their cards that there might be a "test authorization" charge on their cards. This helps avoid confusion and a support call to you when customers see these charges on their bank statements or when they get notified by their banks.

Card Address Verification 

For processing card payments online, Address Verification System (AVS) is an important check that is done by the payment gateway. This service cross verifies the credit card's billing address entered by the customer with the address stored in the credit card company. It is a security check that helps in combating fraudulent transactions which, if unnoticed, could result in chargebacks.

If you have enabled AVS check at your gateway's end, ensure that the same fields are enabled in Chargebee under Card Address Verification.

Enabling the Card Address Verification fields (in Chargebee) is just an additional check which ensures that all the details required by your gateway's AVS settings are present.
Even if you have not enabled the required fields here, Chargebee still passes this information to the gateway.

In order to avoid validation errors returned by the gateway due to the absence of required data (such as AVS fields), it is recommended that you enable these settings.

If you use Chargebee's API or create subscriptions via the web interface, ensure that the required Card Address Verification fields are marked in Settings > Configure Chargebee > Billing LogIQ under the Card Address Verification section.

If you use Chargebee's hosted pages, configure the required card fields in Settings > Configure Chargebee > Checkout & Portal > Fields > Payments.

  • Enable the desired fields and click the Edit button.
  • Select the relevant option from the In checkout and portal fields and click Apply*
Note

Ensure that the address verification requirements you configure here match the AVS (address verification system) requirements that you have configured in your payment gateway.

Adding/Updating Card Details 

Adding or updating card details of an existing customer can be done:

Note

Whenever card details are added/updated and the last recurring invoice for the customer is in payment due or not paid status, an attempt to collect it is made automatically. However, this does not happen if the associated subscription status is cancelled.

Via the Web Interface 

Using the 'Request Payment Method' option

Request Payment Method gives customers an option to update the details of an existing payment method and also switch between the various payment methods you offer.

In this method, an email containing a secure link is sent to your customers. When customers click on this link, they are redirected to a secure page where they can update their payment method details.

To request payment method details from your customers, open a subscription in the Chargebee user interface, and click Request Payment Method on the Action panel.

Clicking on it will take you to an email editor window with the Update Payment Method button in place. You can now collect the payment method details by sending out this email to the customer.

Note

Once the Update Payment Method link is sent, it is only valid for 5 days. If you wish to extend this validity for your customers, please contact support@chargebee.com .

Through the "Payment Method Details" section

As a merchant if you have the card details of a customer, you can directly add them using the Add Card/Add Payment Method option available under the Payment Method section of a subscription/customer.

To update an existing card, use the Edit option that can be found under the Payment Method section in the customer details page.

Via the API 

Refer to the following scenarios for more information:

  • Scenario 1: If you have custom payment pages hosted at your end, card information can be passed to Chargebee while performing a few API operations. Learn more 
  • Scenario 2: If you use Stripe.js to host your payment pages. Learn more 

Via the Customer Portal 

Customers can update their card details by logging in to their customer portal. Customers can make use of this option only if you have enabled the customer portal for them.

Partial Card Update 

When specific information pertaining to the card, such as the customer's name, billing address and date of expiry has to be updated in the payment gateway, the Partial Card Update feature comes into place. Thus the customer details in Chargebee and the payment gateway stay in sync.

Using the API
Refer to the following API operation to partially update the card details.

Refer to the solution article  to learn more about how to pass information to the relevant fields through the API for Stripe/Braintree payment gateways vs other payment gateways.

Removing Card Details 

Whenever a subscription is canceled, some customers might request to have their card details removed. Removing the card details can be done through the web interface or using the Delete Card for a Customer API .

To remove card details, open the particular customer's details page and use the Delete option under the Payment Method section.

When the card details are removed, Auto Collection will be automatically turned Off regardless of the status of the subscription. This makes the subscription an offline subscription. So, if a subscription is in Active state, and you remove the card details, the subscription will remain Active and renew according to the plan. Invoices will be generated and will be in Payment Due state. You will have to manually record the payments for the invoice.

Configuring the Retain Card Option 

When you have multiple payment gateways configured in your site, you can choose to store the updated card details of an existing customer in the secondary payment gateway instead of the default payment gateway by enabling the Card storage option.

Say you have Stripe and Braintree payment gateways configured in your site, let Stripe be the primary gateway, all the transactions will be processed via Stripe by default. Let's say you choose Braintree to be your primary gateway instead. Now, when a customer whose card details are present in Stripe updates their payment method, it will naturally be stored in Braintree which is the default gateway, but you can choose to retain it in Stripe by enabling this option.

Navigate to Settings > Configure Chargebee > Payment Gateways, select the payment gateway you have configured, and enable the Card Storage option as shown below,

Accept/Deny prepaid cards 

Chargebee accepts prepaid cards by default. If you would like to disallow prepaid cards, enable the Don't allow prepaid cards option in the Cards section of your gateway's configuration page.

Note

This option is available only for Stripe, Braintree, BlueSnap, Checkout.com, CyberSource, Global Payments, Worldline Online Payments, and Mollie at the moment.

Email Notifications 

Email notifications can be used to notify customers about payment related events such as card expiry, payment failure, etc.

For customers whose cards are about to expire or have already expired, you can configure Chargebee's email settings to send out reminders to those customers, letting them know about their card statuses.

Test Prepaid Card Numbers 

The prepaid card numbers provided here can be used for testing payment transactions on Stripe and Braintree. If the Don't allow prepaid cards option is enabled on your respective gateway configuration page, the following errors will be returned:

Card Number

Gateway

Response Description

5105105105105100

Stripe

Error: Prepaid cards are not supported

4500600000000061

Braintree

Error: Prepaid cards are not supported

5105105105105100

Chargebee's Test Payment Gateway

Error: Prepaid cards are not supported

Test Credit Card Numbers 

The card numbers provided here can be used for testing payment transactions on Chargebee's test site. Use any 3 or 4 digit numbers for CVV and a valid date in the future for the expiry date.

A set of valid and invalid cards for the test gateways are given below.

1. Chargebee Test Gateway

These card numbers can be used if you have Chargebee's test gateway configured.

Valid Cards:

Using the following cards will result in successful transactions.

Card Number

Card Type

Response Description

4111 1111 1111 1111

Visa

Successful Transaction

5555 5555 5555 4444

MasterCard

Successful Transaction

3782 822463 10005

AMEX

Successful Transaction

6011 1111 1111 1117

Discover

Successful Transaction

3530 1113 3330 0000

JCB

Successful Transaction

3852 0000 0232 37 3600 6666 3333 44 3607 0500 0010 20

Diners

Successful Transaction

4119 8627 6033 8320

Visa

Card Storage will fail with a gateway verification failure

4005 5192 0000 0004

Visa

Charge attempts will fail with an "Insufficient funds" error.

In case you're looking for 3DS test cards to be used in Chargebee Test Gateway, you can find them here.

2. Stripe Payment Gateway (Test Mode)
These card numbers can be used if you have a Stripe test account configured in Chargebee's test site.

3. Braintree Payment Gateway (Sandbox Mode)
These card numbers can be used if you have a Braintree sandbox account configured in Chargebee's test site.

FAQ 

  1. What is a card token?
    A card token is the reference to a customer's card details, provided by the payment gateway after storing the cards in the vault. These card tokens are used to charge customers for all future payments. Learn more 

  2. What is a Reference ID?
    Reference ID accepts Permanent Tokens, which is a combination of customer ID and card token available at the gateway. Learn more 

Articles & FAQs 

Error: card declined by issuer. What’s going on?
Error: 2046/2038 Declined/Processor Declined. What’s going on?
Error: 2000 Do Not Honor. What’s going on?
Error: 91517/91577 Payment instrument is not accepted by this merchant account/merchant account does not support payment instrument. What’s going on?
Error: 2057 Issuer/Cardholder has put a restriction on the card. What’s going on?
Error: 2047/2053 Call Issuer. Pick up card/Card reported lost or stolen. What’s going on?
Error: 2005 Invalid credit card number. What’s going on?
Where is the credit card stored for recurring transactions? Is it safe?
Does Chargebee automatically update an expired card?
My customers are not able to sign up using their American Express, Discover, JCB or Diners Club cards even though these card types are enabled in Chargebee. How can I fix this?
I want to edit specific card details for a customer such as the date of expiry. Is this possible?
How to charge a card before the next retry after a failed payment?
How to copy/move just the card details from one customer record to another?
Fix for error- when Credit cards are being added in the "Add payment method" link/ MISSING_CARD_HOLDER_INFO: Either the first name or last name should be present.
Card Verification: Enabled Configuration
Can my customers update their payment method information through the Chargebee customer portal?
How is card address verification performed through Chargebee?
What is Chargebee's role in a 3DS transaction?
Error: 15006/7 - Processor Decline. What’s going on?
3DS Authorization flow in Chargebee
Was this article helpful?
Loading…