Once you have a payment gateway and a merchant account in place, the next step would be configuring your payment gateway in Chargebee.
Click any of the gateways listed below to learn how to set them up.
For gateways other than those mentioned above, follow the setup process given below.
To configure a payment gateway, login to your web interface, go to Settings › Site Info › Gateway Settings. Click Configure a Payment Gateway.
Select the required payment gateway from the list of gateways.
On Chargebee's test site, you can configure Chargebee's test payment gateway. Using this gateway you can test all scenarios before integrating your live site with a real payment gateway. Please note that this gateway is a simulated gateway and transactions done are dummy transactions.
Apart from Chargebee's test gateway, you can also test all payment related scenarios by connecting your Stripe or Braintree sandbox account. To connect to these gateways on the test site, you will have to use your corresponding sandbox credentials.
If you are on Chargebee's live site, you have more payment gateway options. While configuring these gateways, you will have to use the corresponding gateway's live credentials (not the test credentials).
When you decide on using a particular gateway, in the gateway configuration page you will have to fill out the required gateway credentials. Enable the card verification option if it is available for the required gateway. In case you use multiple gateways, enable the card storage option if you would want the card details to be retained in the same gateway.If you make use of the hosted pages, apart from the above configurations, you will also have to select the card types to be displayed on the hosted pages for your customers.
After configuring a gateway in either the test site or live site, it is advisable to perform test transactions in order to ensure proper functioning of the payment flow. Testing ensures that the workflow beginning from the customer making payments to the collection of payments, functions as expected. On Chargebee's test site, test card numbers are the only designated numbers that can be used to perform test transactions. Details about test cards that can be used in Chargebee's test site are discussed here.
On Chargebee's live site, once you configure a live gateway, it is advisable to perform transactions using real cards. You can refund these transactions after testing the workflow.
Chargebee supports multiple payment gateways on both your test and live site.
To use multiple payment gateways, go to Settings › Site Info › Gateway Settings and configure the required gateways.
If you have configured multiple card gateways, you can specify one gateway as your default gateway. While adding a card, if a gateway is not explicitly specified through the API or the web interface, the card is associated with the default gateway. All the transactions for a card will be handled through the associated gateway.
While updating a card, you also have an option to retain the card in the same gateway it was stored earlier. If you have enabled this option, when customers update their card details, the card is retained in the same gateway.
The gateway with which a card is associated after update follows the logic as described below:
If you specify the gateway, the card details are stored in the specified gateway.
If you haven't specified the gateway and additionally,
If you have enabled the "retain card" option, the updated card details are stored in the same gateway as earlier.
If you haven't enabled the "retain card" option, the updated card details are stored in the default gateway.
There are multiple ways to add/update a card in Chargebee. The gateway can be explicitly specified in each way as discussed below:
a. Via the API :
The gateway to associate a card can be specified by using the "card[gateway]" parameter in the following APIs:
Additionally, while updating a card for a customer using the Update Card for a Customer API , you can pass the gateway using the "gateway" parameter.
b. Via the web interface :
While adding or updating a card through the web interface, the gateway can be specified as shown.
To enable this option, go to Settings › Site Info › Gateway Settings, select the payment gateway you have configured, and enable the Card Storage option.
While updating a customer's card details via the API or the web interface, you have the flexibility to specify the gateway you would want to store the card in. However when customers update their cards via the customer portal, a gateway cannot be specified. In such cases, enabling the "retain card" option would ensure that the card is retained in the same gateway even after update.
Chargebee accepts prepaid cards by default. If you would like to disallow prepaid cards, enable the Don't allow prepaid cards option in the Supported cards section of your gateway's configuration page.