Stripe
Sync contacts and send emails triggered by events in Stripe.
Our Stripe integration lets you:
- Create and update contacts
- Send events to trigger loops
Our Stripe integration is built on top of our Incoming webhooks feature. This system lets you send webhooks from supported platforms directly to Loops so you can easily sync users and customers as well as send automated emails.
Please read our guide about incoming webhooks
With Stripe, you can sync user data to Loops for customer and invoice-related events.
Synced data
We sync the following Stripe data to your Loops contacts for every incoming event:
- Email address
- First and last name (optional)
We use the email addresses of Stripe customers to match contacts in your Loops audience. If the email address is not found in Loops, we will create a new contact.
Supported events
We accept the following events:
checkout.session.completed
customer.created
customer.updated
invoice.paid
invoice.payment_failed
invoice.upcoming
If you send other events, they will be ignored.
If you would like to see more events supported, please let us know by sending an email to [email protected]. Please keep in mind only events that contain an email address are able to be processed.
Create a webhook endpoint in Loops
Follow the instructions here to create a new webhook endpoint, which will allow you to send webhook events directly to Loops.
Create a webhook in Stripe
Next, you need to set up webhooks in Stripe.
Go to Developers and then Webhooks.
Click + Add endpoint. Paste in the endpoint URL from Loops, then select the event(s) you want to send (see our supported events above).
Click Add endpoint to finish.
The last step is to copy the signing secret into Loops. On the webhook page in Stripe, click Reveal to show the secret in the page. Copy the secret and paste it into the Signing Secret field in Loops.
Now you’re all set up.
Testing Stripe webhooks
You can test a customer.*
webhook by creating a new customer in the Customers page in Stripe.
You can also use the Stripe CLI tool to mimic events, by using the trigger
command.
You can see all sent webhooks by going to Developers -> Webhooks and then clicking on an endpoint.
On Loops’ end, You will see new contacts appear in your Audience page, and triggered events in the Events page.
Examples
Here are some examples of how you can send data from Stripe to Loops to sync contacts and trigger useful emails to your customers.
Syncing customers to Loops
Create or update contacts in your Loops audience when a customer is created or updated in Stripe.
- Create a new Stripe webhook endpoint in Loops (instructions).
- In Stripe, create a new webhook (instructions above) for the
customer.created
andcustomer.updated
events and paste in your endpoint’s URL. - In Loops, make sure
customer.created
andcustomer.updated
are checked on the Stripe settings page.
Send an email to all new Stripe customers
Send an email from Loops when a new customer is created in Stripe.
- Create a new loop in Loops using our Stripe - New Customer template.
- For the loop trigger, select Event received and enter
newStripeCustomer
(or something similar). - Set up your Stripe webhook endpoint in Loops (instructions).
- In Stripe, create a new webhook (instructions above) for the
customer.created
event and paste in your endpoint’s URL. - In Loops, make sure
customer.created
is checked, and select the event name you chose in Step 2 from the Trigger an event field.
Send an email to Stripe Checkout customers
Send an email from Loops when a customer pays via Stripe Checkout.
- Create a new loop in Loops using our Stripe - Payment Successful template.
- For the loop trigger, select Event received and enter
stripeCheckout
(or something similar). - Set up your Stripe webhook endpoint in Loops (instructions).
- In Stripe, create a new webhook (instructions above) for the
checkout.session.completed
event and paste in your endpoint’s URL. - In Loops, make sure
checkout.session.completed
is checked, and select the event name you chose in Step 2 from the Trigger an event field.
Successful payment email
Send an email from Loops when an invoice is paid in Stripe.
- Create a new loop in Loops using our Stripe - Payment Successful template.
- For the loop trigger, select Event received and enter
successfulPayment
(or something similar). - Set up your Stripe webhook endpoint in Loops (instructions).
- In Stripe, create a new webhook (instructions above) for the
invoice.paid
event and paste in your endpoint’s URL. - In Loops, make sure
invoice.paid
is checked, and select the event name you chose in Step 2 from the Trigger an event field.
Failed payment email
Send an email from Loops when an invoice payment fails in Stripe.
- Create a new loop in Loops using our Stripe - Payment Failed template.
- For the loop trigger, select Event received and enter
failedPayment
(or something similar). - Set up your Stripe webhook endpoint in Loops (instructions).
- In Stripe, create a new webhook (instructions above) for the
invoice.payment_failed
event and paste in your endpoint’s URL. - In Loops, make sure
invoice.payment_failed
is checked, and select the event name you chose in Step 2 from the Trigger an event field.