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

Create Webhook

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

POST
/public/api/v1/webhooks

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

Idempotency-Keystring

Request Body

application/json

Webhook configuration payload.

TypeScript Definitions

Use the request body type in TypeScript.

Payload for registering a webhook endpoint.

urlstring
Required

HTTPS URL that will receive webhook notifications. Must match one of your approved point-of-sale domains.

Format:
uri

List of webhook events to subscribe to. Duplicate values are rejected.

Items:
1 <= items
[index]string
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"
secretstring
Required

Shared secret used as the value of the Authorization header during webhook callback.

Length:
1 <= length <= 2048

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/webhooks" \  -H "Idempotency-Key: c4f5e8d2-1234-5678-90ab-cdef12345678" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "events": [      "transaction.success.v1"    ],    "secret": "string"  }'
{  "webhook": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "url": "http://example.com",    "events": [      "subscription-billing.charge-created.v1"    ],    "pausedAt": "2019-08-24T14:15:22Z",    "pauseReason": "ERROR_RATE_TOO_HIGH",    "createdAt": "2019-08-24T14:15:22Z"  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}
{  "errorCode": "VALIDATION_ERROR",  "message": "Input validation errors",  "errors": {    "amount": [      "[required]: Is a required non-nullable field",      "[int]: Must be an integer",      "[min:0]: Must be greater than 0",      "[max:999999999]: Must be less than 999999999"    ]  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}