Skip to main content

Errors

POST /send answers 201 with the link, or one of these. Every error but 401 carries a JSON body with an error string. Call https://api.pesso.xyz/send with no trailing slash: /send/ answers a 308 redirect instead of creating the request.

Kinds of request

To stop a link early, cancel it in Your requests › Links. Anyone who opens it is told it’s no longer active. Money already paid stays yours.

Things that can happen

  • A single-use link is paid twice. You get a second payment.succeeded with data.duplicate: true. Send the money back to data.payerAddress from your own Pesso account if you don’t want it.
  • Your customer wants their money back. Pesso can’t reverse a payment. Send it back from your own Pesso account to data.payerAddress.
  • Your customer closes the page right after paying. The payment is still on Base. Pesso matches it to your request and sends the webhook, but the first attempt can wait for the daily run.
  • Your customer comes back to your successUrl without paying. Anyone can open that URL. Mark an order paid only from a verified webhook.
  • Your plan lapses. New requests answer 401, and webhooks for new payments are held until the plan is back on. Links you already made keep working, and payments still reach your account.

Checklist

1

Keep the key on your server

Never in a browser, a mobile app or a repository. Roll it in Your requests › API keys if it leaks.
2

Verify every webhook

With the raw body and your whsec_… secret. Answer 400 when it fails. Webhooks.
3

Handle each payment once

Store data.paymentId, ignore repeats, and decide what to do with duplicate: true.
4

Fulfil on the webhook only

Not on the customer reaching successUrl.
5

Pay one real request

"0.01", from a second Pesso account of your own, and watch the webhook arrive and verify.