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
1
{
2
"id": "cc75b958-5780-4b34-a33a-cf63b349fbab",
3
"custom_id": "209584732",
4
"status": "new",
5
"status_context": null,
6
"address": "2NG8f2EVxN8XJ4DHriRt9q9LkdVCpQZ2UGB",
7
"uri": "bitcoin:2NG8f2EVxN8XJ4DHriRt9q9LkdVCpQZ2UGB?amount=0.02038328",
8
"price_amount": "100.0",
9
"price_currency": "EUR",
10
"pay_amount": "0.02038328",
11
"pay_currency": "BTC",
12
"fee": "1.0",
13
"fee_currency": "EUR",
14
"paid_amount": "0.0",
15
"exchange": {
16
"pair": "BTCEUR",
17
"rate": "4905.9838",
18
"fee": "0.0",
19
"fee_currency": "EUR"
20
},
21
"transactions": [],
22
"name": "invoice name",
23
"description": "invoice description",
24
"metadata": {
25
"foo": "bar"
26
},
27
"success_redirect_url": null,
28
"hosted_page_url": "https://business-hosted.cryptopay.me/invoices/cc75b958-5780-4b34-a33a-cf63b349fbab",
29
"created_at": "2019-05-02T13:56:56+00:00",
30
"expires_at": "2019-05-02T14:06:56+00:00"
31
}
Copied!

Settings

You can apply different settings to hosted pages appearance like a specific locale by adding its acronym to the end of the hosted_page_url value via a query parameter. For example:
Below is a list of variables you can use.
Parameter
Type
Description
locale
string
Can be en or jp which means Japanese or English language. en is set by default
back_button
boolean
Show/hide a back button on the page. This might be useful if you redirect customers to hosted pages. false if set by default
isShowQr
boolean
Show/hide a QR code on the page. false if set by default
theme
string
Controls the color design of the hosted page. light (by default) or dark.

Transaction created

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

Status changed

You'll receive one more callback when the invoice changes its status to one of the final ones (completed or refunded) upon transaction confirmation:
"event": "status_chaged"

Invoice expired

Last modified 13d ago