Webhook reply rules vary: PayPal, Asana and Stripe name success codes, while Square gives your app 10 seconds to respond.
Key takeaways
- Check the success code your vendor expects.
- Measure the time your handler takes to reply.
- Separate email sending from the reply path.
- Check for repeat events before starting another welcome sequence.
When a customer starts a trial, your billing or payments tool can send that event to a webhook URL on your server. A webhook is a message the tool sends your server when something happens on its side. Your server then decides what happens next: a welcome email, a setup sequence, a note to the sales team. The tool, though, only sees the reply it gets back.
That gap is where growth problems start. For Square, a late acknowledgement can cause the event to arrive again. Square's documented rule for this is covered below. For a growth lead, the result can be a new customer who gets the same welcome email twice, or who gets the first one late. Both are easy to miss, because the customer sees only the emails, not the webhook behind them.
This post reads the official webhook pages of four vendors: PayPal, Square, Asana and Stripe. Asana is not a billing tool, but its guide sets out what a webhook receiver must return, which makes it a useful comparison. Every rule and figure below comes from one of those pages, and each one applies only to the vendor whose page it came from. If your billing tool is not on this list, read its own documentation before you set any timeout.
When the trial start is the first event your onboarding depends on, the reply is the first thing to get right. You do not need to write the handler yourself to act on this. Knowing the reply rules lets you ask the right questions of engineering and check the emails they produce.
Which vendors name a success code?
Three of the four quotes say which reply counts as success. PayPal's webhooks overview requires an HTTP 200 or other 2xx status code to confirm the event was received. Asana's webhooks guide says that "a delivery succeeds when your webhook server responds to a webhook event with a 200 OK or 204 No Content response code." Stripe's endpoint guide describes an endpoint that "quickly returns a successful status code (2xx)."
Check each vendor's reply code and timing separately before setting your handler's limits.
The wording differs from vendor to vendor. PayPal writes about a "listener endpoint," Asana about a "webhook server," Stripe about an "endpoint," and Square about an "application." Each term names the code on your side that receives the event, so when you read a vendor's page, look for the sentence that describes that code and its response.
Make sure that code returns the success status on every path, including the path where it recognizes a repeat.
The status code is only half of the reply. The other half is how long it takes to send, and the next sections cover that.
How long does Square give your app to respond?
Square gives your app 10 seconds to respond. Its webhook overview says that "if your application fails to acknowledge the notification in a timely manner, a duplicate event is sent and your application has 10 seconds to respond."
Your system needs to recognize a second copy as an event it has already handled.
Ten seconds is a short window when the handler does real work inside the request. A handler that builds an email, waits on a sending service, and only then replies has spent its window before it answers. The reply is the part the vendor is timing, so the reply is the part to protect.
To see where your handler stands, measure the time from the moment a request arrives to the moment the reply is sent. Measure it under realistic load, not on a quiet test server, because a handler that is fast when idle can be slow when busy. Use the signup load test checklist to plan that check across your stack.
How fast do webhook events arrive?
Square says that in most cases event notifications arrive in well under 60 seconds, and Asana says most should arrive within 10 minutes. Both figures describe delivery, not your reply.
Both measure the time from the event to its arrival at the receiver. Neither says how fast your system will send the first email after that. Plan for a gap between the trial start and the first message, and do not promise a send time that depends on the event alone.
Asana's minute figure is an average; Square's delivery figure and Asana's 10-minute figure describe most events. Neither quote promises a bound for every single event, so a plan that assumes every event arrives within a minute would go beyond what the quotes state.
Keep the timing measures separate when reviewing your handler:
| Vendor | Measure | Timing |
|---|---|---|
| Square | App response | 10 seconds |
| Square | Event notification arrival | In most cases, event notifications arrive in well under 60 seconds of the associated event. |
| Asana | Average event delivery | within a minute |
| Asana | Most event delivery | within 10 minutes |
Does a slow reply hurt onboarding?
Yes, it can. Square's quote ties a late reply to a duplicate event, and any email that waits for your handler to finish inherits the same delay.
The customer sees only the emails, so a duplicate shows up as two welcome messages, with no sign of the webhook behind them. For a growth lead, the timing problem and the duplicate problem start in the same place: how long the handler holds the reply. Reducing that hold time helps with both.
A simple test shows the problem. Ask engineering to start a test trial and count the welcome emails that arrive. One is the goal. Two means a repeat got through.
The same problem reaches your reporting. If you count welcome emails for each trial, duplicates inflate that count, so compare the count with the number of trials before you trust it. A customer who receives the welcome email late also has a weaker first impression than one who receives it at once, so the reply path affects the customer as well as the numbers.
Should your endpoint send emails before it replies?
No. Stripe's guidance is to reply first, before any complex logic that might cause a timeout. Treat anything slow, such as calling another service, as work to move outside the reply path.
Stripe's example is about accounting, not email. Its text says that "you must return a 200 response before updating a customer's invoice as paid in your accounting system." The order is the part worth copying: reply first, then do the follow-on work.
An onboarding email is follow-on work too. Applying that order to email is a design recommendation, rather than a vendor rule about onboarding.
In practice, the endpoint accepts the event, saves enough to handle it later, returns the success code, and hands the email work to a separate process. The next sections show how.
Illustrative example: a late trial-start reply
This illustrative case applies Square's reply rule to a trial-start handler.
- A customer starts a trial, and an illustrative handler receives the event.
- Your endpoint begins the welcome sequence inside the request, before it replies.
- The reply does not go out within Square's 10-second window.
- A duplicate of the same event arrives.
- Your endpoint receives the event again. With no check for repeats, it starts the welcome sequence a second time.
- The customer now has two welcome sequences. Moving the slow email step out of the request lets the handler reply first.
Treat the case as a design risk to plan around, not as a forecast of your traffic.
Now run the same trial with the reply first. The endpoint accepts the event and returns its success code, and the welcome sequence starts after that reply. If a duplicate arrives anyway, the handler recognizes the event as one it has already handled and does nothing a second time. The customer gets one welcome sequence. See how to prevent duplicate welcome emails when planning the repeat check.
Next steps
Do these five things in order before your next launch:
- Find the reply code your billing tool expects, and make sure your endpoint returns it.
- Set an internal limit for your handler below your vendor's reply window.
- Move the email sending out of the request and into a background job.
- Make the handler skip any event it has already handled.
- Keep a log of event identifiers, reply times, and duplicates for your first launch.
Today, ask engineering to run a test trial and record the reply time and number of welcome emails.
What does a 2xx reply actually promise?
A successful webhook reply confirms delivery, not completion of the email work. Those outcomes are for your own system to confirm.
Keep those two checks apart. The webhook reply tells the vendor the event was received; your system shows whether the email was sent. When both are mixed together, a failed email can look like a failed webhook, and the two are harder to tell apart.
How do you split the reply from the email work?
Separate the reply from the email work, so that only the reply has to meet the vendor's window.
The first step is short. Accept the event, save what you need to handle it later, and return a 2xx code. The second step can take longer. It builds the email, calls the sending service, and deals with the result. Run the second step as a background job, so the first step never waits for it.
Before the second step runs, check whether you have already handled this event. That check is what keeps a duplicate from becoming a second welcome email. It needs an identifier that stays the same across a repeat, so decide early which field of the event your handler will use.
A background job also gives you a place to handle a failed send. The reply has already gone back to the vendor by then, so a failed email does not need to change what the vendor sees.
Test the split before launch with a deliberately slow email step. Make that step take longer than the 10-second window in a test environment, then confirm that the reply still goes out first and that a repeat does not start a second sequence.
What should you ask your billing vendor?
Ask which reply code it expects, how long it waits for a reply, and whether it sends a repeat when a reply is late. Ask whether its documentation says what happens after a repeat. Ask also what the vendor counts as a late reply, and whether that limit is stated in the same place as its success code. Ask for the answers in writing, so the engineering team works from one source. Then ask who on your side owns the reply path, so that any change to the handler is reviewed before it ships.
Related guides: Signup workflow limits: 5 to check before you launch · Child consent age online: 3 limits for UK, EU and Canada · Health score rules: 8 limits across 5 platforms.