Incoming webhooks
Send data to Loops from supported platforms using webhooks.
Incoming webhooks allow you to:
- Create and update contacts
- Send events to trigger loops
This feature lets external platforms send webhook events directly to Loops, making it straightforward to create or update contacts in Loops automatically when changes happen in other platforms.
You can also trigger events when webhooks arrive in Loops so you can send automated email after something happens in your other accounts.
Currently, the supported platforms are:
- Stripe
- More coming soon!
How it works
First, you create webhook endpoints in your Loops account. These allow other platforms to send data automatically and directly to Loops.
You then create webhooks in the external platforms, which send event data to your Loops endpoint URLs.
Note: we only process webhook events listed below for each provider (and which contain an email address).
We return helpful messages in responses if there is an issue processing a webhook event. Check the webhook logs in your external platforms.
Syncing contacts
When data arrives in Loops, we grab the email address to create and update contacts in your Loops audience.
For each endpoint you create you can choose to assign a user group value to each new contact, allowing you to create segments from webhook-created contacts.
Any new contact created via a webhook will have a source like “Stripe webhook” so you know where it originated from.
Sending emails
We also support triggering events for each incoming webhook event. This can be useful to automatically send emails when a webhook event arrives in Loops (e.g. a successful payment or a new customer).
Create webhook endpoints in Loops
To start sending webhook events to Loops, go to the Integration settings page in Loops.
A webhook endpoint will be created for you. Copy the endpoint URL and paste it into your external platform.
You may need to copy-paste signing secrets between the platform and Loops for extra security (we will prompt you when this is necessary and give you the steps to do it).
In the endpoint form, you can select the events you want Loops to process, assign a user group, and send a Loops event (which can trigger email sending in loops).
Stripe
Our webhooks integration with Stripe lets you sync user data to Loops for customer and invoice-related events.
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:
customer.created
customer.updated
invoice.paid
invoice.payment_failed
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 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 Stripe secret field in Loops.
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.
You will see new contacts appear in your Loops 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 above).
- In Stripe, create a new webhook (instructions above) for the
customer.created
andcustomer.updated
events and paste in your endpoint’s URL.
New customer email
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
. - Set up your Stripe webhook endpoint in Loops (instructions above).
- 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 selectnewStripeCustomer
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
. - Set up your Stripe webhook endpoint in Loops (instructions above).
- 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 selectsuccessfulPayment
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
. - Set up your Stripe webhook endpoint in Loops (instructions above).
- 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 selectfailedPayment
from the Trigger an event field.
Was this page helpful?