cancel, or capture it with clearing first.pg_receipt_positions: a refund receipt is created from them.pg_status | Meaning | Next step |
|---|---|---|
ok | The refund is accepted: see pg_refund_status. | success: nothing else is needed. process: request the status with status_v2 until it is final. |
error | The request is rejected or the payment system declined the refund. | See «Errors» below. |
pg_payment_refund_id in the response.200; the error is returned in pg_error_code and pg_error_description.pg_error_code | When | What to do |
|---|---|---|
9403 | A parameter is missing or has an invalid value, or a payment with this pg_payment_id does not exist. | Fix the request. |
1370 | pg_amount is missing, is not a number, or is less than 0.01. | Fix the amount. |
1100 | The signature is missing or invalid. | Check the signature: see Sync API Overview. |
1101 | pg_merchant_id is not found. The response is not signed. | Check the merchant ID. |
900811 | pg_amount is greater than the amount available for refund: the captured amount minus previous refunds. After a cancel nothing is available. | Check the amount; get the payment details with status_v2. |
9014 | The payment is not captured (a two-step payment without clearing) or has been cancelled. | Capture the payment with clearing or release it with cancel. |
110691, 90131 | The payment is not successful. | There is nothing to refund. |
91021 | A refund request for this payment is already being processed. | Wait for the response to the first request or get the payment status with status_v2. |
10000 | The payment is not found for this merchant, or the refund could not be performed. | Check pg_payment_id and pg_merchant_id; repeat the request later. |
9994 | Refunds are disabled in the merchant settings. | Contact Freedom Pay. |
9110 | A dispute is open for the payment: refunds are unavailable until it is resolved. | Repeat after the dispute is resolved. |
9111 | The money has already been returned to the cardholder by a chargeback. | Do not refund the payment. |
| Other codes | The payment system declined the refund. | See Error codes. |
pg_sig is calculated with the secret key test_secret_key.