Skip to main content

7. Pre Authorization Webhook

Merchants can enable the pre-authorization webhook to allow full control over the processing of transactions. A webhook is sent to the merchant after all data collection has occurred and before any authorization or SCA is begun. This allows merchants to make fully informed decisions based on all available data.

To enable pre-authorization webhooks, merchants must send the preAuthUrl parameter during session creation. The callback allows merchants to reject and modify the processing of specific transactions.

info

Pre Authorization Webhooks must be enabled by ePay before use. Contact ePay if necessary.

Request
{
"session": {
"id": "0192473a-e382-79a9-bfc2-65da88fe812f",
"subscriptionId": "01929a94-5fce-7ccc-a7e4-7e9249133b39",
"amount": 1000,
"attributes": { "key1": "value1", "key2": "value2" },
"exemptions": ["TRA"],
"createdAt": "2024-10-01T10:38:14.658688472+02:00",
"currency": "DKK",
"expiresAt": "2024-10-01T12:41:14.658688472+02:00",
"instantCapture": "OFF",
"maxAttempts": 10,
"attempts": 1,
"reportFailure": false,
"dynamicAmount": false,
"notificationUrl": "https://example.com/notification",
"preAuthUrl": "https://example.com/pre-auth",
"successUrl": "https://example.com/success",
"failureUrl": "https://example.com/failure",
"pointOfSaleId": "0192473a-e381-705c-b61c-fc2ac9624afc",
"reference": "reference-1",
"state": "PROCESSING",
"textOnStatement": "The text",
"scaMode": "SKIP",
"timeout": 60
},
"transaction": {
"id": "01924756-d1f6-7bc6-bb51-2b5f87b43925",
"subscriptionId": "01929a94-5fce-7ccc-a7e4-7e9249133b39",
"state": "PROCESSING",
"errorCode": null,
"createdAt": "2024-10-01T09:08:45.174774Z",
"sessionId": "01924756-badd-71d4-be55-da367f434da4",
"paymentMethodId": "01924756-d1f6-738d-8040-90d76cedf01f",
"paymentMethodType": "CARD",
"paymentMethodSubType": "Visa",
"paymentMethodExpiry": "2050-01-01",
"paymentMethodDisplayText": "40000000XXXX0003",
"customerId": "User159",
"scaMode": "SKIP",
"amount": 1000,
"currency": "DKK",
"instantCapture": "OFF",
"notificationUrl": "https://example.com/notification",
"pointOfSaleId": "0192473a-e381-705c-b61c-fc2ac9624afc",
"reference": "reference-1",
"textOnStatement": "The text",
"exemptions": ["TRA"],
"attributes": { "key1": "value1", "key2": "value2" },
"clientIp": "1.2.3.4",
"type": "PAYMENT"
},
"card": {
"pan": "40000000XXXX0003",
"expireMonth": "01",
"expireYear": "30",
"issuer": "Danske Bank",
"scheme": "Visa",
"country": "DK",
"funding": "debit",
"segment": "consumer"
}
}
Response
{
"reject": false,
"update": {
"scaMode": "FORCE",
"exemptions": ["TRA"]
}
}
FieldDescriptionRequired
rejectIf set to 'true' the transaction will be rejected and no authorization will be processed.No
update.scaModeUpdates the SCA mode. Must be a valid SCA mode.No
update.exemptionsList of exemptions to apply when applicable.No
info

Pre-authorization webhooks enable merchants to implement custom anti-fraud and transaction risk analysis systems.

Setting scaMode to FORCE shifts the liability to the issuer.

Using exemptions shifts the liability to the merchant.