How to integrate Payonix to your website
This tutorial will teach you how to integrate Payonix to your website and start accepting crypto payments.
- Go to https://app.payonix.io/merchant/create to create a new payment form (or go to the merchant page and click on “Create new payment form”
To use our API you will need your API key. To get the one associated with your account, go to the settings page in the dashboard. At the top, you’ll see your API key. You can press the button at the right of the API key to copy it to your clipboard.
Next, you need the ID of the form you want to create payments for. Go to the merchant section of the dashboard and select the form you want to use.
At the top, below the name of your form, you’ll see “Copy API ID”. You can click on it to copy the ID of the form to your clipboard.
Save both API key and Form ID to a secured place in your code that is not public so no one can make requests for you.
However, even if someone has your API key, the only thing they can do is create payments. That’s the only thing you can do with the API for now.
If you see suspicious activity with your API key, contact the support and we will give you a new one.
Now, in your back-end you need to use the API to create a payment and get a URL to redirect your users to.
In the front-end, when your users choose that they want to pay with crypto and then press a button to pay, you should call your back-end to create a payment.
In your back-end, you need to call the Merchant API with these parameters:
That’s it! 🎉
You can now get paid in crypto on your website.
⚠️ Don't ever re-use a URL that we send you!
It can lead to failed payments and odd things in some cases.
To avoid that, use the URLs that we send you only once.