> For the complete documentation index, see [llms.txt](https://developers.cryptopay.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.cryptopay.me/guides/invoices/create-an-invoice.md).

# Create an invoice

Let’s take a look at our [API reference](https://reference.cryptopay.me/#tag/Invoices/operation/invoices.create) and go through the parameters that is used in order to create the invoice:

* `price_amount` - the payment amount&#x20;
* `price_currency` - the currency of payment, i.e. the currency into which the cryptocurrency received at the address of the invoice will be converted and in which the merchant will be credited to the balance, in our case it is `EUR`
* `pay_currency` - the cryptocurrency in which the payment is to be made, in our case it is `BTC`
* `network` - the blockchain in which the address is going to be created. The list of available networks can be found [here](https://developers.cryptopay.me/guides/currencies/currencies).
* `custom_id` - it is recommended to specify a certain reference by which you associate your customer with the payment, e.g. `209584732`
* `amount_includes_processing_fee` - *(bool)* — indicates whether the amount includes the processing fee; can be true or false. Set this parameter to `true` to charge the processing fee to the customer. Set it to `false` for the merchant to cover the processing fee.<br>

We have recently developed a feature called Merchant Bonus, which is available via API. This feature is optional and allows you to add a fee to the transaction amount that is credited to your balance.&#x20;

* `merchant_bonus_type` field can be set to either `percentage` or `fixed`
* `merchant_bonus_value` specifies the amount to be added to the transaction based on the selected type.

Here's the invoice request example:

{% code overflow="wrap" %}

```json
{
  "price_amount": "10.0",
  "price_currency": "EUR",
  "pay_currency": "SOL",
  "amount_includes_processing_fee": "true",
  "custom_id": "Custom-ID-123",
  "customer_id":"CUSTOMER-123",
  "merchant_bonus_type": "percentage",
  "merchant_bonus_value": "2.0",
  "description": "Invoice1",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "success_redirect_url": "https://example.com",
  "unsuccess_redirect_url": "https://example.com",
  "payer_email": "user@cryptopay.me"
}
```

{% endcode %}

You will receive the invoice address, the amount of cryptocurrency to be sent to the invoice address and a link to the invoice's hosted page, which can be built into your website and other details:

```json
{
    "data": {
        "status": "new",
        "status_context": null,
        "id": "b0be3e32-b75c-4f6c-bb54-3d7757f354d2",
        "custom_id": "Custom-ID-123",
        "customer_id": "CUSTOMER-123",
        "subscription_id": null,
        "address": "CpdVLz12mY1ne1VQAdxYgxhLwKU12ri1p123JR2Lkc12",
        "network": "solana",
        "uri": "solana:CpdVLz12mY1ne1VQAdxYgxhLwKU12ri1p123JR2Lkc12?amount=0.09832522",
        "price_amount": "10.0",
        "price_currency": "EUR",
        "pay_amount": "0.09832522",
        "pay_currency": "SOL",
        "fee": "0.0",
        "fee_currency": "EUR",
        "paid_amount": "0.0",
        "exchange": {
            "pair": "SOLEUR",
            "rate": "103.737377",
            "fee": "0.0",
            "fee_currency": "EUR"
        },
        "transactions": [],
        "name": null,
        "description": "Invoice1",
        "metadata": {
            "property1": "string",
            "property2": "string"
        },
        "success_redirect_url": "https://example.com",
        "unsuccess_redirect_url": "https://example.com",
        "hosted_page_url": "https://hosted-business-sandbox.cryptopay.me/invoices/b0be3e32-b75c-4f6c-bb54-3d7757f354d2",
        "created_at": "2026-09-24T13:53:04+00:00",
        "expires_at": "2026-09-24T14:03:04+00:00",
        "merchant_bonus_type": "percentage",
        "merchant_bonus_value": "2.0",
        "amount_includes_processing_fee": true

```

{% hint style="info" %}
We recommend that you check invoice statuses using [this endpoint](https://reference.cryptopay.me/#tag/Invoices/operation/invoices.retrieve) as a reliable way to double-check the current status when needed.
{% endhint %}

{% hint style="info" %}
It is important to note that funds should be only credited to the user balance when the payment status is updated to `completed`. The `price_amount` field for a payment with the status `completed` indicates the full amount of this processed payment.
{% endhint %}

{% hint style="info" %}
If a deposit is identified as high-risk, it’ll be placed on hold and reviewed by our colleagues in the Transaction Monitoring team, they might choose to credit/return it or request additional data from you. You’ll get an automatic email notification like this, and our support team will also reach out and advise on the next steps. More about risks here.&#x20;
{% endhint %}
