Last update: 2017-10-12 | Edit on GitHub
Response may be in XML or JSON format, depending on "Accept" header in request.
Object with issuing invoice operation's result.
When you send two consecutive requests with the same {prv_id}, {bill_id} and amount parameters, you will get the same result code.<response>
<result_code>0</result_code>
<bill>
<bill_id>bill1234</bill_id>
<amount>99.95</amount>
<originAmount>99.95</originAmount>
<ccy>RUB</ccy>
<originCcy>RUB</originCcy>
<ccy>USD</ccy>
<status>paid<status>
<error>0</error>
<user>tel:+79161231212</user>
<comment>Invoice from ShopName</comment>
</bill>
</response><response>
<result_code>341</result_code>
<description>Authorization is failed</description>
</response>{
"response": {
"result_code": 0,
"bill": {
"bill_id": "BILL-1",
"amount": "10.00",
"originAmount": "10.00",
"ccy": "RUB",
"originCcy": "RUB",
"status": "paid",
"error": 0,
"user": "tel:+79031234567",
"comment": "test"
}
}}{
"response": {
"result_code": 341,
"description": "Authorization is failed"
}}| Parameter | Type | Description |
|---|---|---|
| result_code | Integer | Error code |
| description | String | Error description. Returned when result_code is non-zero. |
| bill | Object | Bill data. Returned when result_code is zero. Parameters: |
| bill.bill_id | String | Unique invoice identifier generated by the merchant |
| bill.amount | String | The invoice amount. The number is rounded down with two decimal places. |
| bill.originAmount | String | The amount taken from the balance when the inoice get paid (see originCcy parameter). The number is rounded down with two decimal places. Return for paid invoices only ("status": "paid") |
| bill.ccy | String | Currency identifier of the invoice (Alpha-3 ISO 4217 code) |
| bill.originCcy | String | Currency identifier of the balance from which the invoice get paid (Alpha-3 ISO 4217 code). Return for paid invoices only ("status": "paid") |
| bill.status | String | Current invoice status |
| bill.error | Integer | Only 0, means successful operation |
| bill.user | String | The Visa QIWI Wallet user’s ID, to whom the invoice is issued. It is the user’s phone number with "tel:" prefix. |
| bill.comment | String | Comment to the invoice |
Object with refund operation's result.
<response>
<result_code>0</result_code>
<refund>
<refund_id>122swbill</refund_id>
<amount>10.0</amount>
<status>processing<status>
<error>0</error>
</refund>
</response><response>
<result_code>341</result_code>
<description>Authorization is failed</description>
</response>{
"response": {
"result_code": 0,
"refund": {
"refund_id": 122swbill,
"amount": "10.0",
"status": "processing",
"error": 0
}
}}{
"response": {
"result_code": 341,
"description": "Authorization is failed"
}}| Parameter | Type | Description |
|---|---|---|
| result_code | Integer | Error code |
| description | String | Error description. Returned when result_code is non-zero. |
| refund | Object | Refund data. Returned when result_code is zero. Parameters: |
| refund.refund_id | String | The refund identifier, unique number in a series of refunds processed for a particular invoice |
| refund.amount | String | The actual amount of the refund. The positive number that is rounded down with two decimal places. |
| refund.status | String | Current refund status |
| refund.error | Integer | Error code. Important! When the amount of refund exceeds the initial invoice amount or the amount left after the previous refunds, error code 242 is returned. |