# How do I use Stripe payment in a chatbot?

**URL:** <https://forum.ideta.io/t/how-do-i-use-stripe-payment-in-a-chatbot/45>\
**Category:** I don't know where to post\
**Created:** [December 2, 2021, 9:46am UTC](https://forum.ideta.io/t/how-do-i-use-stripe-payment-in-a-chatbot/45 "2021-12-02T09:46:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@Glen](https://forum.ideta.io/u/Glen)\
**Post date:** [December 2, 2021, 9:46am UTC](https://forum.ideta.io/t/how-do-i-use-stripe-payment-in-a-chatbot/45/1 "2021-12-02T09:46:25Z")

</div>

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

What do I do now ?

---

<div class="post-metadata">

**Author:** ![alexandra](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@alexandra](https://forum.ideta.io/u/alexandra)\
**Post date:** [July 5, 2022, 2:14pm UTC](https://forum.ideta.io/t/how-do-i-use-stripe-payment-in-a-chatbot/45/2 "2022-07-05T14:14:06Z")

</div>

Connect your Stripe Account by going to the :

- Settings \> Integrations \> Connect with Stripe

![Capture d’écran 2022-07-05 à 15.11.26](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/980a8c3d26cf43c2e78b2208033d01857aa6f9c2.png)

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

![Capture d’écran 2022-07-05 à 15.38.14](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/98591ee86f79f410c4b7270d18852cfec2fb36ae.png)

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’écran 2022-07-05 à 15.43.11](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/4200e174f5459275e0369de2e666535c618d2d29.png)

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’écran 2022-07-05 à 15.43.25](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/d9d8d1bcd8094ec31db50924c1fe786978f41dda.png)

Go to testing area and follow the process a client will do. Go until your Stripe bubble is displayed.  
 ![Capture d’écran 2022-07-05 à 15.48.19](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/56ded3f96de4935c87cd58f6e4630a0a47c44a2a.png)

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 🙂  
 ![Capture d’écran 2022-07-05 à 15.49.01](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/bb7538f30c8381925056513229d3c7f327a50eaa.png)

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

Now click on “see more” and add a background action 🙂  
 ![Capture d’écran 2022-07-05 à 15.49.38](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/159f8e4d8a7b933960aa38dfa166fb765e0c422b.png)

Enter the following information 🙂  
 ![Capture d’écran 2022-07-05 à 15.49.46](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/ab5f10614c6876be09298b283e03dd1391074e45.png)

Now, you need to do three things :  
Encode the “_ideta\_stripe\_access\_token_” variable in base 64 :  
 ![Capture d’écran 2022-07-05 à 15.50.32](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/ee44c30e00dc16e645b7d341906212b44ac117a3.png)

Then, you must create the payment intent 🙂  
 ![Capture d’écran 2022-07-05 à 15.51.00](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/344fc8bb959aa75276f8e0b442d7ff6e351e59e8.png)

and catch it 🙂  
 ![Capture d’écran 2022-07-05 à 15.51.32](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/2ef98a9da6eb0107ddafee893d7389bb3a5793a5.png)

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