pg_auto_clearing = 0), the blocked amount is released to the client.pg_cancel_payment_id, signed), or the request was rejected (pg_error_code, not signed). See «Errors» below.pg_status | Meaning | Next step |
|---|---|---|
ok | The payment is cancelled: the amount is released or refunded to the client. | — |
error with pg_failure_code | The cancel is declined. | See «Errors» below. |
error with pg_error_code | The request is rejected. | See «Errors» below. |
200. A declined cancel returns pg_failure_code and pg_failure_description in a signed response with pg_cancel_payment_id; a rejected request returns pg_error_code and pg_error_description in a response that is not signed.| Code | Field | When | What to do |
|---|---|---|---|
94031 | pg_error_code | A parameter is missing or invalid, or a payment with this pg_payment_id does not exist. | Fix the request. |
1100 | pg_error_code | The signature is missing or invalid. | Check the signature: see Merchant API Overview. |
340 | pg_error_code | The payment belongs to another merchant. | Check pg_payment_id and pg_merchant_id. |
9994 | pg_error_code | Cancelling is disabled in the merchant settings. | Contact Freedom Pay. |
91021, 91031 | pg_error_code | A refund or a cancel of this payment is already being processed. | Wait for the result and check the payment with Get payment status. |
10033 | pg_failure_code | The payment has already been cancelled. | Do not repeat the call. |
90131 | pg_failure_code | The payment is not successful: there is nothing to cancel. | — |
900811 | pg_failure_code | The amount cannot be refunded in full, for example after a partial clearing. | Use Refund payment with the amount. |
| Other codes | pg_failure_code | The payment system declined the cancel. | See Error codes. |
pg_sig is calculated with the secret key test_secret_key.