Получение платежных связок по пользователю

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

POSThttps://ocp.onchainpay.io/api-gateway/recurrents/get-billing-links-by-subscriber
Header parameters
Body
clientIdstring

Идентификатор клиента

Example: "merchant_client_unique_id"
clientEmailstring

Почта клиента

Example: "client-email@example.com"
merchantId*string

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

Example: "7ddddebc-522c-4b3d-9bfa-5aa7ed615f11"
Response
Body
success*boolean

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

response*array of SubscriptionBillingLinkResponse (object)
Request
const response = await fetch('https://ocp.onchainpay.io/api-gateway/recurrents/get-billing-links-by-subscriber', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "merchantId": "7ddddebc-522c-4b3d-9bfa-5aa7ed615f11"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": [
    {
      "id": "65fd0a63-c301-4572-9c7f-588c851a3933",
      "merchantId": "7ddddebc-522c-4b3d-9bfa-5aa7ed615f11",
      "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-09-19T14:20:34.037Z",
      "updatedAt": "2024-09-19T14:20:34.037Z"
    }
  ]
}

Last updated