Skip to main content
Pesso sends one event, payment.succeeded, to each of your endpoints — only after it has checked the payment on Base.

The event

POST your-endpoint
string
Unique per payment. Use it as your idempotency key.
string
The id you got when you created the request.
string
USD, no trailing zeros: "25", "0.01", "12.5". amountAtomic is the same in 6-decimal units.
string | null
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.
boolean
true when a single-use link was paid a second time. See Duplicates and idempotency.
All fields, including 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)
The library above refuses this sample because its timestamp is old, so check your signing logic with plain HMAC instead. Each snippet prints true:
If yours prints 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

Answer 2xx 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.
Only the first attempt is immediate today. Each retry goes out in Pesso’s daily run, between 00:00 and 00:59 UTC, so a missed first delivery can take a day or more to arrive, and the six retries span about six days. Keep your endpoint up.
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

Store data.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.

Your plan and your webhooks

Webhooks need the Business plan, like API keys. If your plan lapses, deliveries for new payments are held, not dropped: they go out once the plan is back on. Payments still reach your Pesso account either way. See plans.

Where to see deliveries

In Pesso, Your requests › Webhooks shows each endpoint’s last delivery: delivered, retrying with the last reply, or stopped. Your requests › Links shows which links are paid. If a link shows paid and your server has no event, check the endpoint’s state first.