POST
https://larpcassa.cc/v1/paymentsЗаголовки
| Key | Value |
|---|---|
| X-Api-Key | Ключ проекта |
| Idempotency-Key | Уникальный ключ запроса — обязательно |
Тело запроса
Пример запроса
bash
curl -X POST https://larpcassa.cc/v1/payments \
-H "X-Api-Key: $LC_KEY" \
-H "Idempotency-Key: order-1042" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000000,
"method": "SBP_C2B",
"order_id": "ORDER-1042",
"description": "Заказ №1042",
"success_url": "https://shop.example/success",
"metadata": { "telegram_user": "123456789" }
}'Ответ 201
json
{
"id": "pay_01k7x3m9qz2hb8c4r6t1vw5yfe",
"object": "payment",
"environment": "sandbox",
"project_id": "5f0c9a3e-6b1d-4c2a-9e8f-1a2b3c4d5e6f",
"order_id": "ORDER-1042",
"status": "PENDING",
"amount": 1000000,
"order_amount": 1000000,
"customer_fee": 0,
"fee": 70000,
"net_amount": 930000,
"currency": "RUB",
"method": "SBP_C2B",
"description": "Заказ №1042",
"payment_url": "https://larpcassa.cc/pay/pay_01k7x3m9qz2hb8c4r6t1vw5yfe",
"success_url": "https://shop.example/success",
"fail_url": null,
"expires_at": "2026-10-14T12:30:00.000Z",
"paid_at": null,
"failure_reason": null,
"settled": false,
"metadata": { "telegram_user": "123456789" },
"created_at": "2026-10-14T12:00:00.000Z"
}Поле
amount в ответе — сколько заплатит покупатель. Если в проекте комиссию платит покупатель, оно больше суммы заказа (order_amount) на customer_fee. Подробнее — «Кто платит комиссию».