Skip to Content

Create invoice

XML: CreateInvoice · JSON: POST /invoices

Creates an invoice for a subscriber. The customer type determines the payment method: MobilePhoneCustomer (mobile carrier billing) or BankCardCustomer (card / SBP) — see the flow sections.

FieldTypeReq.Description
ProjectIDintYesProject ID
ClientIPstring(39)NoSubscriber IP
MSISDNstring(20)Yes*Phone number (for mobile carrier billing)
Emailstring(1000)NoUser e-mail
MerchantOrderIDstring(38)YesOrder ID in the Merchant’s system
CustomerPrice.amountmoneyNoAmount including fee
CustomerPrice.currencystring(3)NoCurrency (RUB by default)
CustomerPrice.includingVATboolNoAmount includes VAT
CreateIfNotExistsboolNoCreate the contract automatically (usually false)
MerchantContractIDstring(64)NoContract ID in the Merchant’s system
AppNamestring(256)NoApplication name
ProductNamestring(256)NoProduct name
ExpectedBillingResultenumNoSandbox: Success / Failed / SuccessSequencePayment / FailedSequencePayment

Response

FieldTypeDescription
InvoiceIDguidUnique invoice ID — store it!
MerchantOrderIDstring(38)Order ID
InvoiceStatusenumCreated / Billing / Processed / Cancelled / Refund
PaymentStatusenumPAID / NOT_PAID / PARTLY_PAID
AuthorizationTypeenumSMS_PIN / BY_CONTRACT / SKIP / AUTH_PAGE — see the reference
IsAuthorizedboolWhether authorization passed
BillingChannelenumCPA / MT / MC / BankRtp etc. — see the reference
ContractIDguidContract ID (if applicable)
Response (JSON)
// 201 Created — full request examples are in the flow sections { "success": true, "data": { "invoice_id": "1624505c-0031-00cf-7d54-4cf1ce08cb30", "status": "Created", "payment_status": "NOT_PAID", "authorization": { "type": "BY_CONTRACT", "is_authorized": true }, "price": { "amount": "99.00", "currency": "RUB", "vat_included": true }, "merchant_order_id": "ORDER-001", "billing_channel": "CPA" } }