payment.succeeded, to each of your endpoints — only after it has checked the payment on Base.
The event
POST your-endpoint
The
id you got when you created the request.A string concept comes back as you sent it. A JSON object comes back as its compact JSON string —
JSON.parse it. null if there was none, or it was deleted before delivery.true when a single-use link was paid a second time. See Duplicates and idempotency.txHash, payerAddress and paidAt, are on the payment.succeeded reference page. The top-level timestamp is when Pesso matched the payment to your request; the webhook-timestamp header is when this attempt was sent. Pesso never sends the payer’s name or email.
Verify the signature
Pesso signs every delivery with Standard Webhooks. Use their library with your signing secret,whsec_…, and the raw request body.
verify throws if the signature doesn’t match or webhook-timestamp is more than 5 minutes from now. Answer 400 and don’t act on the event.
A complete handler
Most frameworks parse JSON before your code runs, and a re-serialised body no longer matches the signature. Read the raw bytes on this one route:alreadyHandled and markOrderPaid are yours. Answer quickly: do slow work, such as emails, after you reply.
Test your verification before a real payment: a sample body, headers and secret with the signature they must produce. Jump to the sample.
Test your verification
These values were signed by Pesso’s own signing code. Sample only — never a real secret.Body (exact bytes, no trailing newline)
true:
false, check that you sign webhook-id, ., webhook-timestamp, . and the raw body, with the key base64-decoded from the part after whsec_, and compare in standard base64.
Retries
Answer2xx within 10 seconds. Anything else — a redirect, a timeout, a 4xx or 5xx — is retried with the same webhook-id, up to seven attempts in all. Pesso doesn’t follow redirects.
Every attempt is signed afresh: webhook-timestamp is the time of that attempt, so the 5-minute check still passes on a retry. If your customer closes the page before Pesso has matched the payment, the first attempt also waits for the daily run. If the concept is deleted while a delivery is pending, later attempts carry data.concept: null. After the seventh failed attempt, Pesso stops trying.
Duplicates and idempotency
Storedata.paymentId and ignore any event you have already handled — a retry can arrive after you handled the first attempt. If data.duplicate is true, the customer paid a single-use link twice: handle it on your side — for example, send the money back from your own account.