How can I integrate OxaPay into my e-commerce website?

2 min. readlast update: 05.10.2025

You can use OxaPay’s Merchant API to accept crypto at checkout on any custom e-commerce site. The integration works by creating a crypto invoice for each order and handling payment confirmations via callbacks:

  1. Create an invoice after checkout: When the customer is ready to pay, call OxaPay’s Generate Invoice endpoint using your Merchant API key. Include the order amount and currency (and any options like expiration time or who covers fees) in the request. This will generate a unique payment invoice URL for that order.


  2. Redirect the customer to pay: Send the customer to the OxaPay payment link (you can redirect them or display it as a button/link). When they click it, they’ll be taken to our hosted payment page. There, the customer can select their preferred cryptocurrency and network for payment.


  3. Customer completes the crypto payment: The exact amount and a crypto address (and QR code) for the chosen coin will be displayed. The customer sends the cryptocurrency to that address using their wallet. OxaPay monitors the blockchain and updates the invoice status in real-time as the payment comes in.


  4. Receive payment notification (webhook): Once the transaction is detected, OxaPay will send a JSON callback (IPN) to your specified callback_url with all the payment details (invoice ID, amount, currency, and payment status). Note: The first callback may have a “paying” status (payment in progress).


  5. Verify the callback and payment status: On your server, verify the HMAC signature included in the callback headers using your OxaPay API key to ensure the notification is really from OxaPay. The final callback will have a “paid” status once the payment is fully received and confirmed by OxaPay. It’s best practice to wait for this "paid" status before fulfilling the order.


  6. Confirm the order: Once the callback indicates the payment is paid, update your order as paid in your system and deliver the goods or services. (If you set a return URL for the invoice, the customer can also click “Return to Website” after paying)

Was this article helpful?