Skip to content

API. Overview

This section documents the implementation of the API for payment acceptance within the Payment acceptance for providers via credit organizations product.

The interaction between QIWI system and a provider is built in the “request-response” mode. The initiator of the request is always the QIWI system, and the response always comes from the provider.

Provider Interface Requirements

Provider’s application interface has to comply with the following requirements:

  1. Interface should accept requests by HTTPS protocol on one of the following TCP-ports: 80, 81, 443, 8008, 8080, 8081, 8090, 8443, 4433. Using other ports is not allowed.
  2. Accept parameters using HTTP GET, HTTP POST methods. Parameters are placed either in the HTTP GET request’s path or in HTTP POST request’s body as a URL-encoded string.
  3. Respond to QIWI request using XML format in UTF-8 encoding.
  4. Response time should not exceed 60 seconds, otherwise QIWI service would disconnect by timeout.
  5. Ability to support multi-thread communication with up to 10-15 simultaneous connections, when the planning payments flow for provider’s services is going to be more than 10 payments per minute.
  6. Interface should accept requests only from the following QIWI subnets:

    • 79.142.16.0/20
    • 195.189.100.0/22
    • 91.232.230.0/23
    • 91.213.51.0/24

Request Authorization

By default, QIWI sends requests without authorization data. To authorize requests, the provider may give identifier (login) and corresponding secret password in the initial application for QIWI integration to use in the requests from QIWI side.

The login and password are used in standard Basic-authorization of the requests:

  • HTTP header Authorization is added.
  • The header contains Basic (ending with space) string plus BASE64-encoded “login:password” string.

Request authorization by client SSL certificate is also supported. To use it, provide the PKCS12 client certificate in the initial application for QIWI integration.

Example

Provider provides a Login:Password pair for authorization.

The pair is Base64-encoded:

BASE64("Login:Password") = "***"

The HTTP request from QIWI contains Authorization header:

Authorization: Basic ***