Наша команда поддержки готова помочь вам 24/7.

Служба поддержки и технические вопросы

telegram

Связаться в Telegram

API for developers
Introduction

Description of Gateway Interaction

The interaction is done using the HTTP over TCP/SSL protocol.

The initiator of the connection is always the client of the payment system. A new connection is created for each request. The client has the ability to create multiple connections simultaneously for different payments.

Each type of request corresponds to a specific URI. All requests are made using the POST method. Regardless of the type, each request includes two HTTP headers: DPAY_CLIENT and DPAY_SECURE. The data inside the POST message is transmitted as application/json. In any case, it is mandatory to include the Content-type: application/json header in the POST request. The domain for sending requests is https://acquiring_api.obmenka.ua. The endpoints for specific types of requests are described below (e.g., https://acquiring_api.obmenka.ua/api/payment/balance).

DPAY_CLIENT - the client identifier, the number of the cash register created in the personal account.

DPAY_SECURE - the request signature (the signature is formed based on the request body). The request signature is formed according to the scheme base64_encode(md5($salt . base64_encode(sha1($data, true)) . $salt, true)), where salt is the secret from the cash register settings, and data is the request body

Each response from the gateway also has a signature passed in the DPAY_SECURE header.

The HTTP parameter request contains the request body as a JSON array in UTF-8 encoding.

Test Data

When issuing an invoice or creating a payout for 1000 operations, it is always successful.

When issuing an invoice or creating a payout for 2000 operations, it is always unsuccessful.

Description of Request and Response Structure

The request body is passed as an array serialized into JSON format.

Example: { "tracking": "1234" }

The response has a similar structure.

In case of a request failure, an error with its code and description will be returned.

Example: { "error": { "code": 401, "message": "Payment not found" } }

In case of a successful request execution, the response data will be returned.