WinWallet Merchant API Help

Создание инвойса

/invoice/create

Создает новый инвойс и возвращает ссылку на оплату.

Авторизация:

  • требуется Bearer token

  • передается в заголовке Authorization

Пример: Authorization: Bearer sk_live_xxxxxxxxx

После успешного создания:

  • генерируется уникальный invoice_id

  • создается платежная страница

  • инвойс получает статус PENDING

Request parameters

{ "amount": 1500, "currency": "USD", "description": ""Payment for order #1001"", "end_date": 1779454179000, "positions": [ { "title": ""Premium subscription"", "amount": 1000, "currency": "USD" } ], "merchant_transaction_id": ""order_1001"", "success_url": ""https://merchant.com/success"", "error_url": ""https://merchant.com/error"", "callback_url": ""https://merchant.com/callback"", "merchant_data": { "customer_id": 123, "order_id": "1001" } }

Responses

{ "result": true, "data": { "invoice_id": ""inv_01970f4f6b7c7d52b2d9"", "invoice_url": ""https://pay.example.com/invoice/inv_01970f4f6b7c7d52b2d9"", "success_url": ""https://merchant.com/payment/success"", "error_url": ""https://merchant.com/payment/error"", "status": "1", "amount": 1500, "currency": "USD", "description": ""Payment for order #1001"", "merchant_transaction_id": ""order_1001"", "merchant_data": { "customer_id": 123, "order_id": "1001" }, "end_date": 1779454179000, "created_at": 1779454179000 }, "error": { "message": "example", "error_code": 58 } }
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": null, "ctx": {} } ] }
25 мая 2026