> 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/get-started-with-cryptopay/invoices.md).

# Test an Invoice

Before creating and testing a Invoices, we recommend reading the [**detailed Invoices guide**](https://developers.cryptopay.me/guides/invoices). It explains how Invoices work, including the available fields, Invoices flow, Unresolved Invoices settings, callbacks, payment statuses, and other important details.

You can create and test Invoices through your **Merchant Account** or the **API**.<br>

### **Create an Invoice via Merchant Account**

1. Go to **Payment Links** in your Merchant Account.
2. Create a new Payment Link.
3. Select the currency, enter the payment amount, and configure the required settings.
4. Create the Payment Link.
5. Open the created Payment Link to create the corresponding **Invoice**.

You can then use this Invoice address to make a test payment.<br>

### **Create an Invoice via the API**

After completing authentication, create an Invoice using the **Invoice API Reference**.

The response will contain the Invoice details, including its unique payment address, amount, currency, expiration time, and other relevant information. You can then use the Invoice to request a payment from your customer.

### How to pay for an Invoice

The easiest way to test an Invoice is to send a withdrawal from your own Sandbox account to the Invoice address. This way, you send funds from your own account to your own Invoice and can test both withdrawals and incoming Invoices in a single flow.

If you do not plan to integrate withdrawals via the API, you can make the withdrawal from your merchant cccount instead. Simply send funds from your Sandbox account to the Invoice address.

For details on how to create and test a withdrawal, see [**Test a Withdrawal**](https://developers.cryptopay.me/guides/get-started-with-cryptopay/payouts)<br>

{% hint style="warning" %}
Note: Make sure to test and correctly handle [all Unresolved scenarios](https://developers.cryptopay.me/guides/invoices/how-to-handle-unresolved-invoices). Your integration should not assume that an Invoice payment has been completed until the payment reaches the appropriate final status.
{% endhint %}

{% hint style="info" %}
Risk scoring is randomized on sandbox, which is why you see different risk scores for various transactions, ranging from low to high. On production, it’ll be based on the actual transaction risk score we determine.&#x20;
{% endhint %}

#### Result

After completing the test, you will see **two transactions** in your transaction history: **an invoice** and a coin withdrawal. \
If the invoice was created through the API, callbacks will be sent for this transaction according to your configured callback settings.
