Skip to content

/create

This endpoint creates a new invoice for payment. You provide the payment amount and the currency in fiat (e.g., USD, EUR, RUB), and the API returns a pay_url that you should send to your customer to complete the payment.

The endpoint also allows optional UI customization via the ui object and supports specifying a webhook URL to receive payment status updates. All required fields are validated, and the API ensures that the invoice is ready for immediate use once created.

To check whether the invoice has been paid, you can either:

  1. Send a request to the /info endpoint to retrieve the current status of the invoice, or
  2. Specify a webhook URL when creating the invoice and wait for the API to send a payment status update automatically.
  • Method: POST
  • URL: https://api.cru.cash/v1/invoice/create
  • Headers: Authorization: Bearer YOUR_API_KEY_HERE

FieldJSON NameTypeRequiredDescription / Validation
Lifetime *lifetimeinttrueLifetime in minutes. Minimum 3, maximum 1440.
Amount *amountstringtruePayment amount in fiat currency. Minimum: 100 RUB, 1 USD, 1 EUR. Maximum: 10,000,000.
Currency *currencystringtrueCurrency in which the amount is specified. Allowed values: RUB, USD, EUR.
PayloadpayloadstringfalseMerchant-provided data attached to the invoice. Optional. Stored and forwarded as-is. Not visible to the client. Length: 5-16384 characters.
WebhookwebhookstringfalseWebhook URL for notifications. Optional. Must use HTTPS. Length: 10–2048 characters.
Ui.Descriptionui.descriptionstringfalsePayment description. Optional. Minimum 3, maximum 256 characters. Allowed characters: Latin letters, Cyrillic letters, digits, space, #.
Ui.RedirectUrlui.redirect_urlstringfalseRedirect URL after payment. Optional. Must use HTTP or HTTPS. Length: 10–2048 characters.
FieldJSON NameTypeDescription
Invoice IDinvoice.idstringUnique ID of the created invoice.
Expiration Timeinvoice.expires_atintUnix timestamp when the invoice expires.
Payment URLpay_urlstringURL to send to the customer to complete the payment.
Testing Modetest_modebooleanIndicates whether the invoice was created in test mode.
HeaderValueDescription
AuthorizationBearer YOUR_API_KEY_HEREYour API key for authentication

Creates a new invoice with a lifetime of 30 minutes and a payment amount of 100 USD. After the payment is completed, a webhook notification will be sent to https://test-webhook.com

{
"lifetime": 30,
"amount": "100",
"webhook": "https://test-webhook.com",
"currency": "USD",
"payload": "{\"product\":\"vpn_pro\",\"period\":30,\"user_id\":\"u_987654\",\"note\":\"Invoice for monthly VPN subscription\"}"
"ui": {
"description": "Payment for order #9876",
"redirect_url": "https://t.me/crucashbot"
}
}
{
"invoice": {
"id": "f2b19206-2003-4b16-b254-4418a07bac47",
"expires_at": 1768572610
},
"pay_url": "http://pay.cru.cash/invoice/f2b19206-2003-4b16-b254-4418a07bac47",
"test_mode": false
}