Skip to content

Cancel a payment

POST /v1/payments/{id}/cancel

Credential: secret key.

Cancels a payment in awaiting_payment: no new deposit addresses can be requested and the hosted page shows it is no longer active. Sends payment.canceled.

Terminal window
curl -X POST https://api.unizpay.com/v1/payments/pay_01K8Z3M0Q4V7Y2B9C6D1E5F8G3/cancel \
-H "Authorization: Bearer $UNIZPAY_SECRET_KEY"

The updated payment object, with status canceled.

Addresses already issued are still watched: if a payer sends funds anyway, the payment moves to late and the funds are delivered.

StatusCodeWhen
404not_foundNo payment with this id in this mode
409conflictThe payment is past awaiting_payment and can no longer be canceled