Skip to content
Blog

· Natrajan

How to confirm a Stripe payment and its SMS notification before closing a lead

Step-by-step guide to mark a lead as successful only after Stripe reports payment success and Twilio confirms the SMS was delivered.

Young woman managing her online clothing business from home office with boxes and laptop.
Photo by Kampus Production on Pexels

When a customer pays online, the sale feels complete—until the payment-related email or SMS never arrives, the receipt is missed, or the checkout page shows an error after the charge. Many businesses treat the Stripe payment_intent.succeeded webhook as the sole proof of success, then fire a follow-up SMS and immediately mark the lead as closed. If the SMS fails, the customer may never see the confirmation, and the business loses a chance to verify the transaction.

In this post you’ll learn how to require two independent success events—the Stripe payment webhook and a Twilio delivery receipt—before an outcome is considered achieved. You’ll see how to set up reliable retries, avoid blind re-runs of non-idempotent steps, and get alerts when a deadline is approaching. The result is a lead-to-revenue workflow you can actually trust.


1. Define the outcome with two success events

OutcomeOS treats an outcome as a contract: start event + success events + failure events + deadline. The outcome is only marked achieved when a trusted event proves it.

For a payment-follow-up workflow the contract looks like this:

ElementDefinition
Start eventContact created in HubSpot (or via form, email, API).
Success event 1Signed Stripe webhook payment_intent.succeeded.
Success event 2Twilio delivery receipt (status = delivered).
Failure eventStripe webhook payment_intent.payment_failed or Twilio receipt status = failed.
Deadline30 minutes after the start event.

Only when both success events arrive before the deadline does OutcomeOS move the contact to Outcome Achieved. If either event is missing, the outcome stays In Progress and the alert system will notify you.


2. Capture contacts from any entry point

Leads can arrive through:

  • a HubSpot form link,
  • an inbound email address,
  • a CSV import,
  • a direct API call, or
  • a signed webhook from another system.

OutcomeOS creates a contact record for each entry and tracks its progress toward the outcome. You can identify contacts by a unique field such as email, phone, or a custom ID, ensuring the same lead is followed throughout the workflow.


3. Build the workflow steps and make them idempotent

A typical workflow for this outcome has three steps:

  1. Create the Stripe payment intent – an HTTP request to Stripe. Configure an idempotency key derived from the contact’s unique ID. If the request times out, the retry will use the same key, so Stripe will not create a duplicate charge.
  1. Send the confirmation SMS – a Twilio API call. Mark this step as non-idempotent (SMS cannot be sent twice without spamming). Configure a retry policy without automatic blind retries. If the first attempt fails ambiguously, the step moves to Requires attention so a human can decide whether to resend.
  1. Wait for provider-signed events – OutcomeOS listens for the Stripe webhook and the Twilio delivery receipt. No extra steps are needed; the platform matches incoming events to the contact’s pending outcome.

Why idempotency matters

If the Stripe request succeeds but the response is lost, a naïve retry would charge the customer again. By supplying an idempotency key, Stripe recognises the duplicate request and returns the original result. The same principle applies to any HTTP request step you control.

Handling non-idempotent steps safely

For the SMS step we set a retry limit of 1 and a “requires attention” fallback. When the SMS API returns a transient network error, OutcomeOS will retry once. If the error persists, the step stops and flags the contact for manual review, preventing duplicate messages.


4. Set up deadline alerts that keep you ahead of missed outcomes

With the 30-minute deadline in place, OutcomeOS sends two kinds of alerts:

  • Email alert – sent shortly before the deadline if the outcome is still pending.
  • SMS alert via Twilio – sent to the designated team phone number at the same time.

A daily digest summarises all contacts that missed their deadline, showing which success event was missing (Stripe or SMS). The dashboard visualises Achieved vs. Missed counts, letting you spot patterns—e.g., “SMS delivery failures spike on Thursday evenings”.


5. Example: $10 k in sales, 95 % confirmation rate (hypothetical)

Imagine a small SaaS business that processes 200 payments per week. They set up the outcome described above with a 30-minute deadline.

MetricWeek 1Week 2
Payments initiated200200
Stripe successes198 (99 %)199 (99.5 %)
Twilio deliveries190 (95 %)192 (96 %)
Outcomes marked Achieved190 (95 %)192 (96 %)
Missed outcomes (alerted)108

The dashboard shows the 10 contacts that missed the SMS receipt in Week 1. The daily email digest lists them, and the team resends the SMS manually. By Week 2 the missed count drops to 8 after adjusting the Twilio retry policy (adding a second attempt with a longer back-off).

Because the outcome is only marked achieved when both events arrive, the business can confidently claim that every closed sale has a confirmed receipt in the customer’s inbox or phone. This eliminates the “payment-but-no-confirmation” disputes that previously cost them time and refunds.


6. Quick checklist for a reliable payment-plus-SMS outcome

  • Choose a unique contact identifier (email or phone).
  • Define the outcome contract: start event, two success events, failure events, deadline.
  • Add an idempotency key to the Stripe HTTP request step.
  • Mark the Twilio SMS step as non-idempotent and set a “requires attention” fallback.
  • Enable email and SMS alerts shortly before the deadline.
  • Review the daily digest and dashboard to address any “Requires attention” contacts.

7. How OutcomeOS makes this easy

OutcomeOS lets you declare the outcome once and handles the heavy lifting: matching signed Stripe webhooks, listening for Twilio delivery receipts, managing idempotent retries, and sending deadline alerts by email and SMS. The built-in dashboard gives you a clear view of achieved versus missed outcomes, and the REST API (available on the Business plan) lets you push custom events if you ever need to extend the contract.

Ready to stop guessing whether a payment really reached the customer? [Sign up for a free Starter plan] and start building outcome-driven workflows today. Compare the plans to see which one fits your growing business at [OutcomeOS pricing].

One short letter when we ship something worth switching for.

Double opt-in. Unsubscribe from any issue in one click.