/v1/subscriptions/{customer_subscription_id}ㅤ

Этот раздел доступен по прямой ссылке

Чтобы узнать, как происходит аутентификация и какие HTTP-заголовки нужно передавать в запросах API Яндекс Пэй, читайте в разделе Аутентификация.

Запрос на получение информации по подписке.

Используется в рекуррентных и рекарринговых платежах.

Возвращает идентификатор подписки, состояние подписки и привязанного способа оплаты.

Request

GET

https://pay.yandex.ru/api/merchant/v1/subscriptions/{customer_subscription_id}

Production

GET

https://sandbox.pay.yandex.ru/api/merchant/v1/subscriptions/{customer_subscription_id}

Sandbox

Path parameters

Name

Description

customer_subscription_id

Type: string

ID подписки

Max length: 2048

Example: ``

Body

application/json
{
  "check_card_active": true
}

Name

Description

check_card_active

Type: boolean

Позволяет проверить привязку карты

Responses

200 OK

Body

application/json
{
  "code": 200,
  "data": {
    "cancelledAt": "2025-01-01T00:00:00Z",
    "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
    "isCardActive": true,
    "nextWriteOff": "2025-01-01T00:00:00Z",
    "status": "NEW",
    "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "status": "success"
}

Name

Description

code

Type: unknown

Default: 200

data

Type: CustomerSubscriptionResponseData

Example
{
  "cancelledAt": "2025-01-01T00:00:00Z",
  "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
  "isCardActive": true,
  "nextWriteOff": "2025-01-01T00:00:00Z",
  "status": "NEW",
  "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
}

status

Type: string

Default: success

Enum: success, fail

CustomerSubscriptionResponseData

Name

Description

status

Type: string

Статус подписки

Enum: NEW, ACTIVE, CANCELLED, EXPIRED

subscriptionPlanId

Type: string<uuid>

ID плана подписки

Max length: 2048

Example: 123e4567-e89b-12d3-a456-426614174000

cancelledAt

Type: string<date-time>

Время отмены подписки

Example: 2025-01-01T00:00:00Z

customerSubscriptionId

Type: string<uuid>

ID подписки

Max length: 2048

Example: 123e4567-e89b-12d3-a456-426614174000

isCardActive

Type: boolean

Статус привязанной карты

nextWriteOff

Type: string<date-time>

Дата следующего списания

Example: 2025-01-01T00:00:00Z

Example
{
  "cancelledAt": "2025-01-01T00:00:00Z",
  "customerSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
  "isCardActive": true,
  "nextWriteOff": "2025-01-01T00:00:00Z",
  "status": "NEW",
  "subscriptionPlanId": "123e4567-e89b-12d3-a456-426614174000"
}