Your Chatbot Can Handle Payments For You  Here’s How in Three Easy Steps

Your Chatbot Can Handle Payments For You Here’s How in Three Easy Steps

SnatchBot Team Équipe SnatchBot, 16/01/2018

If you need to handle financial transactions for any reason, then you should let your chatbot do the administrative work. Not only because this saves you or your staff time, but because you’re making it much easier for the user. Instead of having to navigate a website or phone you, the user can make payments while staying in the channel of their choice.

From the SnatchBot end, we have made the creation of a chatbot that can handle payments very easy. As ever, no coding is needed, it’s just a matter making a few clicks. There is a bit of preliminary work to do at the PayPal end, but this is all straightforward. In other words, don’t be concerned if you don’t have a coding background, you really can add this important feature yourself.

Your Chatbot Can Handle Your Payments: Three Easy Steps

Our bots integrate with PayPal, so you have our own enterprise-grade security with their state-of-the-art protection for users.

Do you have a PayPal Business or Premier account right? If not, don’t worry, you can create one, or upgrade your personal account (it’s free to do so) and if you prefer, you can have both a personal and a business account, providing you give PayPal two different emails and bank accounts. Setting this up is just a matter of filling in your details but if you haven’t done so yet, there will be a delay before you can get your chatbot payments working because they need a day or so to arrange the confirmation of your bank account.

Let’s assume you have a PayPal Business or Premier account and get going and install a payment feature on your chatbot.

Step 1 PayPal Client ID and Secret

Notify PayPal of your chatbot and get from them a PayPal Client ID and PayPal Secret.

Click here, for their Developer Portal. Log in with your PayPal email and password (cool, you are now a PayPal Developer, doesn’t that sound impressive!).

PayPal includes chatbots under apps, so scroll down and click the blue button: Create App.

Step 1 PayPal Client ID and Secret

Next, you enter a name for your chatbot (they ask for an app name). This does not have to match your chatbot name on our platform. So you could call it anything at all. Then press the blue button: Create App.

 your chatbot name on our platform

Note: There’s an important issue to watch for on the subsequent page. PayPal default you to Sandbox mode, so you can test and tweak your work before it goes live. But what we are doing is so straightforward we can go to live immediately and it is important to do so to get the permanent PayPal Client ID and PayPal Secret (in Sandbox you only get a temporary one). So switch modes as per this image:

Chatbot Payment

On the next page, scroll down to the section under the dark blue: Live App Settings. Tick all the boxes and find the Log in with PayPal subheading. You’ll see it had a link to Advanced Options. This is what you want, so go ahead and click it.

Log In with Paypal SnatchBot

This opens a page with a choice for you. What information do you want to request from the user? Click the boxes that are relevant to you and also paste the URL for your Privacy Policy and User Agreement in the relevant boxes (it can be the same URL). If you don’t have a URL for your Privacy Policy and User Agreement, you’ll need to create one. After all, you are going to be storing the user’s information, so you need to comply with statutory as well as PayPal’s requirements. They are not difficult to create and there are lots of good website resources about this.

Bot payment SnatchBot

Nearly there. Now you can press the blue button Save at the bottom, then scroll up to get the PayPal Client ID and PayPal Secret that you need. As you do, you might notice that there is a box that has been flagged with an error message.

Paypal Integration with SnatchBot

You don’t need to worry about this box, because, as you’ll see in Step Three, your chatbot is designed to take appropriate steps in the event of a successful payment or a failed one.

So copy and paste the PayPal Client ID and PayPal Secret above and let's move to Steps 2 and 3, which are much quicker and simpler.

Step 2 Assign your PayPal Client ID and PayPal Secret to your SnatchBot account

Log in to the SnatchBot platform and click on your name (bottom left) so as to open the profile page and you’ll see an option to click on Payment System. Click that and you have come to the page where your PayPal Client ID and Secret are needed. Enter them in the relevant boxes.

Assign your PayPal Client ID and PayPal Secret to your SnatchBot account

That’s done! You now have an add payment option for your chatbots.

Step 3 Create a PayPal payment button in your chatbot’s conversation

When your chatbot’s script reaches the point that you want to take a payment, you create an interaction for it and click on Gallery (undercards). You have to give the gallery a picture so have one prepared for upload. Give it a heading, then you click the blue Add button letters in the gallery card (no need to add an URL but you should probably put something explanatory in the Text box, like ‘click below to pay’).

Create a PayPal payment button in your chatbot’s conversation

After clicking ‘Add button’ a new box opens for you allowing you to choose ‘Payment’. You’ll see the payment button is designed to allow you to enter the name of the product, the price the user will pay, the currency and — very importantly — we have created two drop-down menus that will allow you to direct the chatbot on to different interactions, dependent on whether the payment went through successfully or not.

Note: You might want to create these successes or fail interactions before creating the payment button, so they will appear in the drop-down menus.

Create a PayPal Bot

Now when someone chats to your bot and reaches this payment interaction, they will see something like this:

Email Bot

And on clicking the button (in this case, Example Product), the user will be taken to PayPal to make the payment at the set amount. Afterward, the bot will resume the conversation at the interactions you have set for Success or Fail, depending on if the transaction when through.

That’s it! All it takes to add this important feature then is a bit of preliminary setup work and some planning in regard to your chatbot’s conversation. The rest is just clicking and filling in boxes. No coding, no pain!