Skip to Content

Overview

Get notified when orders are paid or expire.

Webhooks tell your server when something happens to an order created through the API. CashPayment sends an HTTPS POST with a JSON body to your endpoint for each event.

Delivery, signing and retries are handled by Svix. Requests follow the Standard Webhooks format, so you can verify them with the official Svix libraries.

Set up an endpoint

In the merchant console, open Webhook and add an endpoint:

  • URL: an HTTPS URL on your server, reachable from the internet.
  • Events: order.paid, order.expired, or both. See Event types.

Each merchant has one endpoint. On the endpoint's page you can:

  • reveal and copy the signing secret, or rotate it;
  • send a test event;
  • disable, edit or delete the endpoint;
  • see every event sent, with its attempts and your responses, and resend any of them.

Handle an event

Read the raw request body and verify the signature. Reject the request if verification fails.

Skip events you have already processed, using the event id. The same event can arrive more than once.

Update your order, then respond with any 2xx status within 30 seconds. Do slow work, such as sending emails, after responding.

Only orders created through the API send webhooks. Payments made on your pay-link pages don't.

On this page