Create an invoice
Let's create an invoice and then pay for it:
Let us go through the parameters we used in our request above:
price_amount
- the payment amountprice_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 isEUR
pay_currency
- the cryptocurrency in which the payment is to be made, in our case it isBTC
network
- the blockchain in which the address is going to be created. The list of available networks can be found here.custom_id
- we recommend you to specify a certain reference by which you associate your customer with the payment, e.g.209584732
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:
Tips for Making Invoice Payments
To pay for the invoice, it’s required to send a cryptocurrency transaction to the invoice cryptocurrency address - in this tutorial it is 3Gtvf2EVxN8XJ4DHriRt9q9LkdVCpQZEeSd
. To do so, log in to your sandbox account and press the "Send" button, which is located on your cryptocurrency wallet balance:
In the pop-up window, enter the address (address
from the received response) and the transaction amount (pay_amount
from the received response), and complete the process. You can also automate this process with this endpoint so that you do not have to create payments manually.
Once the payment is made, we will send the callbacks to the Callback URL.
We recommend that you check invoice statuses via GET /api/invoices/:id
using this endpoint as the delivery of the callbacks is not guaranteed.
Below is an example of a callback for the final status completed
of the payment:
It is important to note that cash from the payment is only credited to the merchant 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.
Last updated