There are two ways to accept payments with ChatCompose.
To integrate a payment method in the chatbot thtough Middleware, you must use an API of a payment system (ex: PayPal, Stripe, Alipay) or through banking platforms.
This works by sending a request to the API of the payment platform which in turn will return a link to the Middleware that enables payments with their own portal. A customer is redirected to the specific portal of a payment system.
So, the payment is carried out not directly in the messaging app but with a Middleware.
To make and receive payments with paypal you will need a developer account. Check this link for more details.
You will need to copy and save your API credentials — the client ID and secret for your app — which you exchange for an access token that authorizes your REST API calls.
You can then use the payment component in the chatbot platform by clicking the Payment button on your script editor.
Enter yout paypal ID, the type of currency and the amount you want to charge.
The type of currency has to be in the international currency code format. For example US dollars are USD.
After entering the required information your chatbot will be able to display a paypal payment button that your clients can use to make their payments.
It is currently a form only available on Facebook Messenger and Telegram, and in the former, this feature is currently in beta.
With the Facebook Payment Webhook, chatbots accept payments on Messenger. When the user touches the Buy button, a dialog box appears displaying the item, a price list, and the payment method, along with additional customer information (address, phone number, etc.).
After the customer taps the Pay button in the dialog box, the chatbot receives the credentials and can charge the person for the item. The purchase is confirmed with a message, however this feature is currently only available in the US.
On Telegram, payment is processed in a similar way. The developers add the "Pay" button to the message. After the user taps the button, they are asked to fill in the payment details, shipping information, and a payment confirmation request.
Telegram acts as a mediator between the bot developer, the paying user and their chosen payment system.