Create "Buy Now" Button
Let us consider a case in which you run an online shop and want to accept cryptocurrency for your goods or services. To make the process quick and seamless for your customers, you can add a "Buy Now" button next to each item.
Using the CoinPayments API, you can enable your customers to complete their purchase with just a few clicks.
Here's how the process works:
Generate "Buy Now" Button
Generate "Buy Now" button via one of the following methods:
- Sending an API request to POST /merchant/invoices/buy-now-button
- On the CoinPayments Dashboard.
Display Generated HTML
Display the generated HTML within your website, rendering the "Pay Using CoinPayments" button.
<form action="https://a-api.coinpayments.net/api/v1/invoices/button" method="post">
<input type="hidden" name="action" value="checkout" />
<input type="hidden" name="data" value="..." />
<input type="image" src="https://a-api.coinpayments.net/checkout_buttons/pay_blue_small.svg" name="submit" style="width: 252px" alt="Buy Now with CoinPayments.net">
</form>Customer Clicks "Pay Using CoinPayments"
When the customer wants to purchase the merchant's product or service (usually immediately), they click the adjacent "Pay Using CoinPayments" button, initiating the payment flow:

Check Invoice Status
Check invoice status via:
- Email notifications
- Dashboard history
- Configured webhooks
- GET /merchant/invoices
