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

Cancel Payment Link

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

DELETE
/public/api/v1/payment-links/{id}

Cancels a payment link that has not yet been completed.

A payment link can only be cancelled if no transactions are currently being processed for it. If the payment link cannot be cancelled, an UNEXPECTED_SESSION_STATE error is returned.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

idstring
Required

ID of the payment-link to cancel.

Header Parameters

Idempotency-Keystring

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/public/api/v1/payment-links/string" \  -H "Idempotency-Key: c4f5e8d2-1234-5678-90ab-cdef12345678"
Empty
{  "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"}