Hi @natserrano,
Using Stripe’s Checkout is simple using the API connector, and far more flexible than using any plugin.
As you say, you first have to create a checkout session, and then redirect the user to the checkout.
- Creating A Stripe Chekout Session
First, make sure you’ve got your Authentication setup correctly for the Stripe API:
Then you need to make the API call to create the session.
Make a post request to https://api.stripe.com/v1/checkout/sessions
Make sure you set it as an ‘action’ with the body type ‘json’, and add the required parameters (they need to be set as querystrings). See below:
See the Stripe Checkout ‘Create a Session’ API doc for full details of all the parameters (note some of them are required, some are optional).
https://stripe.com/docs/api/checkout/sessions/create
The only other thing to know about here is the format that parameters need to be entered into the API connector for them to work…
For basic parameters (e.g. ‘success_url’) just enter them as they appear in the Strip API doc ‘success_url’.
For nested parameters (e.g. ‘line_items.price_data.unit_amount’) they need to be written with all subsequent parameters, after the first one, inside square brackets, including an empty set of square brackets to indicate an array.
So, for example, the parameter: line_items.price_data.unit_amount
should be written in the API connector as: line_items[price_data][unit_amount]
When the call is run it will return a ‘Checkout Session ID’ which you’ll need to use in the second step.
- Redirect to Checkout
You’ll need to run some java script for this, so make sure you’ve got a plugin installed that allows you to do that (i.e. toolbox).
Just run the following script:
var stripe = Stripe('pk_test_***');
stripe.redirectToCheckout({
sessionId: 'Result of Step 1 - Checkout Session ID'})
.then(function (result) {
});
Where ‘pk_test_***’ is your publishable Stripe API key
And ‘Result of Step 1 - Checkout Session ID’ is the Session ID returned from the ‘create session API call’ in step 1.
*Note: you’ll need to set up separate redirects for Live and Dev versions of your app, using the appropriate API keys and some conditions (i.e. only when ‘isn’t live version is yes’, only when ‘isn’t live version is no’).
The whole process should run as follows:
When a user clicks on your ‘pay now’ button (or whatever triggers the checkout process) just run a workflow with 3 steps:
- Creat the checkout session
- Run the Redirect Java Script (Dev version only)
- Run the Redirect Java Script (Live version only)
See below for how mine is set up:
Hope that helps


