ArdorQR API (1.0.0)

Download OpenAPI specification:

ArdorQR API

Платёжный API для бизнеса: пополняйте баланс бизнес-кошелька в рублях и проводите оплату по платёжным QR-кодам через единый REST-интерфейс.

Базовый сценарий

  1. Получите адрес пополнения: GET /v1/deposit-address.
  2. Переведите на него USDT в сети TON — баланс зачислится в рублях по актуальному курсу за вычетом комиссии. О зачислении придёт вебхук deposit.credited.
  3. Разберите платёжный QR: POST /v1/payments — вернётся сумма, получатель и комиссия.
  4. Проведите платёж: POST /v1/payments/{id}/confirm.
  5. Дождитесь финального статуса через вебхук payment.completed / payment.failed или опросом GET /v1/payments/{id}.

Аутентификация

Все запросы к /v1/* требуют API-ключа в заголовке:

Authorization: Bearer sk_live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx

Ключи sk_live_… работают с реальными средствами, sk_test_… — для интеграционного тестирования. Секрет ключа показывается один раз при выпуске.

Идемпотентность

POST-запросы (/v1/payments, /v1/payments/{id}/confirm) принимают заголовок Idempotency-Key. Повторный запрос с тем же ключом и телом вернёт сохранённый ответ и не выполнит операцию повторно. Повтор отмечается заголовком Idempotency-Replayed: true.

Денежные суммы

Все суммы передаются в минорных единицах (копейках) как целые числа. Например, 125000 — это 1250.00 ₽.

Ошибки

Ошибки возвращаются с соответствующим HTTP-статусом и телом:

{ "error": { "code": "insufficient_funds", "message": "Недостаточно средств" } }

Account

Бизнес-аккаунт, API-ключи

Информация о бизнес-аккаунте

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "status": "active",
  • "webhookUrl": "string",
  • "webhookEnabled": true,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Список API-ключей

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ]
}

Выпустить новый API-ключ

Секрет возвращается только один раз — сохраните его сразу.

Authorizations:
bearerAuth
Request Body schema: application/json
optional
mode
string
Default: "live"
Enum: "live" "test"
label
string <= 64 characters

Responses

Request samples

Content type
application/json
{
  • "mode": "live",
  • "label": "Production server"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "secret": "string",
  • "hint": "string",
  • "mode": "live",
  • "label": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Отозвать API-ключ

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "revoked": true
}

Wallet

Баланс и история операций

Текущий баланс кошелька

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "merchantId": "0b6f…",
  • "balanceMinor": 125000,
  • "currency": "RUB"
}

История операций (леджер)

Authorizations:
bearerAuth
query Parameters
limit
integer [ 1 .. 100 ]
Default: 20
before
string <date-time>

Курсор: операции старше указанного времени

Responses

Response samples

Content type
application/json
{
  • "operations": [
    ]
}

Deposits

Пополнение баланса

Адрес пополнения (USDT в сети TON)

Постоянный TON-адрес для пополнения. Переводите только USDT в сети TON.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "address": "UQD...TON",
  • "network": "TON",
  • "asset": "USDT",
  • "minAmount": 0.5,
  • "feeBps": 150,
  • "note": "string"
}

Список пополнений

Authorizations:
bearerAuth
query Parameters
limit
integer [ 1 .. 100 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "deposits": [
    ]
}

Payments

Оплата по QR

Разобрать QR и подготовить платёж

Сканирует QR, рассчитывает сумму и комиссию. Средства не списываются до confirm.

Authorizations:
bearerAuth
header Parameters
Idempotency-Key
string <= 255 characters

Ключ идемпотентности для безопасного повтора запроса.

Request Body schema: application/json
required
qr
required
string <= 2048 characters

Содержимое платёжного QR-кода

reference
string <= 128 characters

Ваш внешний идентификатор платежа

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": "9c2e…",
  • "status": "resolved",
  • "merchantName": "ООО Ромашка",
  • "merchantBank": "Сбербанк",
  • "feeMinor": 0,
  • "totalMinor": 125000,
  • "currency": "RUB",
  • "reference": "order-4821",
  • "expiresAt": "2026-06-19T12:10:00.000Z",
  • "operationId": null,
  • "failureReason": null
}

Подтвердить и провести платёж

Списывает сумму с баланса и отправляет платёж. Статус переходит в confirming → completed/failed.

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>
header Parameters
Idempotency-Key
string <= 255 characters

Ключ идемпотентности для безопасного повтора запроса.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "resolved",
  • "merchantName": "string",
  • "merchantBank": "string",
  • "feeMinor": 0,
  • "totalMinor": 0,
  • "currency": "RUB",
  • "reference": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969",
  • "failureReason": "string"
}

Статус платёжной сессии

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "resolved",
  • "merchantName": "string",
  • "merchantBank": "string",
  • "feeMinor": 0,
  • "totalMinor": 0,
  • "currency": "RUB",
  • "reference": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969",
  • "failureReason": "string"
}

Webhooks

Настройка и журнал вебхуков

Настроить URL вебхуков

Устанавливает URL доставки событий. При первой установке возвращает секрет подписи.

Authorizations:
bearerAuth
Request Body schema: application/json
required
required
string or null
enabled
boolean
rotateSecret
boolean

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "merchant": {
    },
  • "secret": "string"
}

Журнал доставки вебхуков

Authorizations:
bearerAuth
query Parameters
limit
integer [ 1 .. 100 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "deliveries": [
    ]
}

Обнаружено пополнение, ожидает подтверждения Webhook

Событие deposit.pending. Подписано заголовком X-Ardor-Signature: t=<unix>,v1=<hmac_sha256(t + "." + body)>.

Authorizations:
bearerAuth
Request Body schema: application/json
required
id
required
string <uuid>

Идентификатор события (для дедупликации)

type
required
string
Enum: "deposit.pending" "deposit.credited" "payment.processing" "payment.completed" "payment.failed"
createdAt
required
string <date-time>
required
object

Responses

Request samples

Content type
application/json
{
  • "id": "evt_…",
  • "type": "deposit.pending",
  • "createdAt": "2026-06-19T12:00:00.000Z",
  • "data": {
    }
}

Пополнение зачислено на баланс Webhook

Событие deposit.credited. Подписано заголовком X-Ardor-Signature: t=<unix>,v1=<hmac_sha256(t + "." + body)>.

Authorizations:
bearerAuth
Request Body schema: application/json
required
id
required
string <uuid>

Идентификатор события (для дедупликации)

type
required
string
Enum: "deposit.pending" "deposit.credited" "payment.processing" "payment.completed" "payment.failed"
createdAt
required
string <date-time>
required
object

Responses

Request samples

Content type
application/json
{
  • "id": "evt_…",
  • "type": "deposit.credited",
  • "createdAt": "2026-06-19T12:00:00.000Z",
  • "data": {
    }
}

Платёж принят в обработку Webhook

Событие payment.processing. Подписано заголовком X-Ardor-Signature: t=<unix>,v1=<hmac_sha256(t + "." + body)>.

Authorizations:
bearerAuth
Request Body schema: application/json
required
id
required
string <uuid>

Идентификатор события (для дедупликации)

type
required
string
Enum: "deposit.pending" "deposit.credited" "payment.processing" "payment.completed" "payment.failed"
createdAt
required
string <date-time>
required
object

Responses

Request samples

Content type
application/json
{
  • "id": "evt_…",
  • "type": "payment.processing",
  • "createdAt": "2026-06-19T12:00:00.000Z",
  • "data": {
    }
}

Платёж успешно проведён Webhook

Событие payment.completed. Подписано заголовком X-Ardor-Signature: t=<unix>,v1=<hmac_sha256(t + "." + body)>.

Authorizations:
bearerAuth
Request Body schema: application/json
required
id
required
string <uuid>

Идентификатор события (для дедупликации)

type
required
string
Enum: "deposit.pending" "deposit.credited" "payment.processing" "payment.completed" "payment.failed"
createdAt
required
string <date-time>
required
object

Responses

Request samples

Content type
application/json
{
  • "id": "evt_…",
  • "type": "payment.completed",
  • "createdAt": "2026-06-19T12:00:00.000Z",
  • "data": {
    }
}

Платёж отклонён, средства возвращены Webhook

Событие payment.failed. Подписано заголовком X-Ardor-Signature: t=<unix>,v1=<hmac_sha256(t + "." + body)>.

Authorizations:
bearerAuth
Request Body schema: application/json
required
id
required
string <uuid>

Идентификатор события (для дедупликации)

type
required
string
Enum: "deposit.pending" "deposit.credited" "payment.processing" "payment.completed" "payment.failed"
createdAt
required
string <date-time>
required
object

Responses

Request samples

Content type
application/json
{
  • "id": "evt_…",
  • "type": "payment.failed",
  • "createdAt": "2026-06-19T12:00:00.000Z",
  • "data": {
    }
}