Skip to the page

Recipes

Stripe recipes

Text customers a thank-you when they pay, and text yourself when a payment fails.

Three recipes for Stripe. Each names its trigger and the BlueBot step, lists the fields to map and says how to test it with your own number before anyone else gets a text.

How Stripe connects

  • Zapier: BlueBot’s Zapier app has a Send Text action and instant triggers for incoming texts and every change of state.
  • API: Your own code calls BlueBot’s REST API and listens to its signed webhooks.

Thank customers when they pay

PartWhat it is
TriggerWhen a payment succeeds in Stripe
ActionBlueBot’s Send Text action
Connects throughZapier

Steps

  1. Collect a phone number at checkout.
  2. Start a Zap with Stripe’s trigger for a new successful payment.
  3. Add BlueBot’s Send Text action and map the customer’s phone to To.

Map the fields

BlueBot fieldMap it to
ToThe person’s mobile number from Stripe. US numbers can leave off the +1.
TextHi {{first_name}}, your payment came through. Thank you! Reply here with any questions.
{{first_name}} in the textStripe’s first name field.
Metadatasource set to stripe, and record_id set to the record’s id, so the status and reply webhooks for this text can find the record again.
ServiceAuto, the default: iMessage when the person uses it, otherwise SMS through your iPhone.

Test it

Put your own number in To and press Test step. A text arrives on your phone from your own number, and Zapier shows the message BlueBot returned with state: "queued". Then map Stripe’s field back into To and turn the Zap on.

Text yourself when a payment fails

PartWhat it is
TriggerWhen a payment fails in Stripe
ActionBlueBot’s Send Text action
Connects throughZapier

Steps

  1. Start a Zap with Stripe’s trigger for a failed payment.
  2. Add BlueBot’s Send Text action with your own number in To.
  3. Put the customer’s email and the failure message in Text.

Map the fields

BlueBot fieldMap it to
ToThe person’s mobile number from Stripe. US numbers can leave off the +1.
TextPayment failed for {{customer_email}}: {{failure_message}}
{{customer_email}} in the textStripe’s customer email field.
{{failure_message}} in the textStripe’s failure message field.
Metadatasource set to stripe, and record_id set to the record’s id, so the status and reply webhooks for this text can find the record again.
ServiceAuto, the default: iMessage when the person uses it, otherwise SMS through your iPhone.

Test it

Put your own number in To and press Test step. A text arrives on your phone from your own number, and Zapier shows the message BlueBot returned with state: "queued". Then map Stripe’s field back into To and turn the Zap on.

Thank customers from your webhook handler

PartWhat it is
TriggerStripe’s checkout.session.completed event
ActionPOST /v1/messages
Connects throughAPI

Steps

  1. In the handler for checkout.session.completed, read customer_details.phone.
  2. Send the text with POST /v1/messages and the session’s ID as the Idempotency-Key, so a retried Stripe event never texts twice.
  3. Put the session ID in metadata to match BlueBot’s delivery webhooks to the order.

Map the fields

BlueBot fieldMap it to
toThe person’s mobile number from Stripe. US numbers can leave off the +1.
textHi {{first_name}}, thanks for your order! We’ll text you here when it ships.
{{first_name}} in the textStripe’s first name field.
metadatasource set to stripe, and record_id set to the record’s id, so the status and reply webhooks for this text can find the record again.
serviceAuto, the default: iMessage when the person uses it, otherwise SMS through your iPhone.
POST/v1/messagesSend a text →
curl -X POST "https://usebluebot.com/api/v1/messages" \
  -H "Authorization: Bearer $BLUEBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: stripe-1042" \
  -d '{
    "to": "+15555550123",
    "text": "Hi Maria, thanks for your order! We’ll text you here when it ships.",
    "metadata": {
      "source": "stripe",
      "record_id": "1042"
    }
  }'

Test it

Run the request with your own number in to. A text arrives on your phone from your own number.

Before you turn it on

  • Text only people who asked to hear from you. Anyone who replies STOP goes on your stop list, and BlueBot cancels texts to them. Stop words
  • A text that can’t go yet waits with a hold rather than failing: quiet hours, your Mac away, a daily limit. Holds
  • Stripe with BlueBot on the integrations page says what else the two do together.