Получение подписки
Метод позволяет получить информацию о подписке
Header parameters
x-api-public-keystringOptional
Публичный API-ключ
x-api-signaturestringOptional
Подпись тела запроса приватным API-ключем
Content-typestringOptionalExample:
Тип тела запроса
application/json
Body
Тело запроса получения данных подписки
idstringRequiredExample:
Идентификатор подписки
0b619a42-c48c-48ba-bd7d-21645eca9c68
merchantIdstringRequiredExample:
Идентификатор мерчанта
3ef22c52-c364-4acd-941d-5940f647a4f1
Responses
200Success
application/json
post
POST /api-gateway/recurrents/get-subscription HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"id": "0b619a42-c48c-48ba-bd7d-21645eca9c68",
"merchantId": "3ef22c52-c364-4acd-941d-5940f647a4f1"
}
200Success
{
"success": true,
"response": {
"id": "0b619a42-c48c-48ba-bd7d-21645eca9c68",
"merchantId": "3ef22c52-c364-4acd-941d-5940f647a4f1",
"billingLinkId": "c7358087-4e45-44b7-8de2-427621f2eaf4",
"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": "2025-06-09T11:38:26.574Z",
"updatedAt": "2025-06-09T11:38:26.574Z"
}
}
Last updated