Creating a Payment Reversal or Refund¶
Creates a reversal or refund for a payment. Merchant may send this request once or several times to make partial refunds.
For additional information, please see “Payment Reversal and Refund“
Request¶
PUT /payin/v1/sites/{siteId}/payments/{paymentId}/refunds/{refundId}
Path Parameters¶
Parameter | Required | Type | Description |
---|---|---|---|
siteId | Yes | string | Merchant site identifier |
paymentId | Yes | string | Payment identifier. The merchant receives this identifier in the payment notification |
refundId | Yes | string | Unique refund identifier in the merchant’s system |
Headers¶
Header | Required | Type | Description |
---|---|---|---|
Authorization | Yes | string | API access key. Bearer [access-token] |
Content-type | Yes | string | Request content. application/json |
Accept | No | string | Response content. application/json |
Body Parameters¶
Parameter | Required | Type | Description |
---|---|---|---|
amount | Yes | object | Operation amount |
callbackUrl | No | string(256) | Notification URL |
comment | No | string(255) | Additional description for the refund |
settlementAmount | No | object | Merchant’s settlement amount (when settlement currency differs from the currency of the payment authorization) |
Request Example¶
Payment refund
PUT /partner/payin/v1/sites/test-01/payments/1811/refunds/tcwv3132 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
{
"amount": {
"value": 2.34,
"currency": "RUB"
}
}
Response¶
See also HTTP error codes
Successful Response Parameters¶
Parameter | Required | Type | Description |
---|---|---|---|
refundId | Yes | string | Unique refund identifier in the merchant’s system. Same as in the request |
createdDateTime | Yes | string | Operation date and time |
amount | Yes | object | Operation amount |
status | Yes | object | Operation status |
flags | No | string(256) | Additional API commands.REVERSAL — card reversal operation was used for bank card operation |
Error Parameters¶
Parameter | Required | Type | Description |
---|---|---|---|
serviceName | Yes | string | Name of the service that produced the error |
errorCode | Yes | string | Error code |
description | Yes | string | Error description for the merchant |
userMessage | Yes | string | Error description for the customer |
dateTime | Yes | string | Error date and time |
traceId | Yes | string | Error Log unique ID |
cause | No | object | Description for the field validation error |