Получение подписки
Метод позволяет получить информацию о подписке
Header parameters
x-api-public-keystringOptional
Публичный API-ключ
x-api-signaturestringOptional
Подпись тела запроса приватным API-ключем
Content-typestringOptionalExample:
Тип тела запроса
application/jsonBody
Тело запроса получения данных подписки
idstringRequiredExample:
Идентификатор подписки
d75a2ecd-ed6b-480a-a337-5836ad64acf7merchantIdstringRequiredExample:
Идентификатор мерчанта
386fc09d-b4b8-4081-ae99-bf9710e80239Responses
200Success
application/json
Успешный ответ
successbooleanRequired
Признак успешности запроса
post/api-gateway/recurrents/get-subscription
POST /api-gateway/recurrents/get-subscription HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"id": "d75a2ecd-ed6b-480a-a337-5836ad64acf7",
"merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239"
}200Success
{
"success": true,
"response": {
"id": "d75a2ecd-ed6b-480a-a337-5836ad64acf7",
"merchantId": "386fc09d-b4b8-4081-ae99-bf9710e80239",
"billingLinkId": "1db0ec64-8a2e-4bec-810a-be4bde21c412",
"title": "Premium",
"description": "Premium subscription. With premium subscription u can use premium functions",
"spendInterval": "-1",
"status": "PENDING",
"message": null,
"currency": "USD",
"amount": "7.99",
"webhookUrl": "https://merchant.domain/webhooks/subscription",
"createdAt": "2026-01-29T11:14:13.711Z",
"updatedAt": "2026-01-29T11:14:13.711Z"
}
}Last updated