Cryptopay API
  • Welcome
  • Guides
    • Introduction
    • Environments
    • Creating a Test Account
    • API Credentials
    • API Basics
      • Responses
      • Date formats
      • Authentication
        • How it works
        • Signature
        • Creating a signature. Code samples
      • Callbacks
    • API Client Libraries
    • API Reference
    • Cryptocurrency Payments
    • Currencies
      • Supported Currencies
      • Currency Icons
    • Confirmations
    • Tools for accepting payments
    • Prebuilt integrations
      • E-commerce payment plugins
      • Payment and software providers
    • Channels
      • Channel payment
      • Payment statuses
      • Channel payment sequence
      • Create a Channel
      • Visual representation at Cashier
      • Channel hosted page
      • Channel payment callbacks
    • Invoices
      • Invoice statuses
      • Invoice payment sequence
      • How to handle unresolved invoices
        • Underpaid
        • Overpaid
        • Paid late
        • Illicit resource
        • Invoice refunds sequence
      • Create an invoice
      • Visual presentation at Cashier
      • Invoice hosted page
      • Online checkout
        • How-to
      • Payment links
      • Invoice callbacks
    • Payouts
      • Payout statuses
      • Payout sequence
      • Payout fees consideration
        • Network fees
      • Create a Coin Withdrawal
        • Possible errors
        • Withdrawals from fiat accounts
        • Withdrawals from cryptocurrency accounts
        • high_risk_address error message
      • Visual representation at Cashier
      • Minimum transaction amount
      • Coin Withdrawal callbacks
      • Travel Rule Compliance
    • Email Billing
      • Create an email billing
      • Email billing callbacks
    • Testing
      • Channels
      • Invoices
      • Payouts
    • Risks
    • Customers
    • Transactions types and Statuses
Powered by GitBook
On this page
  • Settings
  • Transaction created
  • Status changed
  • Invoice expired
  1. Guides
  2. Invoices

Invoice hosted page

PreviousVisual presentation at CashierNextOnline checkout

Last updated 6 months ago

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.

{
  "id": "cc75b958-5780-4b34-a33a-cf63b349fbab",
  "custom_id": "209584732",
  "status": "new",
  "status_context": null,
  "address": "2NG8f2EVxN8XJ4DHriRt9q9LkdVCpQZ2UGB",
  "network": "bitcoin",
  "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://business-hosted.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"
}

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, de, fr, es, pt, ru and jp which means English, German, French, Spanish, Portuguese, Russian or Japanese language.

If parameter is not set, the language will be taken from the browser settings.

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

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_changed"

Invoice expired

https://business-hosted.cryptopay.me/invoices/b5cb2b8a-aa26-4b6b-b578-0fcc46c1f3a0 + ?locale=jp