/v1/subscriptions/recur

Request to debit a regular subscription fee.

The request is used to perform a direct debit from the account or card linked to the subscription. To debit funds, pass the order ID, cart, debit amount, and ID of the initial order that was used at subscription creation.

Request

POST

https://pay.yandex.ru/api/merchant/v1/subscriptions/recur

Production

POST

https://sandbox.pay.yandex.ru/api/merchant/v1/subscriptions/recur

Sandbox

Body

application/json
{
    "amount": "123.45",
    "cart": {
        "externalId": "string",
        "items": [
            {
                "description": "string",
                "discountedUnitPrice": "123.45",
                "pointsAmount": "123.45",
                "productId": "string",
                "quantity": {
                    "available": "123.45",
                    "count": "123.45",
                    "label": "string"
                },
                "receipt": {
                    "agent": {
                        "agentType": 1,
                        "operation": "string",
                        "paymentsOperator": {
                            "phones": [
                                "string"
                            ]
                        },
                        "phones": [
                            "string"
                        ],
                        "transferOperator": {
                            "address": "string",
                            "inn": "string",
                            "name": "string",
                            "phones": [
                                "string"
                            ]
                        }
                    },
                    "excise": "123.45",
                    "markQuantity": {
                        "denominator": 0,
                        "numerator": 0
                    },
                    "measure": 0,
                    "paymentMethodType": 1,
                    "paymentSubjectType": 1,
                    "productCode": "string",
                    "supplier": {
                        "inn": "string",
                        "name": "string",
                        "phones": [
                            "string"
                        ]
                    },
                    "tax": 1,
                    "title": "string"
                },
                "subtotal": "123.45",
                "title": "string",
                "total": "123.45",
                "unitPrice": "123.45"
            }
        ],
        "total": {
            "amount": "123.45",
            "label": "string",
            "pointsAmount": "123.45"
        }
    },
    "currencyCode": "RUB",
    "metadata": "string",
    "orderId": "string",
    "parentOrderId": "string",
    "purpose": "string"
}

Name

Description

amount*

Type: string<double>

Amount to be debited

Example: 123.45

cart*

Type: RenderedCart

Cart

currencyCode*

Type: string

Three-letter code of the order currency code (ISO 4217)

Max length: 2048

Enum: RUB

orderId*

Type: string

The order ID on the merchant sideĀ (it should be unique).

Max length: 2048

parentOrderId*

Type: string

ID of the initial order

Max length: 2048

metadata

Type: string

Arbitrary order data for internal use

Max length: 2048

purpose

Type: string

Purpose of payment

Max length: 1000

RenderedCart

Name

Description

items*

Type: RenderedCartItem[]

Cart items that the customer pays for.

total*

Type: CartTotal

Final order cost.

externalId

Type: string

Cart ID passed by the merchant

Max length: 2048

RenderedCartItem

Name

Description

productId*

Type: string

Product ID in the merchant system Make sure that each productId in the request parameters is unique.

Max length: 2048

quantity*

Type: ItemQuantity

Product quantity in the order

title*

Type: string

Product name

Max length: 2048

total*

Type: string<double>

Total price per item with item discount

Example: 123.45

description

Type: string

Product description

Max length: 2048

discountedUnitPrice

Type: string<double>

Price per product unit with discount per item

Example: 123.45

pointsAmount

Type: string<double>

Number of Plus points

Example: 123.45

receipt

Type: ItemReceipt

Data for receipt generation

subtotal

Type: string<double>

TotalĀ price per item without discount

Example: 123.45

unitPrice

Type: string<double>

Total price per product unit without discount

Example: 123.45

CartTotal

Name

Description

amount*

Type: string<double>

Cart cost with all discounts

Example: 123.45

label

Type: string

Name of measurement units, for example, "kg" or "pcs"

Max length: 2048

pointsAmount

Type: string<double>

Number of plus points

Example: 123.45

ItemQuantity

Name

Description

count*

Type: string<double>

Product quantity in the order

Example: 123.45

available

Type: string<double>

Maximum available product quantity

Example: 123.45

label

Type: string

Name of measurement units, for example, "kg" or "pcs"

Max length: 2048

ItemReceipt

Name

Description

tax*

Type: integer

Value description: Link

Enum: 1, 2, 3, 4, 5, 6

agent

Type: Agent

excise

Type: string<double>

It shouldn't include more than two decimal digits. For example: 1.12, 5.1, 10, 11.00 .

Example: 123.45

markQuantity

Type: MarkQuantity

measure

Type: integer

Value description: Link

Enum: 0, 10, 11, 12, 20, 21, 22, 30, 31, 32, 40, 41, 42, 50, 51, 70, 71, 72, 73, 80, 81, 82, 83, 255, null

paymentMethodType

Type: integer

Value description: Link

Enum: 1, 2, 3, 4, 5, 6, 7, null

paymentSubjectType

Type: integer

Value description: Link

Enum: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, null

productCode

Type: string<base64>

Product code (a base64-encoded array of 1 to 32 bytes)

supplier

Type: Supplier

title

Type: string

Max length: 2048

Agent

Name

Description

agentType*

Type: integer

Agent type by taxable object. See values

Enum: 1, 2, 3, 4, 5, 6, 7

operation

Type: string

Max length: 2048

paymentsOperator

Type: PaymentsOperator

phones

Type: string[]

Max length: 2048

transferOperator

Type: TransferOperator

MarkQuantity

Name

Description

denominator*

Type: integer<int32>

numerator*

Type: integer<int32>

Supplier

Name

Description

inn

Type: string

Max length: 2048

name

Type: string

Max length: 2048

phones

Type: string[]

Max length: 2048

PaymentsOperator

Name

Description

phones

Type: string[]

Max length: 2048

TransferOperator

Name

Description

address

Type: string

Max length: 2048

inn

Type: string

Max length: 2048

name

Type: string

Max length: 2048

phones

Type: string[]

Max length: 2048

Responses

200 OK

Body

application/json
{
    "code": 200,
    "data": {
        "operationId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b"
    },
    "status": "success"
}

Name

Description

code

Type: number

Default: 200

data

Type: RecurSubscriptionResponseData

status

Type: string

Default: success

Enum: success

RecurSubscriptionResponseData

Name

Description

operationId*

Type: string<uuid>

Max length: 2048