/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: |
cart* |
Type: RenderedCart Cart |
currencyCode* |
Type: string Three-letter code of the order currency code (ISO 4217) Max length: Enum: |
orderId* |
Type: string The order ID on the merchant sideĀ (it should be unique). Max length: |
parentOrderId* |
Type: string ID of the initial order Max length: |
metadata |
Type: string Arbitrary order data for internal use Max length: |
purpose |
Type: string Purpose of payment Max length: |
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: |
RenderedCartItem
Name |
Description |
productId* |
Type: string Product ID in the merchant system Make sure that each Max length: |
quantity* |
Type: ItemQuantity Product quantity in the order |
title* |
Type: string Product name Max length: |
total* |
Type: string<double> Total price per item with item discount Example: |
description |
Type: string Product description Max length: |
discountedUnitPrice |
Type: string<double> Price per product unit with discount per item Example: |
pointsAmount |
Type: string<double> Number of Plus points Example: |
receipt |
Type: ItemReceipt Data for receipt generation |
subtotal |
Type: string<double> TotalĀ price per item without discount Example: |
unitPrice |
Type: string<double> Total price per product unit without discount Example: |
CartTotal
Name |
Description |
amount* |
Type: string<double> Cart cost with all discounts Example: |
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: |
pointsAmount |
Type: string<double> Number of plus points Example: |
ItemQuantity
Name |
Description |
count* |
Type: string<double> Product quantity in the order Example: |
available |
Type: string<double> Maximum available product quantity Example: |
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: |
ItemReceipt
Name |
Description |
tax* |
Type: integer Value description: Link Enum: |
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: |
markQuantity |
Type: MarkQuantity |
measure |
Type: integer Value description: Link Enum: |
paymentMethodType |
Type: integer Value description: Link Enum: |
paymentSubjectType |
Type: integer Value description: Link Enum: |
productCode |
Type: string<base64> Product code (a base64-encoded array of 1 to 32 bytes) |
supplier |
Type: Supplier |
title |
Type: string Max length: |
Agent
Name |
Description |
agentType* |
Type: integer Agent type by taxable object. See values Enum: |
operation |
Type: string Max length: |
paymentsOperator |
Type: PaymentsOperator |
phones |
Type: string[] Max length: |
transferOperator |
Type: TransferOperator |
MarkQuantity
Name |
Description |
denominator* |
Type: integer<int32> |
numerator* |
Type: integer<int32> |
Supplier
Name |
Description |
inn |
Type: string Max length: |
name |
Type: string Max length: |
phones |
Type: string[] Max length: |
PaymentsOperator
Name |
Description |
phones |
Type: string[] Max length: |
TransferOperator
Name |
Description |
address |
Type: string Max length: |
inn |
Type: string Max length: |
name |
Type: string Max length: |
phones |
Type: string[] Max length: |
Responses
200 OK
Body
application/json
{
"code": 200,
"data": {
"operationId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b"
},
"status": "success"
}
Name |
Description |
code |
Type: number Default: |
data |
|
status |
Type: string Default: Enum: |
RecurSubscriptionResponseData
Name |
Description |
operationId* |
Type: string<uuid> Max length: |
No longer supported, please use an alternative and newer version.