Refunds API
refund/create
The retailer's website or app sends a request to the Processing Service to create a refund payment, which has the following form:
POST https://<HOSTNAME>/api/v1/refund/create
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Idempotence-Key: ps_refund_1614589640890_3134
Content-Type: application/json
{
"payment_id": "23d93cac-000f-5000-8000-126628f15141",
"value_fiat": "21.00",
"email": "[email protected]"
}
Fields description
# | Field | Type | Description |
---|---|---|---|
1 | payment_id | string | payment ID |
2 | value_fiat | string | amount of refund in fiat |
3 | string | email of the buyer; To this address will come the link for the refund procedure |
Response if successful:
{
"response": {
"purpose": "R-1254-1",
"iban": "GB29NWBK60161331926819",
"fiat_amount": "21.00",
"amount_too_big": false
}
}
Response Fields description
# | Field | Type | Description |
---|---|---|---|
1 | purpose | string | purpose of payment (R-order number -return number , for example R-1254-1); |
2 | iban | string | IBAN;- Bank account details |
3 | value_fiat | string | amount of refund in fiat; |
4 | amount_too_big | boolean | flag indicating that the return is executed partially from the amount that was set in the parameters. The state true takes place when the amount of return on the payment exceeds the balance of the payment amount. |