new or process can be cancelled.state_callback was passed, a notification with status = canceled is sent.| HTTP | Meaning | Next step |
|---|---|---|
200 | The invoice is cancelled: status = canceled. | — |
400, 401, 422, 500 | The request is rejected. | See «Errors» below. |
error_description; error_code is returned for 401, 422 and for the 400 errors that have a code below.| HTTP | error_code | When | What to do |
|---|---|---|---|
400 | 3001 | The invoice is not found. | Check id. |
400 | 3003 | The invoice is already cancelled. | Do not repeat the request. |
400 | 3004 | The invoice is paid or expired. | Check the status with Status. To return a payment, use Refund. |
401 | 9998 | The signature is invalid. | Check the signature: see Overview. |
422 | 9403 | The X-JWS-Signature header is missing. | Pass the signature. |
500 | — | A field is missing or invalid. error_description names the field. | Fix the request. |