How do I use Stripe payment in a chatbot?

I went to settings → integrations and then I clicked on connect to Stripe.

What do I do now ?

Connect your Stripe Account by going to the :

  • Settings > Integrations > Connect with Stripe

Capture d’écran 2022-07-05 à 15.11.26

Follow the process. When it is done, 5 bots variables (identical throughout all conversations) are created. We will need them later.

Capture d’écran 2022-07-05 à 15.38.14

Build your chatbot then create your Stripe bubble. When you need to collect payment in your conversation flow, you can insert a Stripe Bubble.

Capture d’écran 2022-07-05 à 15.43.11

You can now change the information necessary (amount requested, wording…).

If the connection worked well, you should have the variable “ideta_stripe_publishable_key” available in the form.
Capture d’écran 2022-07-05 à 15.43.25

Go to testing area and follow the process a client will do. Go until your Stripe bubble is displayed.
Capture d’écran 2022-07-05 à 15.48.19

Go to the data manager and create a conversation object variable (different for every user and therefore different credit cards) “ideta_stripeCustomer ” with these properties :slight_smile:
Capture d’écran 2022-07-05 à 15.49.01

This object will be filled in automatically once the credit card is validated.

Now click on “see more” and add a background action :slight_smile:
Capture d’écran 2022-07-05 à 15.49.38

Enter the following information :slight_smile:
Capture d’écran 2022-07-05 à 15.49.46

Now, you need to do three things :
Encode the “ideta_stripe_access_token” variable in base 64 :
Capture d’écran 2022-07-05 à 15.50.32

Then, you must create the payment intent :slight_smile:
Capture d’écran 2022-07-05 à 15.51.00

and catch it :slight_smile:
Capture d’écran 2022-07-05 à 15.51.32

That’s it ! You can now collect a credit card and collect a payment. They will both appear in your Stripe Dashboard.