You can connect your Stipe 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 you can 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 you could create a new Stripe account and connect to 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. To do so configure Smart routing for Stripe. Go to 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.
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 can be tested in two places:
1) By updating the card details of an existing subscription - Open an existing subscription in Chargebee and click on the Add Card link. Set the Gateway to Stripe on the next screen. You can use the test card numbers provided by Stripe by clicking on the test card number on the right side of the page.
2) By using the card details on the hosted payment page - On the Hosted Page URL, under the card details section, Stripe’s test card numbers would be available on the dropdown list to help simulate various test results. You can also simulate various other results by trying out the test card details here.