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.

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.

ParamRequiredDescription

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.

email

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:

 <form id="paymentForm">

  <div class="field-wrap">

    <label for="email">Email Address</label>

    <input type="email" id="email-address" required />

  </div>

  <div class="field-wrap">

    <label for="amount">Amount</label>

    <input type="tel" id="amount" required />

  </div>

  <div class="field-wrap">

    <label for="currency">Currency</label>

    <select id="currency">
      <option value="usd">US Dollar</option>
      <option value="ngn">Naira</option>
      <option value="eur">Euro</option>
      <option value="kes">Kesos</option>
    </select>

  </div>

  <div class="form-submit">

    <button type="submit"> Pay with Coinazer </button>

  </div>

</form>

 <script src="https://www.coinazer.com/public/js/embed.blockchain.js"></script>

Things to note

  1. In this context, the 'apiKey' field requires your Coinazer public key.

  2. The callback object methods fires at different moments of the transaction. Below is an explanation of each of the methods :

MethodsDescription

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