Testing with Stripe sandbox

Modified on: Tue, 13 Dec, 2022 at 8:06 PM

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.

Step 1


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.


Step 2

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.

Configuration

The Stripe payment gateway's configuration can be tested under two places:

Updating card details of an existing subscription

  1. Open an existing subscription in Chargebee
  2. Click on the Add Card link
  3. Set the Gateway to Stripe(1) on the Add card page
  4. Click the test card link(2) provided for Stripe gateway
  5. Copy any test card number provided by Stripe(3) and paste(4) it in the add card page.
  6. Click Add Credit Card(5)





Testing


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.






Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×