Cancel
POST/:payByLinkId/cancel
Cancel a Pay-by-Link.
For technical reasons, cancelling a Pay-by-Link does not prevent customers from finishing a transaction in all cases. In case the customer was redirected to the PSP's payment page, they could still conduct and finish the payment. Depending on your use case, you must ensure to have remediation mechanisms in place to prevent double payments.
When using Payment Selection Pages, cancellation of the transaction is only possible up to the point where the customer did not yet choose a payment method.
Request
Path Parameters
Possible values: <= 50 characters
ID of the Pay-by-Link.
The value for payByLinkId
can be extracted from the cancelUrl
of the payByLinkData
response field in the Transaction API.
Responses
- 200
- 401
- 422
- 500
Successfully cancelled a Pay-by-Link.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Whether the request was successful.
Current status of the transaction
Possible values: [success
, error_adapter
, error_internal
, invalid
, pending
, pending_postback
, await_redirect
, await_completion
, redirected
, cancelled
, pending_dcc
]
Error message in case of error.
Error code in case of error.
{
"success": true,
"transactionStatus": "success",
"errorCode": 0,
"errorMessage": "string"
}
{
"success": true,
"transactionStatus": "cancelled"
}
Unauthorized access.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Whether the request was successful.
Error message in case of error.
Error code in case of error.
{
"success": true,
"errorCode": 0,
"errorMessage": "string"
}
{
"success": false,
"errorMessage": "Invalid credentials.",
"errorCode": 3002
}
Cannot cancel anymore because preconditions were violated.
- application/json
- Schema
- Example (from schema)
- Already expired
- Not cancellable
Schema
Whether the request was successful.
Current status of the transaction
Possible values: [success
, error_adapter
, error_internal
, invalid
, pending
, pending_postback
, await_redirect
, await_completion
, redirected
, cancelled
, pending_dcc
]
Error message in case of error.
Error code in case of error.
{
"success": true,
"transactionStatus": "success",
"errorCode": 0,
"errorMessage": "string"
}
{
"success": false,
"transactionStatus": "error_internal",
"errorMessage": "Transaction has already expired and can not be cancelled",
"errorCode": 1006
}
{
"success": false,
"transactionStatus": "success",
"errorMessage": "Transaction is not in a state which can be cancelled",
"errorCode": 1006
}
Server error.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Whether the request was successful.
Error message in case of error.
Error code in case of error.
{
"success": true,
"errorCode": 0,
"errorMessage": "string"
}
{
"success": false,
"errorMessage": "Failed to cancel transaction",
"errorCode": 1008
}