Cancel Payment Link
Cancel a payment link when the payer should no longer be able to complete payment using the hosted URL.
Endpoint
Section titled “Endpoint”DELETE /api/v1/integrations/pay/payment_links/:order_idRequest
Section titled “Request”curl -X DELETE 'https://[base_url]/api/v1/integrations/pay/payment_links/:order_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Basic <token>'Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | Payment link order ID returned by Create Payment Link. |
Response
Section titled “Response”{ "status": "success", "message": "Payment link cancelled successfully!"}Errors
Section titled “Errors”| Code | HTTP Code | Description |
|---|---|---|
HUE00000 | 400 | Bad request error. |
HUE00001 | 404 | Resource not found. |
Implementation Notes
Section titled “Implementation Notes”- Cancel only links that should no longer accept payments.
- Use Get Payment Link to verify the final status if your workflow needs confirmation.