Generates an invoice for one or more campaigns in HTML format.


Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions 4 and 5, see the Migration guide.

The CreateInvoice (Live) version also exists for this method.

When calling this method, specify one or more campaigns and the amounts to pay that should be shown in the invoice. The method returns the URL of the invoice. Only the user who the method was called on behalf of can access the invoice (the user must log in on Yandex).


Direct advertisers can generate an invoice only when the campaign has been approved by a moderator (see the campaign parameter StatusModerate).

Recommendations and restrictions

Attention. All campaigns specified in the same method call must be of the same type. More information about campaign types

We recommend generating invoices using as few calls of the CreateInvoice method per day as possible. This recommendation is aimed at improving the performance of the Yandex.Direct API. In terms of productivity, it is better to generate one invoice for several campaigns at once than to generate separate invoices by calling the method multiple times.

Restrictions on method calls:

Exceeding these limits results in the error 56.

Input data

The input data structure in JSON is shown below.

Attention. It is mandatory to include the finance_token and operation_num parameters in the request. For more information, see the Accessing finance methods.
   "method": "CreateInvoice",
   "finance_token": (string),
   "operation_num": (int),
   "param": {
      /* CreateInvoiceInfo */
      "Payments": [
         {  /* PayCampElement */
            "CampaignID": (int),
            "Sum": (float)

Parameters are described below.

Parameter Description Required
CreateInvoiceInfo object
Payments Array of PayCampElement objects. Each object specifies the campaign and the amount to be displayed in the payment invoice. Yes
PayCampElement object
CampaignID The campaign ID. Yes
Sum The amount in Yandex units to be displayed in the payment invoice. Yes

Output data

If successful, the method returns the URL for the invoice, as shown below. If unsuccessful, an error message is returned.

   "data": ""

Examples of input data


   'Payments': [
      {'CampaignID': 3193279, 'Sum': 500.0}
      {'CampaignID': 3193244, 'Sum': 1200.0}


   'Payments' => array(
      array('CampaignID' => 3193279,'Sum' => 500.0)
      array('CampaignID' => 3193244,'Sum' => 1200.0)


   'Payments' => [
      {'CampaignID' => 3193279, 'Sum' => 500.0}
      {'CampaignID' => 3193279, 'Sum' => 1200.0}