Stripe
Stripe sends the events of your account to webhook endpoints you add in the Dashboard. Add the Flows address as one more endpoint, and a payment by Checkout or a Payment Link, a failed asynchronous payment or a refund starts your flows: a thank-you with the order number, a note that the payment did not go through. No developer is needed, and the endpoint of your shop stays as it is.
This page is written from the public documentation of Stripe and has not been checked on a live account yet.
What you need
- A Stripe account. Webhooks are not limited by plan; an account can have up to 16 event destinations.
- Stripe is not available to companies registered in Ukraine — only through a company registered abroad.
- To get the phone of the buyer, turn on phone number collection in the Payment Link or Checkout. Without it, the event has the email and the name only.
Step 1. Create a connection
- Open
Flows → Connections, press Connect a system and choose Stripe. - Press Copy address. It looks like
https://events.alphasms.net/hooks/<TOKEN>— keep it secret.
Step 2. Add an event destination in Stripe
-
In the Stripe Dashboard open Workbench, the Webhooks tab, and press Create an event destination.
-
Choose Your account — the events of your own account.
-
Payload format — Snapshot. Not Thin: thin events come without the data of the payment, with a link to it only. API version — leave the default.
-
Events:
checkout.session.completed;checkout.session.async_payment_succeeded;checkout.session.async_payment_failed;charge.refunded.
Add
payment_intent.succeededonly if you do not use Checkout or Payment Links — otherwise one payment arrives twice. -
Press Continue, choose Webhook endpoint and press Continue again.
-
Endpoint URL — the address from the cabinet; Description — "AlphaFlow".
-
The Signing secret (
whsec_…) is optional: the secret in the address is enough.
Step 3. Send a test
Make a test payment in a sandbox. What Stripe sent is listed in Event deliveries in the settings of the
destination, and Resend sends a delivery again, up to 15 days back. The event appears in
Flows → Connections → Event journal within seconds, and the
connection shows Recognised: Stripe.
Events
| Stripe event | AlphaFlow event | Properties |
|---|---|---|
checkout.session.completed with payment_status = paid | payment_succeeded | order_id, total, currency, status, payment_link, stripe_object_id |
checkout.session.completed with payment_status = unpaid or no_payment_required | — no event | |
checkout.session.async_payment_succeeded | payment_succeeded | order_id, total, currency, status, payment_link, stripe_object_id |
checkout.session.async_payment_failed | payment_failed | order_id, total, currency, status, payment_link, stripe_object_id |
payment_intent.succeeded | payment_succeeded | total, currency, status, stripe_object_id |
payment_intent.payment_failed | payment_failed | total, currency, status, stripe_object_id |
charge.refunded | refund_issued | total, currency, status, stripe_object_id |
- A completed Checkout Session is not yet a payment. With a delayed method (a bank debit, a voucher) the session
completes as
unpaid, and AlphaFlow waits: the payment comes later ascheckout.session.async_payment_succeededorcheckout.session.async_payment_failed. A session with nothing to pay (no_payment_required) gives no event. order_idis theclient_reference_idof the Checkout Session — your order number, if you pass it.totalisamount_totalof the session oramountof the PaymentIntent or the Charge, in the smallest unit of the currency:2198is 21.98 USD.statusis the payment status of the session or the status of the PaymentIntent or the Charge;stripe_object_idis the id of the Stripe object.
The contact is found by the phone, the email and the name of the buyer: for a Checkout Session from
customer_details, for payment_intent.* and charge.refunded from billing_details, and the email also from
receipt_email. The phone comes only if it is collected. An event without a phone and an email is refused with
no_contact.
Payment events are not among the events of the ready-made templates (see Recommended events): create the flow From scratch and choose the event as its start.
Good to know
- Stripe repeats a delivery that failed: in live mode for up to 3 days with a growing pause, in a sandbox 3 times
over a few hours. A repeat has the same event id (
evt_…) and is not recorded twice. - The address always answers
200. Above the daily event limit the event is refused in AlphaFlow withquota_exceededand shown in the journal; the destination in Stripe stays on.