Home · Blog · Accepting payments in a chatbot through your own payment provider: the Payment block step by step
Accepting payments in a chatbot through your own payment provider: the Payment block step by step
The customer has picked a service or a course, the bot has clarified the details — and then comes the most awkward moment of any conversation: “how do I pay?”. If the customer has to go looking for bank details or wait for a manager to send a link, some payments are lost. In CHBT you can put payment right into the flow: the Payment block sends a link to your payment provider, waits for the payment and moves the customer on — along the Paid or Error branch. Here is how to set it up and where the limits are.
What payment looks like for the customer
The customer reaches the payment step and gets a message: the amount, the payment description and a link, with a Pay button below. The button opens your provider’s payment page — there the customer pays by card or any other method enabled with your provider. The money goes to your account with the provider: CHBT does not process the payment and takes no percentage.
While the customer pays, the bot waits at this step. As soon as the provider confirms the payment, the flow continues on its own through the Paid output: the bot can send access, confirm a booking or say thank you. If the payment could not be created, the flow goes through the Error output.
Which payment providers you can connect
- Prodamus — popular with online schools and experts.
- YooKassa — the YooMoney checkout for businesses.
- CloudPayments — acquiring for online sales.
- Telegram Stars — an invoice in Telegram stars right in the chat, Telegram bots only. More in the article on payment in stars.
You connect a provider once in the bot’s Accepting payment section. The contract with the provider, its fees and payout terms are yours — every provider has its own conditions.
How to add payment to a flow
- Put the Payment block after the step where the customer chose what they are paying for.
- In the Payment provider field choose a specific provider or “Connected one (Prodamus → YooKassa → CloudPayments)” — CHBT then uses the first connected one in that order. For stars — Telegram Stars.
- Fill in Amount and Currency.
- Fill in Payment description — the customer sees it in the message and on the provider’s page. You can insert variables, for example
Consultation, {{date}}. - Connect the outputs: Paid — to the step after payment, Error — to a fallback.
The block is available both in the Steps editor and on the Canvas, and it is not limited by plan.
What to put after Paid
- Confirmation — “Payment received, here is what happens next”.
- Access — a link to a private channel, materials or booking a consultation.
- Tag — Action → Add a tag, for example
paid. Then paying customers are visible in Contacts, you can send them a separate broadcast, and the bot metrics show the share of conversations that reached money. - Deal — Action → CRM deal with a stage and amount, so the manager sees the payment in the pipeline.
- Notification — Action → Notify an operator, if a person is needed after payment.
What to put after Error
The Error output fires when the payment could not be created: no provider is connected, the provider rejected the request, or it is a check in the test chat. Do not leave it empty — otherwise the customer taps “pay” and gets nothing. Good options:
- a message “Could not create a payment link, passing you to a manager” and the Operator block;
- a fallback payment method — bank details or a payment link on your website;
- Notify an operator, so someone checks the provider.
How to test payment before launch
No payment is created in the test chat: a real request would create an invoice in your provider’s account that nobody issued. So in Check flow the Payment block goes to Error with a note that this is a test conversation. Test the Error branch that way.
Test the Paid branch with a real payment from the messenger for a small amount — for example, set 1 ₽ in a test flow and pay yourself. You will see the whole path: the message, the provider’s page, returning to the bot and the step after payment. If your provider supports a test mode, use it according to its instructions.
A complete flow: booking a consultation with prepayment
- A Message with service buttons: “30-minute consultation”, “60-minute review”.
- Collect data — the phone with Phone input validation.
- A Condition on the chosen service → two Payment blocks with different amounts and the description
Consultation, {{name}}. - Paid → Action: tag
paidand a CRM deal at the Paid stage with the amount → Message: “Payment received. Send us a convenient time and we will confirm”. - Error → Message: “The link was not created, a manager will message you” → Operator.
A flow like this answers “how do I pay” without a manager, and the manager joins only where they are really needed.
Common mistakes
- No provider connected. The block goes straight to Error. Check the Accepting payment section.
- An empty Error. The customer is left without an answer — always lead it to a person or a fallback method.
- A meaningless description. “Payment” on the provider’s page tells the customer nothing. Write what the payment is for.
- Tested only in the test chat. It does not create payments — test the Paid branch with a real payment.
- Stars in MAX or VK. Payment in stars works only in Telegram; in other channels the step goes to Error. For those channels use a provider or a Condition on the Channel field.
Payment in different channels
A provider link with the Pay button arrives in any channel the bot works in: Telegram, MAX, VK, website chat. The flow is shared, so one Payment block serves all customers at once.
The exception is Telegram Stars: an invoice in stars is issued only in Telegram. If the bot works in several channels and you want to accept stars, put a Condition on the Channel field before payment: for Telegram — the block with stars, for the rest — a provider. Without that fork, MAX and VK customers will end up in Error.
What to write before payment
A payment link without context looks suspicious. Before the Payment block put a short Message that removes questions:
- what exactly the customer is buying and what they get right after payment;
- how much it costs and whether there is anything on top;
- what to do if they change their mind — refund terms;
- how to reach a person if something goes wrong.
Example: “A 60-minute consultation — 3,000 ₽. After payment the bot will send a link to choose a time. If your plans change, we will reschedule for free up to a day before”. Three lines, and the customer has no reason to leave “to think”.
Prepayment, full payment or deposit
- Full payment suits digital products and courses: access is given right after Paid, and the customer does not have to wait for anything.
- Prepayment — for booking services and consultations. A small amount noticeably reduces no-shows, and the customer pays the rest on site.
- A deposit or reservation — for expensive services and rentals: it secures the date, while the manager handles the contract and the full amount separately.
The amount in the Payment block is set in advance. If you have several price options, make a block for each and split them with buttons or a Condition, as in the example above.
Where to see payments
Money and statements are in your provider’s account. In CHBT it is convenient to see which customers have paid — for that, the Paid branch sets a tag and a deal:
- in Contacts, a filter by the
paidtag shows everyone who paid; - in CRM, a deal with the amount at the right stage shows the payment in the pipeline next to other requests;
- in Conversations, the manager sees the whole chat, including the payment message.
This way the manager does not have to reconcile the provider with the chat by hand, and you can see how many bot conversations reached money.
Telegram Stars payment in a botFlow editorCRM and contactsChatbot metrics