Accept Crypto Payments
This is a break down on how to accept payments with Coinazer.
Overview
To accept a payment, create a transaction using our API our SDKs. Every transaction includes a link that can be used to complete payment.
Modal
Our Modal offers a straightforward and hassle-free payment process for web transactions. It provides the simplest way to integrate and start accepting payments.
API Requirements
To initiate a transaction, you'll need to provide specific information, including email, amount, and transaction reference. However, the only required parameters are the apiKey, email, amount and currency. The table below provides a comprehensive list of the parameters that can be passed during transaction initialization.
apiKey
Yes
Make sure to utilize the appropriate public key from Coinazer depending on whether you are operating in test mode or live mode. For testing purposes, employ the test key, and for actual transactions, utilize the live key.
Yes
Customer's email address
amount
Yes
The amount must be at least equivalent to $10 in any currency, such as Naira, Euro, or Kenyan shillings.
Currency
Yes
This is the currency customer's transaction would be carried out with. Supported currencies are USD, EUR, NGN, KES
callback
No
Upon successful payment, this function executes to verify the transaction status using the verify endpoint on the Coinazer API. It's recommended to utilize a script for this purpose.
closeWidget
No
Function that executes when a customer closes the payment window instead of making a payment
If the customer information has already been stored in your database, it can be retrieved from there. Alternatively, you can obtain it from a form, as shown in the example below:
Things to note
In this context, the 'apiKey' field requires your Coinazer public key.
The callback object methods fires at different moments of the transaction. Below is an explanation of each of the methods :
onLoadEvent
This method is responsible for loading the modal to the customer's page
onCloseEvent
This method closes the modal even before transaction has started
onTransactionCancel
This method is called when ongoing payment transaction is canceled has been
onSelectedCrypto
onTransactionSuccess
This method is called when payment has been completed successfully on the Coinazer checkout
OnTransactionRestart
This method logs a notification indicating the beginning of a payment transaction
Last updated