/v1/subscriptions/

Request to obtain subscription details.

Returns the subscription ID and status and the linked payment method.

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

Subscription ID

Max length: 2048

Body

application/json
{
    "check_card_active": false
}

Name

Description

check_card_active

Type: boolean

Allows checking if the card is linked

Responses

200 OK

Body

application/json
{
    "code": 200,
    "data": {
        "cancelledAt": "2022-12-29T18:02:01Z",
        "customerSubscriptionId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
        "isCardActive": false,
        "nextWriteOff": "2022-12-29T18:02:01Z",
        "status": "NEW",
        "subscriptionPlanId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b"
    },
    "status": "success"
}

Name

Description

code

Type: number

Default: 200

data

Type: CustomerSubscriptionResponseData

status

Type: string

Default: success

Enum: success

CustomerSubscriptionResponseData

Name

Description

status*

Type: string

Subscription type

Enum: NEW, ACTIVE, CANCELLED, EXPIRED

subscriptionPlanId*

Type: string<uuid>

Subscription plan ID

Max length: 2048

cancelledAt

Type: string<date-time>

Subscription cancellation time

customerSubscriptionId

Type: string<uuid>

Subscription ID

Max length: 2048

isCardActive

Type: boolean

Linked card's status

nextWriteOff

Type: string<date-time>

Date of next debit