Счета
Создание счета
Используйте этот запрос, чтобы создать в ЮKassa объект счета: https://yookassa.ru/developers/api#invoice_object. В запросе необходимо передать данные о заказе, которые отобразятся на странице счета, и данные для проведения платежа.
post/invoices
Headers
Idempotence-Keystring required
Request body
Example request
{
"payment_data": {
"amount": {
"value": "1000.00",
"currency": "RUB"
},
"receipt": {
"customer": {
"full_name": "Иванов Иван Иванович",
"inn": "6321341814",
"email": "user@yoomoney.ru",
"phone": "79000000000"
},
"items": [
{
"amount": {
"value": "1000.00",
"currency": "RUB"
},
"quantity": 1,
"measure": "piece",
"mark_quantity": {
"numerator": 1,
"denominator": 100
},
"country_of_origin_code": "RU",
"customs_declaration_number": "10714040/140917/0090376",
"excise": "20.00",
"product_code": "00 00 00 01 00 21 FA 41 00 23 05 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 AB 00",
"mark_mode": "0",
"payment_subject_industry_details": [
{
"federal_id": "001",
"document_date": "2020-11-18",
"value": "123/43"
}
]
}
],
"receipt_industry_details": [
{
"federal_id": "001",
"document_date": "2020-11-18",
"value": "123/43"
}
],
"receipt_operational_details": {
"created_at": "2020-07-03T11:52:31.827Z"
}
},
"recipient": {
"gateway_id": "456"
},
"save_payment_method": true,
"capture": true,
"description": "Оплата заказа № 72"
},
"cart": [
{
"price": {
"value": "1000.00",
"currency": "RUB"
},
"discount_price": {
"value": "1000.00",
"currency": "RUB"
},
"quantity": 1
}
],
"delivery_method_data": {
"phone": "79000000000"
},
"expires_at": "2024-10-18T10:51:18.139Z",
"locale": "ru_RU",
"description": "Оплата заказа № 72"
}Response
Запрос успешно обработан
Example response
{
"id": "in-e44e8088-bd73-43b1-959a-954f3a7d0c54",
"status": "succeeded",
"cart": [
{
"price": {
"value": "1000.00",
"currency": "RUB"
},
"discount_price": {
"value": "1000.00",
"currency": "RUB"
},
"quantity": 1
}
],
"payment_details": {
"id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9",
"status": "succeeded"
},
"created_at": "2017-11-03T11:52:31.827Z",
"expires_at": "2024-10-18T10:51:18.139Z",
"description": "Оплата заказа № 72",
"cancellation_details": {
"reason": "invoice_expired"
}
}