Получение подписки

Метод позволяет получить информацию о подписке

Получение подписки

post
Header parameters
x-api-public-keystringOptional

Публичный API-ключ

x-api-signaturestringOptional

Подпись тела запроса приватным API-ключем

Content-typestringOptional

Тип тела запроса

Example: application/json
Body

Тело запроса получения данных подписки

idstringRequired

Идентификатор подписки

Example: f7048e9c-798e-4d9a-bab6-a1885efc8283
merchantIdstringRequired

Идентификатор мерчанта

Example: 3ce560cc-4d42-4543-b9ef-8cc35c00638c
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": "f7048e9c-798e-4d9a-bab6-a1885efc8283",
  "merchantId": "3ce560cc-4d42-4543-b9ef-8cc35c00638c"
}
200Success
{
  "success": true,
  "response": {
    "id": "f7048e9c-798e-4d9a-bab6-a1885efc8283",
    "merchantId": "3ce560cc-4d42-4543-b9ef-8cc35c00638c",
    "billingLinkId": "6a42622f-4968-47e2-a24d-5f5f1dc1acd6",
    "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-09T13:18:11.532Z",
    "updatedAt": "2025-06-09T13:18:11.532Z"
  }
}

Last updated