less than a minute read • Updated 20 hours ago
Enable the pre-payment webhook
How to turn on the pre-payment webhook and configure its endpoint URL and failure handling.
Steps
In the new admin:
In the legacy admin:
Settings
Pre-payment hook URL
The URL for the endpoint script, which must be HTTPS, that will receive the JSON payload.
Failure handling
If your endpoint script fails to load or respond correctly, this setting controls whether the transaction is automatically approved or rejected. If set to reject, a generic error message is returned — you can edit that message from the “language” section of your store’s administration, under the “checkout” group, looking for the “error precheckout hook” language string.
Notes
Requests to your webhook endpoint also include several special headers:
Header | Description |
|---|---|
| Name of the event that triggered this payload. Currently |
| The ID of the store this webhook was triggered for |
| The store domain this webhook was triggered for |
The pre-payment webhook is primarily triggered right before payment is sent to your gateway (
validation/payment). For some gateways, it’s also triggered prior to a 3DSv2 challenge (validation/3ds) — these triggers are documented on the respective gateway wiki pages (Opayo, Barclaycard).