Stripe payments and refunds in Telegram: Stripe sends an event, the bot posts it

To get Stripe payment notifications in Telegram, you add the address of the nana800 webhook trigger to Stripe as an event destination, and the Telegram message send block posts every payment and refund to your chat. You need a Stripe account and a bot from @BotFather, with no code and no server. One event takes two basic block runs, and your balance is topped up to $3.50 for free every month.

Build it in the builder

What you can automate

  • Get a message for every successful payment from the payment_intent.succeeded event: amount, currency and payment description
  • Hear about refunds from the charge.refunded event: how much went back to the customer (amount_refunded) and for which payment
  • See payments made through Stripe Checkout links created by the Stripe Request block: checkout.session.completed carries the customer email
  • Keep payments and refunds in separate topics of one team group with the group topic ID field
  • Flag large payments: the free condition block compares the amount with a threshold you set
  • Test the scheme with events from a Stripe sandbox: their livemode field is false, so such messages are easy to mark

How to set it up

  1. 1

    Create a scheme with a webhook

    Create a scheme and add the webhook trigger with the POST method and a path such as /stripe-k7q2x9, with a few random characters so nobody can guess the address. Turn the scheme on, otherwise the webhook answers with code 409. Press the API button in the builder and copy the webhook address.

  2. 2

    Add the address in Stripe

    In Stripe open Workbench, the Webhooks tab, and click Create an event destination. Select Your account and the Snapshot format: a Thin event does not carry the payment data. Tick payment_intent.succeeded and charge.refunded, choose Webhook endpoint and paste the webhook address into Endpoint URL.

  3. 3

    See what Stripe sends

    Make a payment in a Stripe sandbox or run stripe trigger payment_intent.succeeded in Stripe Shell. In the run history of the scheme, body holds the event id, type with the event name and data.object with the payment: amount, currency, description, receipt_email. The amount is in cents, so 2500 with the currency usd means twenty-five dollars.

  4. 4

    Split payments and refunds into two messages

    Put the free condition block after the trigger: type equals payment_intent.succeeded. Connect a Telegram message send block with a payment text to the branch where the condition is true, and a second one with a refund text and amount_refunded to the other branch. Give both the bot token from @BotFather, the chat ID and the plain_text format.

  5. 5

    Confirm the payment before releasing goods

    Any 2xx answer is enough for Stripe: nana800 answers with code 200 when the scheme finishes, so you do not need the webhook response block. If a message releases goods, add the Stripe Request block with RETRIEVE_PAYMENT_INTENT and the payment id from the event, followed by a condition: data.status equals succeeded.

Pricing

A run of a Stripe block costs $0.002, a run of a Telegram block costs $0.001. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Stripe

    Stripe Checkout pages, customers, subscriptions, invoices and refunds right from a scheme, without code. Free balance every month, no card needed.

  • Telegram

    Build a Telegram bot without code: reply to messages, add buttons, send leads and alerts to a chat, group or channel. Free balance every month, no card needed.

Similar integrations

  • amoCRM + Telegram

    Get new amoCRM deals and stage changes as Telegram messages in a private chat or a team group. No code and no server, free balance every month.

  • Bitrix24 + Telegram

    Get new Bitrix24 leads, deals and tasks as Telegram messages in a private chat or a team group. No code and no server, free balance every month.

  • CloudPayments + Telegram

    CloudPayments reports a payment, a decline or a refund, and the bot posts the amount, order number and decline reason to Telegram. No code, free balance monthly.

  • Email + Telegram

    Forward new emails from any IMAP mailbox to Telegram with no code: sender, subject and text, also from your company domain. Free balance every month, no card needed.

  • Gmail + Telegram

    Get new Gmail emails as Telegram messages: sender, subject and text in your private chat or a team group. Free balance every month, no card needed.

  • HTTP request + Telegram

    Check a website or API on schedule and get a Telegram message when it is down or returns an error. No code and no server of your own, free start every month.

Frequently asked questions

An event is one webhook trigger run and one message, so two basic block runs, and 1,000 runs cost $1. The condition block is free, and confirming the payment with Stripe Request adds two more runs. A message that Telegram rejected is not charged. The scheme waits for events around the clock at $0.0042 per hour, which takes most of the free $3.50 a month.

No. Stripe computes the signature over the exact text of the request, while nana800 blocks get fields that are already parsed, and no block can run this check. So anyone who learns the webhook address can send an event, and the message will look real. Keep the address private, and before releasing goods confirm the payment with Stripe Request: a made-up payment is not found in Stripe.

A disabled scheme answers with code 409, and Stripe treats the delivery as failed. In live mode Stripe retries such an event for up to three days with growing pauses, in a sandbox three times over a few hours. So payments missed while the scheme was off still reach Telegram later. You can also resend an event by hand with the Resend button in Stripe within 15 days.

Yes. Stripe warns that it sometimes delivers the same event more than once and does not promise the order of events. A repeat has the same event id in body.id: put it into the message text and a duplicate is easy to spot. Do not count on a refund message always arriving after the payment message.

Most likely the destination in Stripe uses the Thin format. A thin event carries only a reference to the object, and the amount would need a separate request. Create the destination again with the Snapshot format: then the whole payment sits in data.object, and its fields go straight into the message text.

No, the scheme only receives events from a Stripe account that is already open, and Stripe opens accounts for companies in the countries it supports. If you take payments in rubles, nana800 has the same Telegram notifications for YooKassa, CloudPayments and T-Bank, also received by the webhook trigger.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder