You can connect your Stripe test account with your Chargebee test account, to simulate your workflow in a testing environment. This will allow you to test different subscription workflows such as payment success, failure and also the Dunning process.
In your Chargebee test site, go to Settings > Configure Chargebee > Payment Gateways and select Stripe. You will be redirected to Stripe’s sign-in page and prompted to link your existing Stripe account or create a new Stripe account to connect with Chargebee.
You will be required to input your Stripe account credentials. Ensure you are connecting your Stripe account while it's on Test Mode.
To make sure your Stripe account is set as the default gateway on Chargebee, go to configure Smart routing for Stripe.
To do this click Settings > Configure Chargebee > Payment Gateways > Manage Rules. Here you can assign a specific currency/payment method to a specific gateway when you assign a currency to a gateway as displayed below.
Essentially you are linking each payment type (Card, Direct Debit) to a gateway that is supported & testing has to be done for Stripe in a subscription where the plan's currency is assigned to Stripe.
The Stripe payment gateway's configuration can be tested under two places:
Updating card details of an existing subscription
- Open an existing subscription in Chargebee
- Click on the Add Card link
- Set the Gateway to Stripe(1) on the Add card page
- Click the test card link(2) provided for Stripe gateway
- Copy any test card number provided by Stripe(3) and paste(4) it in the add card page.
- Click Add Credit Card(5)
Use the card details on the checkout page
On the checkout page under the card details section, Stripe’s test card numbers would auto-populate on the dropdown list to help simulate various test results.