Webhooks

Webhooks notify your system about the result of payments made on the hosted payment page and about cards saved there.

Paynetics sends webhooks only for payments made on the hosted payment page (POST /v1/{operation}/page). Operations you call directly through the API (pre-authorization, purchase, capture, refund and the others) do not send a webhook — their result is in the API response.

Each webhook is an HTTP POST with a JSON body (Content-Type: application/json), sent to the webhook URL configured for your merchant by Paynetics — one URL for payments and one for saved cards. Any headers you want included with each notification are configured by Paynetics as well.

IP addresses

You can restrict your endpoint to the Paynetics IP addresses:

  • Sandbox: 51.15.250.183
  • Production: 3.64.221.236

Verifying a webhook

Each webhook carries the headers below, generated with the API key and API secret of your instance:

  • x-api-key — your API key.
  • x-timestamp — UNIX timestamp of the delivery attempt, in seconds.
  • x-hash and X-SIGNATURE — the same value: HMAC-SHA256 of the raw request body with your API secret, as a lowercase hex string.

To verify a webhook, compute HMAC-SHA256 over the raw body exactly as received and compare it with X-SIGNATURE. Unlike API requests, the timestamp and the operation are not part of the signature.

Delivery and retries

A webhook is delivered when your endpoint answers with an HTTP 2xx status. Any other status, a timeout or a connection error is retried, up to 3 times, with a delay between attempts. Answer with 2xx as soon as you have stored the webhook, and handle duplicates — the same event can arrive more than once. A retry carries the same body (including date and retry) with a new x-timestamp and signature.

Refer to the Behavior reference panel below for the per-status rules. Each section after the panel documents the JSON payload of a specific webhook event.

Behavior
ResponseOutcomeBehaviour
HTTP 2xx SUCCESS The webhook is considered delivered.
Any other HTTP status RETRY The webhook is retried up to 3 times, with a delay between attempts.
Timeout / connection error RETRY The webhook is retried up to 3 times, with a delay between attempts.

Card tokenized

Sent when a card is saved on the payment page, for a payment page session that has a user. Example payload of the CARD.NEW event:

CARD NEW
{
    "action": "CARD.NEW",
    "payload": {
        "user": "ba70d30e-8c89-4bf8-8ccf-423ce49c41d9",
        "card": "bde0b2bd-d0db-451c-9ccf-4e6827aedf4e"
    }
}
Fields
FieldTypeDescription
userstringUser token.
cardstringCard token of the saved card.

Payment

Sent with the result of a payment made on the payment page. action is the transaction type of the page: PURCHASE or PREAUTHORIZATION. Example payload of the PURCHASE event:

PURCHASE
{
    "action": "PURCHASE",
    "payload": {
        "status": 1,
        "transaction": "974d5f06-0469-4b5e-b167-8ae0ff77ac25",
        "reference": "ORDER-2026-001",
        "amount": 10.5,
        "currency": "EUR",
        "date": "2026-10-29 12:00:00",
        "retry": 0,
        "user": "e4fdc99b-8fcc-4fbf-910f-7533e6a856a0",
        "card_number_masked": "510077XXXXXX0022",
        "card": "bde0b2bd-d0db-451c-9ccf-4e6827aedf4e",
        "response_code": "00"
    }
}
Fields
FieldTypeDescription
statusinteger1 — successful (response_code 00, 10 or 85); -1 — failed.
transactionstringPaynetics transaction token.
referencestringYour reference from the payment page request.
amountnumberAmount from the payment page request.
currencystringCurrency from the payment page request.
datestringDate and time the webhook was created, in UTC, YYYY-MM-DD HH:MM:SS. It does not change on retries.
retryintegerAlways 0, also on retries — do not use it to detect a redelivery.
userstringUser token.
card_number_maskedstringMasked card number.
cardstringCard token.
response_codestringTransaction response code — see Response Codes.

Payment failed before processing

If the payment fails before a response is received from the processor (for example a failed 3-D Secure authentication), the webhook has status -1 and does not contain card_number_masked or response_code. The other fields are the same as in the Payment webhook. Example payload:

PURCHASE · FAILED
{
    "action": "PURCHASE",
    "payload": {
        "status": -1,
        "transaction": "974d5f06-0469-4b5e-b167-8ae0ff77ac25",
        "reference": "ORDER-2026-001",
        "amount": 10.5,
        "currency": "EUR",
        "date": "2026-10-29 12:00:00",
        "retry": 0,
        "user": "e4fdc99b-8fcc-4fbf-910f-7533e6a856a0",
        "card": "bde0b2bd-d0db-451c-9ccf-4e6827aedf4e"
    }
}
esc
↑↓ navigate ↵ open esc close
Copied