Invoice hosted page

An invoice hosted page is a web page that you can embed into your website to display the payment details of a particular invoice to a customer.

There is a hosted_page_url attribute in the invoice details that contains its hosted page URL.

API response example
{
"id": "cc75b958-5780-4b34-a33a-cf63b349fbab",
"custom_id": "209584732",
"status": "new",
"status_context": null,
"address": "2NG8f2EVxN8XJ4DHriRt9q9LkdVCpQZ2UGB",
"uri": "bitcoin:2NG8f2EVxN8XJ4DHriRt9q9LkdVCpQZ2UGB?amount=0.02038328",
"price_amount": "100.0",
"price_currency": "EUR",
"pay_amount": "0.02038328",
"pay_currency": "BTC",
"fee": "1.0",
"fee_currency": "EUR",
"paid_amount": "0.0",
"exchange": {
"pair": "BTCEUR",
"rate": "4905.9838",
"fee": "0.0",
"fee_currency": "EUR"
},
"transactions": [],
"name": "invoice name",
"description": "invoice description",
"metadata": {
"foo": "bar"
},
"success_redirect_url": null,
"hosted_page_url": "https://hosted-business.cryptopay.me/invoices/cc75b958-5780-4b34-a33a-cf63b349fbab",
"created_at": "2019-05-02T13:56:56+00:00",
"expires_at": "2019-05-02T14:06:56+00:00"
}

Transaction detected

As soon as a sender broadcasts their transaction, you'll receive a callback with the following attributes:

"event": "transaction_created" "status": "new"

Transaction confirmed

You'll get one more callback upon transaction confirmation on the network:

"event": "transaction_confirmed" "status": "completed"

Invoice expired