Skip to content

Retrieving Invoice Information

Gets details of an invoice. Invoice data and all its payments with requested billId are returned in successful response.

For scenarios using this method, please see “Decision on Transaction Success

Request

GET /payin/v1/sites/{siteId}/bills/{billId}/details

Path Parameters

Parameter Required Type Description
siteId Yes string Merchant site identifier
billId Yes string Unique invoice identifier in the Merchant’s system

Headers

Header Required Type Description
Authorization Yes string API access key. Bearer [access-token]
Accept No string Response content. application/json

Request Example

Retrieving Invoice Status
GET /partner/payin/v1/sites/site-01/bills/3a3d0286cefe645d2b11/details HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

Response

See also HTTP error codes

Successful Response Parameters

Parameter Required Type Description
billId Yes string Invoice unique identifier — the same as in the original request
invoiceUid Yes string(60) Invoice identifier on the QIWI side
amount Yes object Transaction amount
payments Yes array of objects List of payments for the invoice
expirationDateTime Yes string Invoice expiration date
status Yes string Invoice status
payUrl Yes string Payment Form URL
comment No string Service description for the customer
flags Нет array of string Additional API commaids in the original request
customer No object Customer information: account, email, phone
customFields No object Additional information for the operation: contractdId, invoice_callback_url, themeCode и др.

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

Response Examples

{
    "billId": "3a3d0286cefe645d2b11",
    "invoiceUid": "235d8d5a-38ed-11fc-9ab6-8b5a65d7e2f8",
    "amount": {
        "currency": "RUB",
        "value": "3000.00"
    },
    "expirationDateTime": "2023-05-07T19:25:36+03:00",
    "status": {
        "value": "PAID",
        "changedDateTime": "2023-04-07T19:28:12+03:00"
    },
    "comment": "Детская футбольная школа «Тигры»",
    "flags": [
        "SALE"
    ],
    "payUrl": "https://payment.qiwi.com/form?invoiceUid=235d8d5a-11ed-46fc-9ab6-8b5a65d7e2f8",
    "payments": [
        {
            "paymentId": "cd4a4ade-011e6-484d-87c8-40a7f48326fa",
            "billId": "3a3d0286cefe645d2b11",
            "createdDateTime": "2023-04-07T19:27:52+03:00",
            "amount": {
                "currency": "RUB",
                "value": "3000.00"
            },
            "capturedAmount": {
                "currency": "RUB",
                "value": "3000.00"
            },
            "refundedAmount": {
                "currency": "RUB",
                "value": "0.00"
            },
            "paymentMethod": {
                "type": "CARD",
                "maskedPan": "422264******1232",
                "rrn": "309711196151",
                "authCode": "231181"
            },
            "status": {
                "value": "COMPLETED",
                "changedDateTime": "2023-04-07T19:28:12+03:00"
            },
            "comment": "Детская футбольная школа «Тигры»",
            "customFields": {
                "auto_capture": "true",
                "invoice_creation_type": "PUBLIC_KEY"
            },
                "paymentCardInfo": {
                    "issuingCountry": "643",
                    "issuingBank": "Сбербанк России",
                    "paymentSystem": "VISA",
                    "fundingSource": "DEBIT",
                    "paymentSystemProduct": "N1|Visa Rewards"
                }
            },
            {
            "paymentId": "A30971626215731E01110841111138B2",
            "billId": "3a3d0286cefe645d2b11",
            "createdDateTime": "2023-04-07T19:26:21+03:00",
            "amount": {
                "currency": "RUB",
                "value": "3000.00"
            },
            "capturedAmount": {
                "currency": "RUB",
                "value": "3000.00"
            },
            "refundedAmount": {
                "currency": "RUB",
                "value": "0.00"
            },
            "paymentMethod": {
                "type": "SBP",
                "phone": "0079031232001"
            },
            "status": {
                "value": "DECLINED",
                "changedDateTime": "2023-04-07T19:26:23+03:00",
                "reason": "GATEWAY_INTEGRATION_ERROR",
                "reasonMessage": "I07999 OPKC_TECH_ERROR"
            },
            "comment": "Детская футбольная школа «Тигры»",
            "customFields": {
                "auto_capture": "true",
                "invoice_creation_type": "PUBLIC_KEY"
            }
        }
    ]
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2022-03-05T11:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}