pg_refund_amount is not passed or is 0, the whole amount that is not refunded yet is returned.pg_revoke_payment_id, signed), or the request was rejected (pg_error_code, not signed). See «Errors» below.pg_status | Meaning | Next step |
|---|---|---|
ok | The money is refunded. | To check the refunded amount, call Get payment status. |
error with pg_failure_code | The refund is declined. | See «Errors» below. |
error with pg_error_code | The request is rejected. | See «Errors» below. |
200. A declined refund returns pg_failure_code and pg_failure_description in a signed response with pg_revoke_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 (for example, a negative pg_refund_amount), 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. |
110691 | pg_error_code | The payment is not successful: it is declined or not paid yet. | There is nothing to refund. |
9014 | pg_error_code | The two-step payment is not captured and could not be captured, or it is cancelled. | To release the blocked amount, use Cancel payment. |
9994 | pg_error_code | Refunds are disabled in the merchant settings. | Contact Freedom Pay. |
91021 | pg_error_code | A refund of this payment is already being processed. | Wait for the result and check the payment with Get payment status. |
900811 | pg_failure_code | The amount is greater than the amount not refunded yet, or the payment is already refunded in full. | Check the refunded amount with Get payment status. |
| Other codes | pg_failure_code | The payment system declined the refund. | See Error codes. |
pg_sig is calculated with the secret key test_secret_key.