Cancel a payment
POST /v1/payments/{id}/cancelCredential: 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.
curl -X POST https://api.unizpay.com/v1/payments/pay_01K8Z3M0Q4V7Y2B9C6D1E5F8G3/cancel \ -H "Authorization: Bearer $UNIZPAY_SECRET_KEY"Response
Section titled “Response”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.
Errors
Section titled “Errors”| Status | Code | When |
|---|---|---|
404 | not_found | No payment with this id in this mode |
409 | conflict | The payment is past awaiting_payment and can no longer be canceled |