/create-payment
This endpoint immediately generates payment details and starts the verification process. Unlike /create, it allows specifying the cryptocurrency and network, and the API returns the exact payment details (address, amount, etc.) that the customer can pay instantly.
You can also provide optional merchant data (payload) and a webhook URL to receive payment status updates automatically. All required fields are validated, and the payment can start immediately after the request.
To check whether the payment has been paid, you can either:
- Send a request to the
/infoendpoint to retrieve the current status of the payment, or - Specify a webhook URL when creating the payment and wait for the API to send status updates automatically.
HTTP Request
Section titled “HTTP Request”- Method:
POST - URL:
https://api.cru.cash/v1/invoice/create-payment - Headers:
Authorization: Bearer YOUR_API_KEY_HERE
Request Fields
Section titled “Request Fields”| Field | JSON Name | Type | Required | Description / Validation |
|---|---|---|---|---|
| Lifetime * | lifetime | int | true | Lifetime in minutes. Minimum 3, maximum 1440. |
| Crypto * | crypto | string | true | Cryptocurrency to receive. Examples: TON, USDT |
| Network * | network | string | true | Network for the chosen crypto. Examples: TON, TRC20 |
| Currency * | currency | string | true | Fiat currency in which the payment amount is specified. Allowed values: RUB, USD, EUR. |
| Amount * | amount | string | true | Payment amount in fiat. Minimum: 100 RUB, 1 USD, 1 EUR. Maximum: 10,000,000. |
| Payload | payload | string | false | Merchant-provided data attached to the payment. Optional. Length: 5–16384 characters. |
| Webhook | webhook | string | false | Webhook URL for notifications. Optional. Must use HTTPS. Length: 10–2048 characters. |
Response Fields
Section titled “Response Fields”| Field | JSON Name | Type | Description |
|---|---|---|---|
| Invoice ID | invoice_id | string | Unique ID of the created payment. |
| Payment Address | payment.address | string | Cryptocurrency address where the customer should send the payment. |
| QR Code URL | payment.qr_code | string | URL to a QR code |
| Amount to Pay | payment.amount_to_pay | string | Amount in cryptocurrency that the customer must pay. |
| Crypto Currency | payment.crypto | string | Cryptocurrency selected for the payment. |
| Network | payment.network | string | Network used for the selected cryptocurrency. |
| Expires At | payment.expires_at | int | Unix timestamp when this payment expires. |
| Testing Mode | test_mode | boolean | Indicates whether the payment was created in test mode. |
Request & Response Body Examples
Section titled “Request & Response Body Examples”| Header | Value | Description |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY_HERE | Your API key for authentication |
Request #1
Section titled “Request #1”{"lifetime": 30,"amount": "100","currency": "USD","webhook": "https://test-webhook.com","crypto": "TON","network": "TON","payload": "{\"product\":\"vpn_pro\",\"period\":30,\"user_id\":\"u_987654\",\"note\":\"Invoice for monthly VPN subscription\"}"}Response #1
Section titled “Response #1”{ "invoice_id": "912f953a-ad8d-4b69-9d4f-0b8248b43f15", "payment": { "address": "UQCN6vbcgz-f4UVvCvfYUOe3h7pln7yTiJNCVxIgIzcoenQg", "qr_code": "https://api.cru.cash/v1/payment/qr-code/912f953a-ad8d-4b69-9d4f-0b8248b43f15", "amount_to_pay": "75.253", "crypto": "TON", "network": "TON", "expires_at": 1770917295 }, "test_mode": false}