A webhook endpoint is a URL on your server that Lynent calls when something happens on your account.

Events

  • payment.succeeded: the payment completed. Fulfil the order.
  • payment.processing, payment.failed, payment.canceled
  • payment.refunded: a full or partial refund was made.
  • dispute.created: a buyer opened a dispute. See Disputes and chargebacks.
  • payout.paid, payout.failed
  • account.updated: your account status or requirements changed.
  • ping: sent by the Send test button.

Add an endpoint

  1. Open Developers and choose Add endpoint.
  2. Enter an https:// URL on your server and pick the events you want.
  3. Copy the signing secret. Store it on your server only.

If two-factor authentication is on, you may be asked for a code.

Verify every request

Each request has a Lynent-Signature header: an HMAC-SHA256 of the timestamp and the raw request body, keyed with your endpoint secret. Verify it against the raw body before you parse it, reject old timestamps, and ignore events you have already handled (check the event id). The developer docs have the exact steps and code.

Retries

If your server does not answer with a 2xx status within 10 seconds, the delivery is retried with growing waits, up to 8 attempts. Open an endpoint in Developers to see recent deliveries and their status codes.

Common problems

  • Signature does not match. You are verifying a parsed or reformatted body. Use the raw bytes.
  • Timeouts. Answer with 200 first, then do slow work in the background.
  • Address not allowed. Endpoints must be public https:// addresses. Private and internal network addresses are blocked.
Still need help?

Ask the help assistant, or open an issue and we will reply by email.