Stripe Payment Integration

Stripe is an online payment processing for Internet businesses. Now you are able to build your BotStar chatbots to accept payments and send payouts globally. The main benefit here is that your customers can stay on your site and interact with the bot view when making payments, instead of being redirected to another site.

This document will show you how to integrate your bots with the Stripe Payment without using any third-party app. Kindly notice the Stripe feature will charge your Credit card on both environments: the Test (Preview) and the Live one.

Connect BotStar to your Stripe Payment account

Step 1. Prepare a Stripe account

To use this feature, you must have a valid Stripe Payment account of your own first. Besides, you may need to know that the currency is always US dollars.

Step 2. Connect your Stripe account

Go to the Bot Builder > Integrations and scroll down a bit to find the Stripe Integration section > toggle the feature on and click on the button Connect Account. You will see a pop-up window where you have to fill in your personal (or company) information.

Step 3. Select the Stripe Payment action

Jump to the visual builder after you've completed the integration step, now you can drag and drop the Stripe Payment action in the Premium Add-ons session. You need to notice that there must be a button-block, such as Button List or Horizontal List, before the Stripe block.

How to set up Stripe Payment feature

Step 1. Stripe Payment in the flow

Drag and drop the Stripe Payment block in the bot flow.

Step 2. Add values to params

In the Stripe Parameters panel where you have to set params:

  • currency: The currency that you customer will pay. Please see our supported currencies for more details.
  • amount: The amount of money you want your customer to pay.
  • customer_name: This value will be appeared in your Stripe account to let you know who made the payment.
  • payment_form_title: Your payment description.
  • logo: Your branding's image/logo.
  • payment_button_title: The title of the pay button.

On the other hand, in Save webview Data, you have two options that are Webview Error Code and Webview Error Message: save webview.errorCode (or webview.errorMessage) into the error variable. If the paying process doesn’t go through, the bot will show a message to notify your users.

As a bot builder, if you choose the Webview Error Code, the bot will display you the exact mistake during the payment process. Thanks to that, you could set up conditions to help users go back to make another payment.

Note: You may find detailed information about error codes from Stripe here

Note: All the parameters need to fill-in for the Stripe payment to work.

Step 3. Payment has gone through

Payment Success or Fail: There are always two situations: charged successfully or not. So, set up two blocks in which one connects to the button Success and the other connects to the button Fail.

Note: Basing on the {error}, bot builders could use connector's conditions to give customers an instruction. So, chat users could adjust the card's info to complete the purchase.

Outcome

Once you are done with the setting, click on Preview > the webview of Stripe will pop-up on the screen. After users leave their cards’ information and click on the button to pay, the payment is automatically done no matter on Preview or on the Live environment.

In case there is any misinformation, for example, one of the fields is empty, or the price is equal to $0 or the card doesn’t have enough money, the webview will show on and off immediately. In addition, the message Fail {error} will appear to chat users.

As a bot builder, you may check all payments in the dashboard of your Stripe account.

Supported currencies

Stripe has supported 135+ difference currencies all around the world. At BotStar, you are able to choose one of those applying on your chatbots to make the purchasing process easier.

If you are wondering about the exchange fee between two different currencies, please check the information on this document here

USDCNYILSMWKSHP
AEDCOPINRMXNSLL
AFNCRCISKMYRSOS
ALLCVEJMDMZNSRD
AMDCZKJPYNADSTD
ANGDJFKESNGNSZL
AOADKKKGSNIOTHB
ARSDOPKHRNOKTJS
AUDDZDKMFNPRTOP
AWGEGPKRWNZDTRY
AZNETBKYDPABTTD
BAMEURKZTPENTWD
BBDFJDLAKPGKTZS
BDTFKPLBPPHPUAH
BGNGBPLKRPKRUGX
BIFGELLRDPLNUYU
BMDGIPLSLPYGUZS
BNDGMDMADQARVND
BOBGNFMDLRONVUV
BRLGTQMGARSDWST
BSDGYDMKDRUBXAF
BWPHKDMMKRWFXCD
BZDHNLMNTSARXOF
CADHRKMOPSBDXPF
CDFHTGMROSCRYER
CHFHUFMURSEKZAR
CLPIDRMVRSGDZMW

Congrats, you are done with setting Stripe Payment. Now, your customers could pay easily when shopping on your sites or pages. Let's test and see how it works!


Did you find it helpful?   Yes   No