Cancel Payment Link
API ExplorerUse this API to cancel an existing Hosted Payment Page (HPP) payment link. Once cancelled, the HPP URL can no longer be used to complete a payment.
Before You Begin
To cancel an HPP transaction, you will need:
- The
tokenvalue from the HPP URL you want to cancel
Step 1: Get the Transaction Token
Locate the HPP URL generated when the payment link was created.
Example HPP URL:
https://payment.ipospays.tech/payment?t=abc123xyz456
Copy the value that appears after ?t=. In this example, that value is abc123xyz456 — this identifies the HPP transaction that you want to cancel.
Step 2: Send the Cancel Request to the Cancel API
Pass that token as the Authorization header value. Cancelling a payment link is only possible while it is still pending (i.e. not yet paid and not already cancelled) — no request body is required.
Header Parameters
The transaction token — the t value from the HPP payment URL (see Step 1 above) — generated when the payment link was created.
Response Body
application/json
application/json
curl -X POST "https://example.com/cancel" \ -H "Authorization: string"{
"responseCode": "200",
"responseMessage": "PaymentLink cancelled."
}{
"responseCode": "DEJ_ERR_77",
"responseMessage": "Failed to cancel payment link."
}