https:// address with a real host name. No localhost, IP addresses, internal names or odd ports (use a tunnel such as a dev tunnel URL while you build). Easner waits 8 seconds for an answer, reads at most 64 KB of the response, and never follows redirects.
Test and live endpoints
Every event has a mode. Test events go only to test endpoints and live events only to live endpoints. A test payment never reaches your live URL. The samedata.livemode field is on every payload. Create the endpoint in the mode you are in (Console header: Test or Live).
Each endpoint has its own signing secret (easner_whsec_…), shown once when you create or rotate it. Store it as EASNER_WEBHOOK_SECRET.
Headers on every delivery:
Body:
2xx quickly. Do the work after you ACK, or keep the handler short. Anything else (a non-2xx status, a timeout, a redirect) is a failure and will retry.
id is the event id (evt_…). It is created once per event and is the same on every retry and redelivery, so it is the key to dedupe on: store the ids you have handled and skip one you have seen. The same event can arrive more than once. created is when the event happened (Unix seconds) and also never changes. The id in the examples below is left out for brevity, every body has it. Events recorded before ids were added get one derived from the stored event the first time they are redelivered, and it stays the same after that.
Dedupe on the event id, not on data: one object produces several events (a refund goes refund.created then refund.updated), and each is a different event with its own id.
Verify easner-signature
HMAC-SHA256 of the Unix timestamp, a period, and the raw body, keyed with the endpoint’s signing secret. Compare with v1 using a constant-time compare.
t is the time this attempt was sent, so it is fresh on every retry. Reject a t more than 5 minutes from your clock (replay protection). The event’s own time is created in the body, which does not change on retries. Easner used to reuse the original t on retries. If your verifier loosened its tolerance to cope with that, put it back to 5 minutes.
Catalog
Tick these in Settings → Webhooks. Default ticks are Banking:customer.updated, account.updated, transfer.completed, transaction.created. Add Checkout events when you take payments on a site: checkout.completed, checkout.async_succeeded, checkout.failed, refund.created at least, plus the subscription events for subscriptions.
Thirty-seven events exist. Checkout: checkout.completed, checkout.async_succeeded, checkout.failed, payment.available, subscription.created, subscription.updated, subscription.canceled, subscription.trial_ending, subscription.payment_failed, refund.created, refund.updated, refund.failed, dispute.created, dispute.updated, dispute.closed. Banking: account.updated, customer.created, customer.updated, transfer.created, transfer.completed, transfer.failed, transaction.created. Connect: payee.linked, payee.unlinked, payee.relinked, payee.link_confirmation_required, payee.balance.updated, payee.restricted, payee.tax_form.updated, credit.available, payout.created, payout.held, payout.waiting_for_funds, payout.waiting_for_limit, payout.waiting_for_tax_form, payout.completed, payout.failed. customer.updated is one event name with two payload shapes (Banking and Checkout customers, see below).
Every field of every event, with types and nullability, is in Webhook events. The examples on this page show the common fields.
There is no transfer.canceled event. Canceling a transfer (POST /v1/transfers/:id/cancel) releases the hold and sends no webhook: read the canceled status from the cancel response or from GET /v1/transfers/:id.
Checkout
checkout.completed — Payment succeeded. Fulfil the order. Funds land on your business balance.
checkout.async_succeeded — A delayed payment method (a bank debit) charged successfully. Easner sends it only for those methods. A card payment sends checkout.completed and nothing else, so it no longer produces this event. It is informational: fulfil from checkout.completed, which Easner also sends once the debit clears. data has checkout_session_id (null only if the session cannot be found), amount_cents, currency, livemode and payment_link_id when the payment came from a link.
checkout.failed — The payment failed or a bank debit did not go through. Do not fulfil. data has amount_cents, currency, reason, livemode, and checkout_session_id when Easner knows the session: a failed bank debit carries it, and so does a declined card attempt when Easner can tie it to a session. Renewals do not, so match on your own metadata or the customer if it is missing. reason can be null. Failed renewals also send this event with the subscription.payment_failed shape, for older integrations. New code should use subscription.payment_failed.
A free trial or a 100% promotion code sends checkout.completed with amount_cents: 0 and amount_due_today_cents: 0. Payments from a payment link add payment_link_id to data.
payment.available — Funds are usable on your business balance. Only live money is credited to a balance, so a real event always has livemode: true.
subscription.updated / subscription.canceled — A renewal, plan change, pause or cancellation. canceled fires when the subscription ends.
subscription.created — A subscription started, including a free trial. Create access on this event. The data has the same state as subscription.updated, plus started_as (trial or active). See Webhook events.
subscription.trial_ending — The free trial ends in 3 days. Nothing is charged yet. data has trial_end, quantity and amount_cents for the first charge.
subscription.payment_failed — A renewal could not be charged. Easner retries on its own schedule (about 3, 5 and 7 days). Ask the customer to fix their payment method, for example with a portal link.
Refunds
refund.created, refund.updated, refund.failed — A full or partial refund was made (from POST /v1/refunds or Console), changed status, or did not go through (the money stays with you). Dedupe on refund_id plus status. refund_id is the re_… id that POST /v1/refunds and GET /v1/refunds return as id. payment_id and fully_refunded are on every refund event, including when POST /v1/refunds recorded the refund first. See Refunds.
Disputes
dispute.created, dispute.updated, dispute.closed — A customer disputed a payment with their bank. The amount is held. Respond with evidence before evidence_due_by. closed means the dispute was won or lost; check status.
customer.updated for a Checkout customer has a different data from the Banking customer: { "object": "checkout.customer", "id", "email", "name", "phone", "address", "livemode" }. Check data.object before you read it.
Banking
account.updated — Available or pending changed, and also once when an account is first created (a new customer’s USD account, or POST /v1/accounts). A new customer therefore sends account.updated for the issued account, then customer.created. Default tick.
customer.updated — Record changed, including verification_status. Default tick. customer.created is the same data shape; tick it if you need create.
transfer.created — A transfer was created and is waiting for the customer to authorize it. data is the transfer without client_secret, and next_action is the authorize object, not null:
delivery is customer_email. The sample from Console, Send test event, carries the same object (with a sample id).
transfer.completed — Vault sent. Default tick. data is the transfer without client_secret. Also tick transfer.created / transfer.failed if you handle those.
transfer.failed — optional tick. Fires when a transfer expires before the customer confirms, or when the send fails after confirm and the funds are known not to have left. Same transfer fields plus error. A send whose outcome is unknown stays in processing and sends no event until it is reconciled. When the failure happens after confirm, next_action may still be filled in from before the confirm; ignore it, read status:
transaction.created — A ledger row was written. Default tick. This payload is narrower than GET /v1/transactions/:id. Receive type is deposit, onramp, or chain.
Retries
A delivery is attempted up to 5 times: the first attempt when the event happens, then retries 1 minute, 5 minutes, 30 minutes and 2 hours after the previous failed attempt. There is no later retry: after the fifth failed attempt (at least 2 hours 36 minutes after the first attempt, a little more when the retry job runs late) the delivery isfailed and Easner stops. Redeliver it by hand from Settings → Webhooks, or read the missed object from the API. Each attempt (a retry or a redelivery) is signed again with the time it is sent, and carries the same event id and created. Dedupe on id.
Deliveries are listed there. Events in Console is a log of every event, not this catalog.
Send a test event
In Console, Settings, Webhooks, choose an endpoint and Send test event, or use Checkout, Integrate, step 5. Pick any event name. Easner POSTs a sample payload to that one endpoint (never to your other endpoints) and shows the status your server answered. The sample payload carries"test": true and "livemode": false. The request is signed exactly like a real one, so it checks your signature code too. A 200 here is what the Checkout go-live check “Your webhook answered 200” waits for.
Sample payloads are static and use sample ids such as cs_test_easner_sample. Do not look them up with GET /v1/checkout/sessions. Every one of the twenty events has a sample with the same fields as the real payload shown on this page (refunds, disputes and subscription.payment_failed included), plus test: true. The test delivery carries its own id (evt_…) and easner-event-id like a real one.
Manage endpoints via the API
A webhook endpoint is an https URL that Easner posts webhook events to. Each endpoint has one mode (test or live), its own list of events, and its own signing secret. How deliveries are signed and retried is on this page. Over the API, a key with thewebhooks.manage scope can list endpoints of its mode, add one, change one, and disable or delete one. A key without the scope gets 403 key_forbidden.
Routes
Every endpoint in a response has these fields, and no others:
The signing secret is never in a list, a change or a delete response.
Add an endpoint
url must be a full https:// address. enabled_events is required and names events from Webhook events. The API does not pre-tick any events: send the ones you handle. An unknown event is refused, with every unknown name in the message and in error.fields.
A successful call answers 201 with the endpoint’s fields, plus two more:
Save the secret where your server reads
EASNER_WEBHOOK_SECRET. Easner stores only an encrypted copy, so it cannot be read again. If you lost it, add a new endpoint, or rotate the secret in Console (Settings → Webhooks, Rotate secret).
Creating an endpoint is not idempotent. A retry after a lost response makes a second endpoint with its own secret. To avoid that, list the endpoints first and look for the URL.
Change an endpoint
POST /v1/webhook_endpoints/:id takes any of these fields. Send at least one:
The response is the endpoint’s fields. A change that alters nothing answers
200 and is not recorded.
Delete an endpoint
DELETE /v1/webhook_endpoints/:id stops deliveries to the endpoint at once. The row is kept, so its id and history stay, and it shows as status: disabled in the list. The response is { "object": "webhook_endpoint", "id": "…", "deleted": true }. To send to it again, call POST with disabled: false.
Modes
A test key lists, adds and changes test endpoints only. A live key does the same for live endpoints. An endpoint of the other mode is404 not_found. A live endpoint receives live events, so add one only with a URL that is ready for real money.
Notices
The business owner is emailed when an endpoint is added, changed, disabled, enabled or deleted. The email names the endpoint and says the change was made through the API, with the name of the key that made it. A change that alters nothing sends no email. The API has no authenticator step. Console asks for a fresh security code before it adds or changes an endpoint; a key withwebhooks.manage does not. The scope and the email are the controls, so give the scope only to a key that needs it.
Not on the API
- Rotate a signing secret. Settings → Webhooks, then Rotate secret. The old secret stops working at once.
- Send a test event. Settings → Webhooks, then Send test event.
- Redeliver a failed event, or read the delivery log. Settings → Webhooks.
- Change the description. Settings → Webhooks.
- Create or revoke API keys. See API keys.
Errors
See Errors for every code.
Expected handler
1
Read the raw body
Do not re-serialize JSON before verifying.
2
Verify easner-signature
HMAC-SHA256 of timestamp plus raw body. Reject timestamps older than 5 minutes. This holds for retries too.
3
Switch on type
Branch on the event name, not the message text.
4
Fulfil idempotently
Skip an event whose
id (or easner-event-id) you have already handled. Then use checkout_session_id, id on the transfer, or your metadata.5
Return 200
ACK quickly. Do heavier work after.
Test and live
What test completes, and what live actually moves.
