Получение платежной связки

Метод позволяет получить данные платежной связки

POSThttps://ocp.onchainpay.io/api-gateway/recurrents/get-billing-link
Header parameters
Body
id*string

Идентификатор платежной свзяки

Example: "fdb8484c-74a5-46d8-b374-0b6679ed24fe"
merchantId*string

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

Example: "e3576d10-18bb-4ba9-b98f-c4e504081db9"
Response
Body
success*boolean

Признак успешности запроса

response*SubscriptionBillingLinkResponse (object)

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

Request
const response = await fetch('https://ocp.onchainpay.io/api-gateway/recurrents/get-billing-link', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "fdb8484c-74a5-46d8-b374-0b6679ed24fe",
      "merchantId": "e3576d10-18bb-4ba9-b98f-c4e504081db9"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "id": "fdb8484c-74a5-46d8-b374-0b6679ed24fe",
    "merchantId": "e3576d10-18bb-4ba9-b98f-c4e504081db9",
    "clientId": "merchant_client_unique_id",
    "clientName": "John Doe",
    "clientEmail": "client-email@example.com",
    "webhookUrl": "https://merchant.domain/webhooks/subscription",
    "returnUrl": "https://merchant.domain/",
    "address": "0x00000005707Bf50EfA35a2db020eDe9Ac0780b9f",
    "currency": "USDT",
    "network": "ethereum",
    "status": "PENDING",
    "createdAt": "2024-10-15T16:11:00.486Z",
    "updatedAt": "2024-10-15T16:11:00.486Z"
  }
}

Last updated