Looking for ePay classic docs? Go to docs.epay.dk
ePay documentationDocsePay documentation

EventWebhook

Envelope posted to your webhook URL when an event occurs.

Use event to identify the event type. The event-specific payload is in data, and its shape depends on the event type.

You can parse every webhook type with one request structure that includes the optional fields used by each event type, then use event to handle the fields relevant to that event. Event data shapes are deliberately non-conflicting: when two event types contain a field with the same name, it always has the same data type. Fields not used by an event type are omitted.

eventstring
Required

Identifier of the event that triggered the webhook.

Possible values:
"transaction.success.v1""transaction.failed.v1""transaction.captured.v1""transaction.refunded.v1""transaction.voided.v1""transaction.renewed.v1""subscription.disabled.v1""subscription-billing.charge-created.v1""subscription-billing.charge-success.v1""subscription-billing.charge-failed.v1""subscription-billing.agreement-active.v1""subscription-billing.agreement-stopped.v1""settlement.transfer-ready.v1"

Event-specific payload.

Payload delivered for transaction.success.v1 and transaction.failed.v1 webhooks.

Payload delivered for transaction.captured.v1, transaction.refunded.v1, transaction.voided.v1, and transaction.renewed.v1 webhooks.

Payload delivered for subscription.disabled.v1 webhooks.

Payload delivered for subscription-billing.charge-created.v1, subscription-billing.charge-success.v1, and subscription-billing.charge-failed.v1 webhooks.

Payload delivered for subscription-billing.agreement-active.v1 and subscription-billing.agreement-stopped.v1 webhooks.

Payload delivered for settlement.transfer-ready.v1 webhooks.

EventWebhook
{  "event": "transaction.success.v1",  "data": {    "transaction": {      "id": "LDG7M4WW44G",      "subscriptionId": "0197c07b-3f6d-7be2-b848-702b08958128",      "billingAgreementChargeId": "019a727b-987f-7768-a59e-71af920ef81f",      "state": "PENDING",      "errorCode": "string",      "externalStatusCodes": {        "terminal": "string",        "acquirer": "string",        "network": "string",        "sca": "string"      },      "createdAt": "2019-08-24T14:15:22Z",      "sessionId": "string",      "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",      "paymentMethodType": "CARD",      "paymentMethodSubType": "Visa",      "paymentMethodExpiry": "2019-08-24",      "paymentMethodDisplayText": "string",      "paymentMethodHolderName": "string",      "scaMode": "SKIP",      "customerId": "string",      "amount": 0,      "fee": 0,      "currency": "string",      "instantCapture": "OFF",      "notificationUrl": "http://example.com",      "pointOfSaleId": "be6bff4f-7fac-43c0-9f6b-cf2cd45ed7d1",      "reference": "string",      "textOnStatement": "string",      "exemptions": [        "LVT",        "TRA"      ],      "attributes": {        "property1": null,        "property2": null      },      "clientIp": "52.212.176.122",      "clientCountry": "DK",      "type": "PAYMENT"    }  }}