QIWI
Feedback
bss@qiwi.com
NAV Navbar
Examples

Payment Acceptance API

Doc version 1.2

The API is designed for processing payments within the Internet Acquiring product. For details on integrating internet acquiring using this API, see the «Integration Manuals» → «Internet Acquiring».

Interaction format

The Payment Acceptance API is based on the REST architecture, where data and methods are considered as resources accessed via calling Uniform Resource Identifiers (URIs).

Interaction with the API is conducted over a secure protocol (HTTPS). Only HTTPS requests are supported; HTTP requests over an unencrypted channel are not supported. Data in requests is transmitted in JSON format encoded in UTF-8, and responses also return data in JSON format encoded in UTF-8.

API methods ensure logical idempotence, meaning multiple calls to a method are equivalent to a single call. However, the server response may change; for example, the account balance may vary from request to request.

API URL

The constant part of the URL to make API calls:

https://b2b-api.qiwi.com/partner/

Authorization

Request with authorization

curl -X PUT \
  https://b2b-api.qiwi.com/partner/v1/sites/{site_id}/payments/{payment_id} \
  --oauth2-bearer <API Key>

Authorization header

Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9

For the requests authorization OAuth 2.0 standard is used in accordance with RFC 6750. Always put API access key value into Authorization HTTP-header as

Bearer <API Key>

Customer Card Verification

Merchant can use a verification service to check for customer's card details, its validity and availability for purchases. Funds on cardholder's account are not debited until card recurring is confirmed or payment transaction is initiated.

If card verification is passed successfully, card payment token can be issued for the card.

By default, access to the verification service is disabled. Contact your manager in QIWI Support to enable that.

How to use service with API

Request with card verification

PUT /partner/payin/v1/sites/site-01/validation/card/requests/acd7bf20-22e2-4cbf-a218-38d90e9f29b9 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
    "cardData": {
        "pan": "1111222233334444",
        "expiryDate": "12/34",
        "cvv2": "123",
        "holderName": "Super Man"
    },
    "tokenizationData": {
        "account": "cat_girl"
    }
}

Successful response body for a card without 3DS authentication

{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "SUCCESS",
    "isValidCard": true,
    "threeDsStatus": "WITHOUT",
    "checkOperationDate": "2025-03-25T12:55:12+03:00",
    "cardInfo": {
      "issuingCountry": "643",
      "issuingBank": "Gazprombank",
      "paymentSystem": "MIR",
      "fundingSource": "DEBIT",
      "paymentSystemProduct": "details"
    },
    "createdToken": {
      "token": "1a77343a-dd8a-11eb-ba80-0242ac130004",
      "name": "111122******4444",
      "expiredDate": "2034-12-31T00:00:00+03:00",
      "account": "cat_girl"
    }
}

Response with 3DS authentication

{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "WAITING_3DS",
    "requirements": {
        "pareq": "Some string pareq",
        "acsUrl": "http://xxxxxxx"
    }
}

Redirecting for 3-D Secure authentication

<form name="form" action="{ACSUrl}" method="post" >
        <input type="hidden" name="TermUrl" value="{TermUrl}" >
        <input type="hidden" name="MD" value="{MD}" >
        <input type="hidden" name="PaReq" value="{PaReq}" >
</form>

Response with verification error

{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "ERROR"
}

Request to finish 3DS in card verification

POST /partner/payin/v1/sites/site-01/validation/card/requests/acd7bf20-22e2-4cbf-a218-38d90e9f29b9/complete HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
    "pares": "Some string pares"
}

Response

{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "SUCCESS",
    "isValidCard": true,
    "threeDsStatus": "PASSED",
    "checkOperationDate": "2025-03-25T12:55:12+03:00",
    "cardInfo": {
      "issuingCountry": "643",
      "issuingBank": "Gazprombank",
      "paymentSystem": "MIR",
      "fundingSource": "DEBIT",
      "paymentSystemProduct": "details"
    },
    "createdToken": {
      "token": "1a77343a-dd8a-11eb-ba80-0242ac130004",
      "name": "111122******4444",
      "expiredDate": "2034-12-31T00:00:00+03:00",
      "account": "cat_girl"
    }
}
  1. Send "Card verification" API request. Put in the request:
    • Unique verification identifier (requestUid field in the request URL).
    • Card data (cardData in the request body). Required parameters — PAN, card expiration date, and CVV2.

    For payment token generation, set tokenizationData.account parameter to unique customer's identifier in the merchant's system.

  2. In the response, card verification result returns in isValidCard field (true means card can be charged). When isValidCard=true and payment token issue requested in step 1 JSON object createdToken is returned with payment token data.

  3. To make sure that the cardholder themselves entered card number, you can use 3-D Secure additional authentication in the card verification service. Contact to your bank to enable or disable 3-D Secure (3DS) procedure. If 3DS is enabled, you receive "requirements" object with ACS URL for customer redirect (in this case, status field has "WAITING_3DS" value).

Verification scenario is similar to payment operation:

  1. Redirect customer to authentication page.
  2. Finish 3-D Secure by "Complete 3DS on card verification" request. Specify the same requestUid from the initial card verification request.
  3. If 3-D Secure check is finished successfully, isValidCard field contains information about card validity (true means card can be charged). When isValidCard=true and payment token issue requested in the original "Card verification" request JSON object createdToken is returned with payment token data.

When verification finishes, you get CHECK_CARD notification with the result, or you can always get current card verification status by API request.

Card verification statuses

Status Description
INIT Reference URL to card verification form awaiting for customer action
SUCCESS Card verification is successful
ERROR Card erification error
WAITING_3DS Awaiting 3-D Secure authentication completion

Payment Token

In Payment protocol card payment tokens generation is supported. The tokens can be used for debiting cards without entering card details. On issuing payment token, card details are stored securely on QIWI side.

Features

By default, the issue of payment tokens is disabled. Contact your manager in QIWI Support to enable that.

Card payment token issue

Example of request with card verification

PUT /partner/payin/v1/sites/site-01/validation/card/requests/acd7bf20-22e2-4cbf-a218-38d90e9f29b9 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
    "cardData": {
        "pan": "1111222233334444",
        "expiryDate": "12/34",
        "cvv2": "123",
        "holderName": "Super Man"
    },
    "tokenizationData": {
        "account": "cat_girl"
    }
}

Example of successful response body for a card without 3DS authentication

{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "SUCCESS",
    "isValidCard": true,
    "threeDsStatus": "WITHOUT",
    "checkOperationDate": "2025-03-25T12:55:12+03:00",
    "cardInfo": {
      "issuingCountry": "643",
      "issuingBank": "Gazprombank",
      "paymentSystem": "MIR",
      "fundingSource": "DEBIT",
      "paymentSystemProduct": "details"
    },
    "createdToken": {
      "token": "1a77343a-dd8a-11eb-ba80-0242ac130004",
      "name": "111122******4444",
      "expiredDate": "2034-12-31T00:00:00+03:00",
      "account": "cat_girl"
    }
}

Example of request with invoice and payment token issue

PUT /partner/payin/v1/sites/23044/bills/893794793973 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
   "amount": {
     "currency": "RUB",
     "value": 10.00
   },
   "expirationDateTime": "2021-04-13T14:30:00+03:00",
    "customer": {
      "account":"token32"
   },
   "customFields": {},
   "flags":["BIND_PAYMENT_TOKEN"]
}

Example of payment request with payment token issue

PUT /partner/payin/v1/sites/test-01/payments/test-022 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
   "amount": {
     "currency": "RUB",
     "value": 2211.24
   },
   "customer": {
   	"account": "token324",
    "phone": "79022222222"
   },
   "flags":["BIND_PAYMENT_TOKEN"]
}

Example of response with payment token

{
    "paymentId": "test-022",
    "billId": "autogenerated-c4479bb1-c916-4fba-8445-802592fa8d51",
    "createdDateTime": "2020-03-26T12:22:12+03:00",
    "amount": {
        "currency": "RUB",
        "value": 2211.24
    },
    "capturedAmount": "..",
    "refundedAmount": "..",
    "paymentMethod": "..",
    "createdToken": {
        "token": "66aebf5f-098e-4e36-922a-a4107b349a96",
        "name": "411111******1111"
    },
    "customer": {
        "account": "token324",
        "phone": "79022222222"
    },
    "status": ".."
}

Include an additional option in the API request Card verification:

To secure card data, use different account values for different clients.

You will receive the card payment token details:

Or include additional options in the API request Payment or Invoice, depending on which API you use:

To secure card data, use different account values for different clients.

You will receive the card payment token details:

Disabling the payment token

To disable a payment token, make a Payment token deletion API request. In the JSON-body of the request specify the parameters:

A successful response means that the payment token for the specified customer is no longer valid.

Server Notifications

PAYMENT Notification Format

PAYMENT notification body

{
  "payment": {
    "paymentId": "A22170834426031500000733E625FCB3",
    "customFields": {},
    "type": "PAYMENT",
    "createdDateTime": "2022-08-05T11:34:42+03:00",
    "status": {
      "value": "SUCCESS",
      "changedDateTime": "2022-08-05T11:34:44+03:00"
    },
    "amount": {
      "value": 5,
      "currency": "RUB"
    },
    "paymentMethod": {
      "type": "SBP",
      "phone": "79111112233"
    },
    "merchantSiteUid": "test-00",
    "customer": {
      "phone": "0",
      "bankAccountNumber": "4081710809561219555",
      "bic": "044525974",
      "lastName": "IVANOV",
      "firstName": "IVAN",
      "middleName": "IVANOVICH",
      "simpleAddress": "",
      "bankMemberId": "100000000008"
    },
    "billId": "autogenerated-6cd20922-b1d0-4e67-ba61-e2b7310c4006",
    "flags": [
      "SALE"
    ]
  },
  "type": "PAYMENT",
  "version": "1"
}
Notification field Description Type When present
payment Payment information Object Always
payment.
type
Operation type String(200) Always
payment.
paymentId
Payment operation identifier in RSP's system String(200) Always
payment.
createdDateTime
System date of the operation creation URL-encoded string
YYYY-MM-DDThh:mm:ss
Always
payment.
billId
Corresponding invoice ID for the operation String(200) Always
payment.
qrCodeUid
QR-code issue operation identifier in RSP's system String In case of operation with Faster Payment System
payment.
amount
Object Operation amount data Always
payment.
amount.
value
Operation amount rounded down to two decimals Number(6.2) Always
payment.
amount.
currency
Operation currency (Code: Alpha-3 ISO 4217) String(3) Always
payment.
status
Operation status data Object Always
payment.
status.
value
Operation status value String Always
payment.
status.
changedDatetime
Date of operation status update URL-encoded string
YYYY-MM-DDThh:mm:ssZ
Always
payment.
status.
reasonCode
Rejection reason code String(200) In case of operation rejection
payment.
status.
reasonMessage
Rejection reason description String(200) In case of operation rejection
payment.
status.
errorCode
Error code Number In case of error
payment.
paymentMethod
Payment method data Object Always
payment.
paymentMethod.
type
Payment method type: CARD — bank card, TOKEN — payment token, SBP — Fast Payments System String Always
payment.
paymentMethod.
paymentToken
Card payment token String When payment token is used for the payment
payment.
paymentMethod.
maskedPan
Masked card PAN String When card or payment token is used for the payment
payment.
paymentMethod.
rrn
Payment RRN (ISO 8583) Number When card or payment token is used for the payment
payment.
paymentMethod.
authCode
Payment Auth code Number When card or payment token is used for the payment
payment.
paymentMethod.
phone
Phone number linked to the customer's card String When paying through Fast Payments System
payment.
paymentCardInfo
Card information Object Always
payment.
paymentCardInfo.
issuingCountry
Issuer country code String(3) Always
payment.
paymentCardInfo.
issuingBank
Issuer name String Always
payment.
paymentCardInfo.
paymentSystem
Card's payment system String Always
payment.
paymentCardInfo.
fundingSource
Card's type (debit/credit/..) String Always
payment.
paymentCardInfo.
paymentSystemProduct
Card's category String Always
payment.
credentialOnFile
Information about tokenized card Object When tokenized card is used in the payment
payment.
credentialOnFile.
type
Payment operation type: CREDENTIAL_ON_FILE — operation with saved card details initiated by the card holder, CREDENTIAL_CAPTURED — operation where card details are saved for future payments, RECURRING — debiting operation initiated by the merchant with saved card details, INSTALLMENT — debiting operation initiated by the merchant with saved card details (MCC 6538 code only) String When tokenized card is used in the payment
payment.
credentialOnFile.
trn
Identifier of the transaction when card was saved String When tokenized card is used in the payment
payment.
merchantSiteUid
Merchant ID String Always
payment.
customer
Customer data Object Always
payment.
customer.
phone
Customer phone number String Always
payment.
customer.
email
Customer e-mail String Always
payment.
customer.
account
Customer ID in RSP system String Always
payment.
customer.
ip
Customer IP address String Always
payment.
customer.
country
Customer country from address string String Always
payment.
customer.
bankAccountNumber
Payer's bank account number String When paying through Fast Payments System
payment.
customer.
bic
Issuer BIC String When paying through Fast Payments System
payment.
customer.
lastName
Customer's last name String When paying through Fast Payments System
payment.
customer.
firstName
Customer's first name String When paying through Fast Payments System
payment.
customer.
middleName
Customer's middle name String When paying through Fast Payments System
payment.
customer.
simpleAddress
Customer's address String When paying through Fast Payments System
payment.
customer.
inn
Customer's TIN String When paying through Fast Payments System
payment.
customer.
bankMemberId
Customer's bank identifier String When paying through Fast Payments System
payment.
customFields
Fields with additional information for the operation Object Always
payment.
customFields.
cf1
Extra field with some information to operation data String(256) Always
payment.
customFields.
cf2
Extra field with some information to operation data String(256) Always
payment.
customFields.
cf3
Extra field with some information to operation data String(256) Always
payment.
customFields.
cf4
Extra field with some information to operation data String(256) Always
payment.
customFields.
cf5
Extra field with some information to operation data String(256) Always
payment.
flags
Additional API commands Array of Strings. Possible elements: SALE, REVERSAL Always
payment.
tokenData
Payment token data Object When payment token issue was requested
payment.
tokenData.
paymentToken
Card payment token String When payment token issue was requested
payment.
tokenData.
expiredDate
Payment token expiration date. ISO-8601 Date format:
YYYY-MM-DDThh:mm:ss±hh:mm
String When payment token issue was requested
payment.
settlementAmount
Merchant's settlement data Object If payment currency and merchant settlement currency are different
payment.
settlementAmount.
value
Merchant's settlement amount Number(6.2) If payment currency and merchant settlement currency are different
payment.
settlementAmount.
currency
Merchant's settlement currency identifier (Alpha-3 ISO 4217 code) String(3) If payment currency and merchant settlement currency are different
type Notification type (PAYMENT) String(200) Always
version Notification version String Always

CAPTURE Notification Format

CAPTURE notification body

{
  "capture": {
    "paymentId": "A22170834426031500000733E625FCB3",
    "captureId": "B33180934426031511100733DG332XTQ1",
    "customFields": {},
    "type": "CAPTURE",
    "createdDateTime": "2022-08-06T11:34:42+03:00",
    "status": {
      "value": "SUCCESS",
      "changedDateTime": "2022-08-06T12:55:44+03:00"
    },
    "amount": {
      "value": 5,
      "currency": "RUB"
    },
    "paymentMethod": {
      "type": "CARD",
      "maskedPan": "54************47",
      "cardHolder": null,
      "cardExpireDate": "12/2024"
    },
    "merchantSiteUid": "test-00",
    "customer": {},
    "billId": "autogenerated-6cd20922-b1d0-4e67-ba61-e2b7310c4006",
    "flags": []
  },
  "type": "CAPTURE",
  "version": "1"
}
Notification field Description Type  
capture Capture information Object  
capture.
type
Operation type String(200)  
capture.
paymentId
Payment operation identifier in RSP's system String(200)  
capture.
captureId
Capture operation identifier in RSP's system String(200)  
capture.
createdDateTime
System date of the operation creation URL-encoded string
YYYY-MM-DDThh:mm:ss
 
capture.
amount
Object Operation amount data  
capture.
amount.
value
Operation amount rounded down to two decimals Number(6.2)  
capture.
amount.
currency
Operation currency (Code: Alpha-3 ISO 4217) String(3)  
capture.
billId
Corresponding invoice ID for the operation String(200)  
capture.
status
Operation status data Object  
capture.
status.
value
Operation status value String  
capture.
status.
changedDatetime
Date of operation status update URL-encoded string
YYYY-MM-DDThh:mm:ssZ
 
capture.
status.
reasonCode
Rejection reason code String(200)  
capture.
status.
reasonMessage
Rejection reason description String(200)  
capture.
status.
errorCode
Error code Number  
capture.
paymentMethod
Payment method data Object  
capture.
paymentMethod.
type
Payment method type String  
capture.
paymentMethod.
maskedPan
Masked card PAN String  
capture.
paymentMethod.
rrn
Payment RRN (ISO 8583) Number  
capture.
paymentMethod.
authCode
Payment Auth code Number  
capture.
merchantSiteUid
Merchant ID String  
capture.
customer
Customer data Object  
capture.
customer.
phone
Customer phone number String  
capture.
customer.
email
Customer e-mail String  
capture.
customer.
account
Customer ID in RSP system String  
capture.
customer.
ip
Customer's IP address String  
capture.
customer.
country
Customer country from address string String  
capture.
customFields
Fields with additional information for the operation Object  
capture.
customFields.
cf1
Extra field with some information to operation data String(256)  
capture.
customFields.
cf2
Extra field with some information to operation data String(256)  
capture.
customFields.
cf3
Extra field with some information to operation data String(256)  
capture.
customFields.
cf4
Extra field with some information to operation data String(256)  
capture.
customFields.
cf5
Extra field with some information to operation data String(256)  
capture.
settlementAmount
Merchant's settlement data Object If payment currency and merchant settlement currency are different
capture.
settlementAmount.
value
Merchant's settlement amount Number(6.2) If payment currency and merchant settlement currency are different
capture.
settlementAmount.
currency
Merchant's settlement currency identifier (Alpha-3 ISO 4217 code) String(3) If payment currency and merchant settlement currency are different
capture.
flags
Additional API commands Array of Strings. Possible elements: SALE, REVERSAL  
type Notification type (CAPTURE) String(200)  
version Notification version String  

REFUND Notification Format

REFUND notification body

{
    "refund": {
        "paymentId": "A22170834426031500000733E625FCB3",
        "refundId": "42f5ca91-965e-4cd0-bb30-3b64d9284048",
        "type": "REFUND",
        "createdDateTime": "2021-02-05T11:31:40+03:00",
        "status": {
            "value": "SUCCESS",
            "changedDateTime": "2021-02-05T11:31:40+03:00"
        },
        "amount": {
            "value": 3,
            "currency": "RUB"
        },
        "paymentMethod": {
            "type": "TOKEN",
            "paymentToken": "1620161e-d498-431b-b006-c52bb78c6bf2",
            "maskedPan": null,
            "cardHolder": null,
            "cardExpireDate": null
        },
        "merchantSiteUid": "test-00",
        "customer": {
            "email": "glmgmmxr@qiwi123.com",
            "account": "sbderxuftsrt",
            "phone": "13387571067",
            "country": "yccsnnfjgthu",
            "city": "sqdvseezbpzo",
            "region": "shbvyjgspjvu"
        },
        "gatewayData": {
            "type": "ACQUIRING",
            "authCode": "181218",
            "rrn": "123"
        },
        "billId": "autogenerated-19cf2596-62a8-47f2-8721-b8791e9598d0",
        "flags": [
            "REVERSAL"
        ]
    },
    "type": "REFUND",
    "version": "1"
}
Notification field Description Type When present
refund Refund information Object Always
refund.
type
Operation type String(200) Always
refund.
paymentId
Original payment operation identifier in RSP's system String(200) Always
refund.
refundId
Refund operation identifier in RSP's system String(200) Always
refund.
createdDateTime
System date of the operation creation URL-encoded string
YYYY-MM-DDThh:mm:ss
Always
refund.
amount
Object Operation amount data Always
refund.
amount.
value
Operation amount rounded down to two decimals Number(6.2) Always
refund.
amount.
currency
Operation currency (Code: Alpha-3 ISO 4217) String(3) Always
refund.
billId
Corresponding invoice ID for the operation String(200) Always
refund.
status
Operation status data Object Always
refund.
status.
value
Operation status value String Always
refund.
status.
changedDatetime
Date of operation status update URL-encoded string
YYYY-MM-DDThh:mm:ssZ
Always
refund.
status.
reasonCode
Rejection reason code String(200) In case of operation rejection
refund.
status.
reasonMessage
Rejection reason description String(200) In case of operation rejection
refund.
status.
errorCode
Error code Number In case of error
refund.
paymentMethod
Payment method data Object Always
refund.
paymentMethod.
type
Payment method type String Always
refund.
paymentMethod.
maskedPan
Masked card PAN String IAlways
refund.
paymentMethod.
rrn
Payment RRN (ISO 8583) Number Always
refund.
paymentMethod.
authCode
Payment Auth code Number Always
refund.
merchantSiteUid
Merchant ID String Always
refund.
customer
Customer data Object Always
refund.
customer.
phone
Customer phone number String Always
refund.
customer.
email
Customer e-mail String Always
refund.
customer.
account
Customer ID in RSP system String Always
refund.
customer.
ip
Customer IP address String Always
refund.
customer.
country
Customer country from address string String Always
refund.
customFields
Fields with additional information for the operation Object Always
refund.
customFields.
cf1
Extra field with some information to operation data String(256) Always
refund.
customFields.
cf2
Extra field with some information to operation data String(256) Always
refund.
customFields.
cf3
Extra field with some information to operation data String(256) Always
refund.
customFields.
cf4
Extra field with some information to operation data String(256) Always
refund.
customFields.
cf5
Extra field with some information to operation data String(256) Always
refund.
flags
Additional API commands Array of Strings. Possible elements: SALE, REVERSAL Always
refund.
settlementAmount
Merchant's settlement data Object If payment currency and merchant settlement currency are different
refund.
settlementAmount.
value
Merchant's settlement amount Number(6.2) If payment currency and merchant settlement currency are different
refund.
settlementAmount.
currency
Merchant's settlement currency identifier (Alpha-3 ISO 4217 code) String(3) If payment currency and merchant settlement currency are different
type Notification type (REFUND) String(200) Always
version Notification version String Always

CHECK_CARD Notification Format

CHECK_CARD notification example

{
    "checkPaymentMethod": {
        "status": "SUCCESS",
        "isValidCard": true,
        "threeDsStatus": "PASSED",
        "cardInfo": {
            "issuingCountry": "RUS",
            "issuingBank": "Альфа-банк",
            "paymentSystem": "MASTERCARD",
            "fundingSource": "PREPAID",
            "paymentSystemProduct": "TNW|TNW|Mastercard® New World—Immediate Debit|TNW|Mastercard New World-Immediate Debit"
        },
        "createdToken": {
            "token": "7653465767c78-a979-5bae621db96f",
            "name": "54**********47",
            "expiredDate": "2022-12-30T00:00:00+03:00",
            "account": "acc1"
        },
        "requestUid": "uuid1-uuid2-uuid3-uuid4",
        "paymentMethod": {
            "type": "CARD",
            "maskedPan": "54************47",
            "cardHolder": null,
            "cardExpireDate": "12/2022"
        },
        "checkOperationDate": "2021-08-16T14:15:07+03:00",
        "merchantSiteUid": "test-00"
    },
    "type": "CHECK_CARD",
    "version": "1"
}
Notification field Description Type
checkPaymentMethod Card verification result Object
checkPaymentMethod.
checkOperationDate
System date of the operation URL-encoded string
YYYY-MM-DDThh:mm:ssZ
checkPaymentMethod.
requestUid
Card verification operation identifier String(200)
checkPaymentMethod.
status
Card verification status String
checkPaymentMethod.
isValidCard
true means card can be charged Bool
checkPaymentMethod.
threeDsStatus
Information on customer authentication status. Possible values: PASSED (3-D Secure passed), NOT_PASSED (3-D Secure not passed), WITHOUT (3-D Secure not required) String
checkPaymentMethod.
paymentMethod
Payment method data Object
checkPaymentMethod.
paymentMethod.
type
Payment method type String
checkPaymentMethod.
paymentMethod.
maskedPan
Masked card PAN String
checkPaymentMethod.
paymentMethod.
cardExpireDate
Card expiration date (MM/YY) String
checkPaymentMethod.
paymentMethod.
cardHolder
Cardholder name String
checkPaymentMethod.
cardInfo
Card information Object
checkPaymentMethod.
cardInfo.
issuingCountry
Issuer country code String(3)
checkPaymentMethod.
cardInfo.
issuingBank
Issuer name String
checkPaymentMethod.
cardInfo.
paymentSystem
Card's payment system String
checkPaymentMethod.
cardInfo.
fundingSource
Card's type (debit/credit/..) String
checkPaymentMethod.
cardInfo.
paymentSystemProduct
Card's category String
checkPaymentMethod.
createdToken
Payment token data Object
checkPaymentMethod.
createdToken.
token
Card payment token String
checkPaymentMethod.
createdToken.
name
Masked card PAN for which payment token issued String
checkPaymentMethod.
createdToken.
expiredDate
Payment token expiration date. ISO-8601 Date format:
YYYY-MM-DDThh:mm:ss±hh:mm
String
checkPaymentMethod.
createdToken.
account
Customer account for which payment token issued String
checkPaymentMethod.
merchantSiteUid
Merchant ID String
type Notification type String(200)
version Notification version String

TOKEN Notification format

Notification about successful FPS token issue

{
  "token": {
    "status": {
      "value": "CREATED",
      "changedDateTime": "2023-01-01T10:00:00+03:00"
    },
    "merchantSiteUid": "test-00",
    "account": "test",
    "value": "d28a4ff8-548d-4536-927d-fc01123bebbf",
    "expiredDate": "2029-01-01T10:00:00+03:00",
    "tokenizationSource": {
      "type": "QR_CODE",
      "uid": "100220001"
    },
    "bankMemberId": "100000000008"
  },
  "type": "TOKEN",
  "version": "1"
}

Notification on unsuccessful FPS token issue

{
  "token": {
    "status": {
      "value": "REJECTED",
      "changedDateTime": "2023-01-01T10:00:00+03:00"
    },
    "merchantSiteUid": "test-00",
    "account": "test",
    "tokenizationSource": {
      "type": "QR_CODE",
      "uid": "14012000011"
    }
  },
  "type": "TOKEN",
  "version": "1"
}
Notification field Description Type When present
token Token data Object Always
token.
status
Operation status data Object Always
token.
status.
value
Status value String Always
token.
status.
changedDateTime
Status change data URL-encoded string
YYYY-MM-DDThh:mm:ssZ
Always
token.
status.
rejectReason
Rejection reason String When operation is rejected
token.
merchantSiteUid
Merchant site ID String Always
token.
account
Client identifier specified in payment token request String Always
token.
value
Payment token value String When operation is successful
token.
expiredDate
Payment token expiration date. Date format is according to ISO-8601: YYYY-MM-DDThh:mm:ss±hh:mm String When operation is successful
token.
tokenizationSource
Tokenization source data Object Always
token.
tokenizationSource.
type
Tokenization source type String Always
token.
tokenizationSource.
uid
Tokenization source ID String Always
token.
bankMemberId
Client's bank identifier String В случае успешной операции
type Notification type String Always
version Notification version String Always

Operation types

Operation type is returned in {operation}.type field of the notification.

Operation type Description
PAYMENT The payment. There can be field flag: [ "SALE" ] (one-step payment) or flag: [ "AUTH" ] (two-step payment with holding funds) in the notification.
CAPTURE Operation of the payment confirmation.
REFUND Operation of the refund. There can be field flag: [ "REVERSAL" ] in the notification. It means that there was no financial operation (charging from customer's account) and commission fee would not be hold.

Operation statuses

Operation status reflects its current state.

API responses

API returns synchronous status of the operation in the field status.value of the response.

Status in notifications is in the field {operation}.status.value.

In the following table all possible statuses and corresponding operation types, where each status is used.

Operation status Operation type Status description
PAYMENT WAITING Awaiting for 3DS authentication
PAYMENT DECLINED Request for authorization is rejected (in synchronous responses)
PAYMENT DECLINE Request for authorization is rejected (in asynchronous responses)
REFUND DECLINE Request for refund is rejected
CAPTURE DECLINE Request for payment confirmation is rejected
CAPTURE DECLINED Request for payment confirmation is rejected (in API response to the status request)
PAYMENT COMPLETED Request for authorization is successfully processed
REFUND COMPLETED Request for refund is successfully processed
CAPTURE COMPLETED Request for payment confirmation is successfully processed

Notifications

Status in notifications is in the field {operation}.status.value.

In the following table all possible statuses and corresponding operation types, where each status is used.

Operation type Operation status Status description
PAYMENT DECLINE Request for authorization is rejected
REFUND DECLINE Request for refund is rejected
CAPTURE DECLINE Request for payment confirmation is rejected
PAYMENT SUCCESS Request for authorization is successfully processed
REFUND SUCCESS Request for refund is successfully processed
CAPTURE SUCCESS Request for payment confirmation is successfully processed

Errors

Error codes

The Payment Protocol uses the following HTTP-codes of errors for API requests:

Error Code Meaning
400 Bad Request — Client request is invalid (error in request' data or format).
401 Unauthorized — Client API access key is wrong.
403 Forbidden — Access to API is forbidden.
404 Not Found — The specified resource could not be found.
405 Method Not Allowed — You tried to create a payment with an invalid method.
406 Not Acceptable — Client request' data format isn't JSON.
410 Gone — The resource requested has been removed from our servers.
429 Too Many Requests — You are sending requests too frequently.
500 Internal Server Error — We had a problem with our server. Try again later. If response body is empty, repeat the request with the same parameters. If the body is non-empty, make payment status request/invoice status request.
502 Bad Gateway — No connection to service
503 Service Unavailable — We're temporarily offline for maintenance. Please try again later.

API errors reference

API errors describe a reason for rejection of the operation. API errors are present:

Some API errors are accompanied by details with recommended troubleshooting in the status.psErrorCode field.

API error Description
INVALID_STATE Incorrect transaction status
INVALID_AMOUNT Incorrect payment amount
INVALID_RECEIVER_DATA Error on transmitting receiver data
DECLINED_BY_MPI Rejected by MPI
DECLINED_BY_FRAUD Rejected by fraud monitoring
REATTEMPT_NOT_PERMITTED Re-attempting authorization request is forbidden due to a Payment system rules
REATTEMPT_NOT_PERMITTED_BY_PS Operation rejected by Payment system. Error details with recommended troubleshooting are in the status.psErrorCode field. Re-attempting the operation is not possible for the card
GATEWAY_INTEGRATION_ERROR Acquirer integration error
GATEWAY_TECHNICAL_ERROR Technical error on acquirer side
ACQUIRING_MPI_TECH_ERROR Technical error on 3DS authentication
ACQUIRING_GATEWAY_TECH_ERROR Technical error
ACQUIRING_ACQUIRER_ERROR Technical error
ACQUIRING_AUTH_TECHNICAL_ERROR Error on funds authorization
ACQUIRING_ISSUER_NOT_AVAILABLE Issuer error. Issuer is not available at the moment
ACQUIRING_SUSPECTED_FRAUD Issuer error. Fraud suspicion
ACQUIRING_LIMIT_EXCEEDED Issuer error. Some limit exceeded
ACQUIRING_NOT_PERMITTED Issuer error. Operation not allowed
ACQUIRING_INCORRECT_CVV Issuer error. Incorrect CVV
ACQUIRING_EXPIRED_CARD Issuer error. Incorrect card expiration date
ACQUIRING_INVALID_CARD Issuer error. Verify card data
ACQUIRING_INSUFFICIENT_FUNDS Issuer error. Not enough funds
ACQUIRING_UNKNOWN Unknown error
BILL_ALREADY_PAID Invoice is already paid
PAYIN_PROCESSING_ERROR Payment processing error
PAYMENT_EXPIRED_3DS 3-D Secure authentication not passed
TRY_AGAIN_LATER Repeat the request later

Error detail codes

Error detail code with recommended action from a Payment system is returned in the status.psErrorCode field of the response.

Code Corresponding API error Error details and recommended troubleshooting
03 REATTEMPT_NOT_PERMITTED_BY_PS Operation with this MCC forbidden by the card issuer
04 REATTEMPT_NOT_PERMITTED_BY_PS Card blocked
05 ACQUIRING_NOT_PERMITTED The transaction was rejected due to other reasons
12 REATTEMPT_NOT_PERMITTED_BY_PS Operation of that type forbidden by Rules and Standards of a Payment system
13 ACQUIRING_NOT_PERMITTED Incorrect amount. Repeat the operation with a different amount
14 ACQUIRING_NOT_PERMITTED Incorrect card number. Enter correct number or use another card
15 REATTEMPT_NOT_PERMITTED_BY_PS There is no issuer for the card
30 ACQUIRING_NOT_PERMITTED Operation rejected. Contact QIWI support to get additional information
33 REATTEMPT_NOT_PERMITTED_BY_PS Card is not available for use
41 REATTEMPT_NOT_PERMITTED_BY_PS Card is not available for use
43 REATTEMPT_NOT_PERMITTED_BY_PS Card is not available for use
51 ACQUIRING_INSUFFICIENT_FUNDS The Client might be recommended to repeat the operation after account replenishment
54 ACQUIRING_EXPIRED_CARD The expiration date of the card is missing or transmitted incorrectly
57 REATTEMPT_NOT_PERMITTED_BY_PS This type of operation is not available for the card
58 REATTEMPT_NOT_PERMITTED_BY_PS This type of operation is not available for the acquirer
61 ACQUIRING_LIMIT_EXCEEDED The Client may be recommended to try the transaction again on another day — after the Issuer resets the limit on the total amount of transactions of this type
62 REATTEMPT_NOT_PERMITTED_BY_PS The transaction is not available due to restrictions on the card or account of the Cardholder
63 ACQUIRING_NOT_PERMITTED The transaction was rejected, contact Qiwi support for more information
65 ACQUIRING_LIMIT_EXCEEDED The Client may be recommended to retry the transaction on another day — after the Issuer resets the limit on the total number of transactions of this type
75 ACQUIRING_INCORRECT_CVV The transaction was rejected due to incorrect PIN code entered earlier
76 REATTEMPT_NOT_PERMITTED_BY_PS Rejecting the cancellation of a request due to the absence of the original request
78 REATTEMPT_NOT_PERMITTED_BY_PS Denying a request due to an attempt to use an inactive card
86 ACQUIRING_INCORRECT_CVV The transaction was rejected due to incorrect PIN code entered earlier
88 ACQUIRING_AUTH_TECHNICAL_ERROR The transaction was rejected due to cryptography error, can occur due to incorrect CVV2/CVC2
91 ACQUIRING_ISSUER_NOT_AVAILABLE The Client may be advised to retry the transaction at another time – after the Issuer recovers the functioning
92 REATTEMPT_NOT_PERMITTED_BY_PS Rejection by the Payment System due to the impossibility of carrying out the transaction
93 REATTEMPT_NOT_PERMITTED_BY_PS Denial of a request due to violation of legal requirements
94 REATTEMPT_NOT_PERMITTED_BY_PS Rejecting a duplicate request
96 ACQUIRING_NOT_PERMITTED The Client may be advised to retry the transaction at another time – after the Issuer ot the Platform recovers the functioning
TS REATTEMPT_NOT_PERMITTED_BY_PS Rejection of the request due to cancellation of the Cardholder's long-term order
CB ACQUIRING_ACQUIRER_ERROR The transaction was rejected due to incorrect date of birth of the Cardholder
CD REATTEMPT_NOT_PERMITTED_BY_PS The transaction was rejected due to death of the Cardholder

Rules for working with detailed information

There are two groups of error codes:

According to the NSPC rules, the following conditions for repeating transactions with non-3DS authorization on MIR cards are applied

Restrictions apply to the final recipient, if we have received the corresponding response codes.

API Method Reference

Сreation an Invoice

{
   "amount": {
     "currency": "RUB",
     "value": 100.00
   },
   "billPaymentMethodsType": [
      "SBP"
   ],
   "comment": "Text comment",
   "expirationDateTime": "2024-03-13T14:30:00+03:00",
   "customer": {},
   "customFields": {
    "cf1": "Some data"
   }
}
{
    "billId": "893794793973",
    "invoiceUid": "d875277b-6f0f-445d-8a83-f62c7c07be77",
    "amount": {
      "value": "100.00",
      "currency": "RUB"
    },
    "status": {
      "value": "CREATED",
      "changedDateTime": "2024-03-05T11:27:41"
    },
    "comment": "Text comment",
    "customFields": {
      "cf1": "Some data"
    },
    "creationDateTime": "2024-03-05T11:27:41",
    "expirationDateTime": "2024-03-13T14:30:00",
    "payUrl": "https://payment.qiwi.com/form/?invoice_uid=d875277b-6f0f-445d-8a83-f62c7c07be77"
}

Response when the invoice exists and has been already expired

{
 "billId": "12345",
 "invoiceUid": "3b39ad6d-f111-401d-8108-ed11af920a65",
 "amount": {
   "currency": "RUB",
   "value": "1.00"
 },
 "expirationDateTime": "2023-03-21T13:02:00+03:00",
 "status": {
   "value": "EXPIRED",
   "changedDateTime": "2023-03-21T13:02:00+03:00"
 },
 "comment": "Text comment",
 "flags": [
   "TEST"
 ],
 "payUrl": "https://payment.qiwi.com/form?invoiceUid=3b39ad6d-f211-401d-8008-ed11af920a65"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Retrieving Invoice Information

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
{
    "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-05T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}

Retrieving a List of Invoice Payments

GET /partner/payin/v1/sites/site-01/bills/3a3d0286cefe645d2b11 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
[
    {
        "paymentId": "cd4a4ade-12e6-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": "309711234151",
            "authCode": "232481"
        },
        "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": "A30971626215731E000008415C2D38B2",
        "billId": "3a3d0286cefe645d2b00",
        "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": "0079099922001"
        },
        "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" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}

Creating a Payment

PUT /partner/payin/v1/sites/test-01/payments/1811 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "billId": "testBillId28",
   "amount": {
    "currency": "RUB",
    "value": 200.00
  },
 "paymentMethod" : {
    "type" : "CARD",
    "pan" : "4444443616621049",
    "expiryDate" : "12/19",
    "cvv2" : "123",
    "holderName" : "CARDHOLDER NAME",
    "cardTokenPaymentType" : "INSTALLMENT",
    "firstTransaction" : {
      "paymentId" : "testPaymentId28"
    }
  },
  "customer": {
    "account": "string",
    "address": {
      "city": "Moscow",
      "country": "Russian Federation",
      "details": "Severnoe chertanovo microdistrict 1a 1",
      "region": "Moscow city"
    },
    "email": "customer@example.com",
    "phone": "+79991234567"
  },
  "deviceData": {
    "datetime": "2017-09-03T14:30:00+03:00",
    "fingerprint": "TW96aWxsYS81LjAgKHBsYXRmb3JtOyBydjpnZWNrb3ZlcnNpb24p",
    "ip": "127.0.0.1",
    "screenResolution": "1280x1024",
    "timeOnPage": 1440,
    "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion"
  },
  "callbackUrl": "https://example.com/callbacks",
  "comment": "Example payment",
  "customFields": {
    "cf1": "Some data"
  },
  "flags": [
    "SALE"
  ]
}
{
  "paymentId" : "223E",
  "createdDateTime" : "2024-03-01T17:10:31.284+03:00",
  "amount" : {
    "currency" : "RUB",
    "value" : "200.00"
  },
  "capturedAmount" : {
    "currency" : "RUB",
    "value" : "0.00"
  },
  "refundedAmount" : {
    "currency" : "RUB",
    "value" : "0.00"
  },
  "paymentMethod" : {
    "type" : "CARD",
    "maskedPan" : "444444******1049"
  },
  "customer" : { },
  "deviceData" : { },
  "requirements" : {
    "threeDS" : {
      "pareq" : "eJyrrgUAAXUA+Q==",
      "acsUrl" : "https://test.paymentgate.ru/acs/auth/start.do"
    }
  },
  "status" : {
    "value" : "WAITING",
    "changedDateTime" : "2024-03-01T17:10:32.607+03:00"
  },
  "paymentCardInfo": {
    "issuingCountry": "810",
    "issuingBank": "QiwiBank",
    "paymentSystem": "VISA",
    "fundingSource": "CREDIT",
    "paymentSystemProduct": "P|Visa Gold"
  },
  "callbackUrl": "https://example.com/callbacks",
  "customFields" : {
    "cf1": "Some data"
  },
  "flags" : [ ]
}
{
  "serviceName":"payin-core",
  "errorCode":"validation.error",
  "description":"Validation error",
  "userMessage":"Validation error",
  "dateTime":"2022-11-13T16:49:59.166+03:00",
  "traceId":"fd0e2a08c63ace83",
  "cause":{
    "paymentToken": [
      "Exchange token error. Token disabled, please create new one"
    ]
  }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Retrieving Payment Information

GET /partner/payin/v1/sites/test-01/payments/1811 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
{
  "amount" : {
    "currency" : "RUB",
    "value" : "200.00"
  },
  "capturedAmount" : {
    "currency" : "RUB",
    "value" : "0.00"
  },
  "refundedAmount" : {
    "currency" : "RUB",
    "value" : "0.00"
  },
  "paymentMethod" : {
    "type" : "CARD",
    "maskedPan" : "444444******1049",
    "rrn": "124",
    "authCode": "182817",
  },
  "createdDateTime" : "2024-03-01T17:10:31.284+03:00",
  "customer" : { },
  "deviceData" : { },
  "requirements" : {
    "threeDS" : {
      "pareq" : "eJyrrgUAAXUA+Q==",
      "acsUrl" : "https://test.paymentgate.ru/acs/auth/start.do"
    }
  },
  "status" : {
    "value" : "WAITING",
    "changedDateTime" : "2024-03-01T17:10:32.607+03:00"
  },
  "customFields" : { },
  "flags" : [ ]
}
{
  "serviceName":"payin-core",
  "errorCode":"validation.error",
  "description":"Validation error",
  "userMessage":"Validation error",
  "dateTime":"2022-11-13T16:49:59.166+03:00",
  "traceId":"fd0e2a08c63ace83",
  "cause":{
    "paymentToken": [
      "Exchange token error. Token disabled, please create new one"
    ]
  }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Completing customer authentication

POST /partner/payin/v1/sites/test-01/payments/1811/complete HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "threeDS": {
    "pares": "eJzVWFevo9iyfu9fMZrzaM0QjWHk3tIiGptgooE3cgabYMKvv3jvTurTc3XOfbkaJMuL...."
  }
}
{
  "paymentId" : "223E",
  "createdDateTime" : "2024-03-01T17:10:31.284+03:00",
  "amount" : {
    "currency" : "RUB",
    "value" : "200.00"
  },
  "capturedAmount" : {
    "currency" : "RUB",
    "value" : "0.00"
  },
  "refundedAmount" : {
    "currency" : "RUB",
    "value" : "0.00"
  },
  "paymentMethod" : {
    "type" : "CARD",
    "maskedPan" : "444444******1049"
  },
  "customer" : { },
  "deviceData" : { },
  "requirements" : {
    "threeDS" : {
      "pareq" : "eJyrrgUAAXUA+Q==",
      "acsUrl" : "https://test.paymentgate.ru/acs/auth/start.do"
    }
  },
  "status" : {
    "value" : "COMPLETED",
    "changedDateTime" : "2024-03-01T17:10:32.607+03:00"
  },
  "customFields" : { },
  "flags" : [ ]
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Confirming a Payment

PUT /partner/payin/v1/sites/test-01/payments/1811/captures/bxwd8096 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "callbackUrl": "https://example.com/callbacks",
  "comment": "Example capture"
}
{
  "captureId": "bxwd8096",
  "createdDateTime": "2024-03-20T16:29:58.96+03:00",
  "amount": {
    "currency": "RUB",
    "value": "6.77"
  },
  "status": {
    "value": "COMPLETED",
    "changedDateTime": "2024-03-20T16:29:58.963+03:00"
  }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Retrieving Information about Payment Confirmation

GET /partner/payin/v1/sites/test-01/payments/1811/captures/bxwd8096 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
{
  "captureId": "bxwd8096",
  "createdDateTime": "2024-03-20T16:29:58.96+03:00",
  "amount": {
    "currency": "RUB",
    "value": "6.77"
  },
  "status": {
    "value": "COMPLETED",
    "changedDateTime": "2024-03-20T16:29:58.963+03:00"
  }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Creating a QR Code for FPS

POST Methods

POST /partner/payin/v1/sites/test-01/sbp/qrCodes HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "qrCodeUid": "Test12",
  "amount": {
    "value": "1.00",
    "currency": "RUB"
  },
  "qrCode": {
    "type": "DYNAMIC",
    "ttl": 60,
    "image": {
      "mediaType": "image/png",
      "width": 300,
      "height": 300
    }
  },
  "paymentPurpose": "Flower for my girlfriend",
  "redirectUrl": "http://example.com"
}
{
  "qrCodeUid": "Test12",
  "amount": {
    "currency": "RUB",
    "value": "1.00"
  },
  "qrCode": {
    "type": "DYNAMIC",
    "ttl": 60,
    "image": {
      "mediaType": "image/png",
      "width": 300,
      "height": 300,
      "content": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAA"
    },
    "payload": "https://qr.nspk.ru/AD10006M8KH234K782OQM0L13JI31LQD?type=02&bank=100000000009&sum=200&cur=RUB&crc=C63A",
    "status": "CREATED"
  },
  "createdOn": "2022-08-11T20:10:32+03:00"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

PUT Method

PUT /partner/payin/v1/sites/test-01/sbp/qrCodes/Test12 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "amount": {
    "value": "1.00",
    "currency": "RUB"
  },
  "qrCode": {
    "type": "DYNAMIC",
    "ttl": 60,
    "image": {
      "mediaType": "image/png",
      "width": 300,
      "height": 300
    }
  },
  "paymentPurpose": "Flower for my girlfriend",
  "redirectUrl": "http://example.com"
}
{
  "qrCodeUid": "Test12",
  "amount": {
    "currency": "RUB",
    "value": "1.00"
  },
  "qrCode": {
    "type": "DYNAMIC",
    "ttl": 60,
    "image": {
        "mediaType": "image/png",
        "width": 300,
        "height": 300,
        "content": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAA"
    },
    "payload": "https://qr.nspk.ru/AD10006M8KH234K782OQM0L13JI31LQDtype=02bank=100000000009&sum=200&cur=RUB&crc=C63A",
    "status": "CREATED"
  },
  "createdOn": "2022-08-11T20:10:32+03:00"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

Retrieving FPS QR Code Information

GET /partner/payin/v1/sites/test-01/sbp/qrCodes/Test HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
{
  "qrCodeUid": "Test",
  "amount": {
    "currency": "RUB",
    "value": "1.00"
  },
  "qrCode": {
    "type": "DYNAMIC",
    "ttl": 60,
    "payload": "https://qr.nspk.ru/AD10006M8KH234K782OQM0L13JI31LQDtype=02bank=100000000009&sum=200&cur=RUB&crc=C63A",
    "status": "PAYED"
  },
  "payment": {
    "paymentUid": "A22231710446971300200933E625FCB3",
    "paymentStatus": "COMPLETED"
  },
  "createdOn": "2022-08-11T20:10:32+03:00"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

Payment token deletion

Payment token deletion example

DELETE /partner/payin/v1/sites/test-01/tokens HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "customerAccountId": "customer123",
  "token": "c5ba4a05-21c9-4a36-af7a-b709b4caa4d6"
}
Successful response to payment token deletion request

HTTP/1.1 204 No Content
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

Creating a FPS Token Payment

FPS token payment

POST /partner/payin/v1/sites/test-01/sbp/qrCodes/adghj17d1g8/payments HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
  "tokenizationAccount": "customer123",
  "token": "c5ba4a05-21c9-4a36-af7a-b709b4caa4d6"
}
Successful response for the FPS token payment request

{
  "qrCodeUid": "adghj17d1g8",
  "amount": {
    "value": "100.00",
    "currency": "RUB"
  },
  "paymentPurpose": "Flower for my girlfriend",
  "redirectUrl": "http://someurl.com",
  "qrCode": {
    "type": "DYNAMIC",
    "ttl": 999,
    "status": "INIT_PAYMENT_BY_TOKEN",
    "payload": ""
  }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

Creating a Payment Reversal or 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"
  }
}
{
  "refundId": "tcwv3132",
  "createdDateTime": "2024-03-20T16:32:55.547+03:00",
  "amount": {
    "currency": "RUB",
    "value": "2.34"
  },
  "status": {
    "value": "COMPLETED",
    "changedDateTime": "2024-03-20T16:32:55.55+03:00"
  },
  "flags": [
    "REVERSAL"
  ]
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Retrieving Payment Reversal or Refund Information

GET /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
{
  "refundId": "tcwv3132",
  "createdDateTime": "2024-03-20T16:32:55.547+03:00",
  "amount": {
    "currency": "RUB",
    "value": "2.34"
  },
  "status": {
    "value": "COMPLETED",
    "changedDateTime": "2024-03-20T16:32:55.55+03:00"
  },
  "flags": [
    "REVERSAL"
  ]
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Retrieving Information on All Payment Reversals and Refunds

GET /partner/payin/v1/sites/test-01/payments/1811/refunds HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
[
 {
  "refundId": "tcwv3132",
  "createdDateTime": "2024-03-20T16:32:55.547+03:00",
  "amount": {
    "currency": "RUB",
    "value": "2.34"
  },
  "status": {
    "value": "COMPLETED",
    "changedDateTime": "2024-03-20T16:32:55.55+03:00"
  },
  "flags": [
    "REVERSAL"
  ]
 }
]
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName" : "payin-core",
  "errorCode" : "payin.resource.not.found",
  "userMessage" : "Resource not found",
  "description" : "Resource not found",
  "traceId" : "c3564ba25e221fe3",
  "dateTime" : "2024-03-13T16:30:52.464+03:00"
}

Card verification

PUT /partner/payin/v1/sites/test-01/validation/card/requests/acd7bf20-22e2-4cbf-a218-38d90e9f29b9 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
    "cardData": {
        "pan": "1111222233334444",
        "expiryDate": "12/34",
        "cvv2": "123",
        "holderName": "Super Man"
    },
    "tokenizationData": {
        "account": "cat_girl"
    }
}
{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "SUCCESS",
    "isValidCard": true,
    "threeDsStatus": "WITHOUT",
    "checkOperationDate": "2025-03-25T12:55:12+03:00",
    "cardInfo": {
      "issuingCountry": "643",
      "issuingBank": "Gazprombank",
      "paymentSystem": "MIR",
      "fundingSource": "DEBIT",
      "paymentSystemProduct": "details"
    },
    "createdToken": {
      "token": "1a77343a-dd8a-11eb-ba80-0242ac130004",
      "name": "111122******4444",
      "expiredDate": "2034-12-31T00:00:00+03:00",
      "account": "cat_girl"
    }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

Card verification status

GET /partner/payin/v1/sites/test-01/validation/card/requests/acd7bf20-22e2-4cbf-a218-38d90e9f29b9 HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "SUCCESS",
    "isValidCard": true,
    "threeDsStatus": "WITHOUT",
    "checkOperationDate": "2025-03-25T12:55:12+03:00",
    "cardInfo": {
      "issuingCountry": "643",
      "issuingBank": "Gazprombank",
      "paymentSystem": "MIR",
      "fundingSource": "DEBIT",
      "paymentSystemProduct": "details"
    },
    "createdToken": {
      "token": "1a77343a-dd8a-11eb-ba80-0242ac130004",
      "name": "111122******4444",
      "expiredDate": "2034-12-31T00:00:00+03:00",
      "account": "cat_girl"
    }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}

Complete 3DS on card verification

POST /partner/payin/v1/sites/test-01/validation/card/requests/acd7bf20-22e2-4cbf-a218-38d90e9f29b9/complete HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com

{
    "pares": "eJzVWFevo9iyfu9fMZrzaM0QjWHk3tIiGptgooE3cgabYMKvv3jvTurTc3XOfbkaJMuL...."
}
{
    "requestUid": "acd7bf20-22e2-4cbf-a218-38d90e9f29b9",
    "status": "SUCCESS",
    "isValidCard": true,
    "threeDsStatus": "PASSED",
    "checkOperationDate": "2025-03-25T12:55:12+03:00",
    "cardInfo": {
      "issuingCountry": "643",
      "issuingBank": "Gazprombank",
      "paymentSystem": "MIR",
      "fundingSource": "DEBIT",
      "paymentSystemProduct": "details"
    },
    "createdToken": {
      "token": "1a77343a-dd8a-11eb-ba80-0242ac130004",
      "name": "111122******4444",
      "expiredDate": "2034-12-31T00:00:00+03:00",
      "account": "cat_girl"
    }
}
{
  "serviceName" : "payin-core",
  "errorCode" : "validation.error",
  "description" : "Validation error",
  "userMessage" : "Validation error",
  "dateTime" : "2024-03-13T16:49:59.166+03:00",
  "traceId" : "fd0e2a08c63ace83"
}
{
  "serviceName":"payin-core",
  "errorCode":"internal.error",
  "userMessage":"Internal error",
  "description":"Internal error",
  "traceId":"3fb3420ee1795dcf",
  "dateTime":"2020-02-12T21:28:01.813+03:00"
}