Similar to the redirect, Blinqpay Inline SDK allows you to begin accepting payments by following the procedures explained below.

A - OBTAIN API KEYS

API keys are an integral part of our SDK integration, and they can be obtained from your dashboard. Be advised to use the provided test keys while integrating / testing, and then switch to live keys for your production environment.

B - INCLUDE REQUIRED SCRIPTS

Get the required integration scripts and load them into your app

<form>
    <script src="https://plugins.blinqpay.io/bundle.js"></script>
    <button type="button" onclick="useBlinqpay()"> Pay</button>
</form>

C - INITIALIZE THE CHECKOUT MODAL WITH A TRANSACTION

Please follow the code snippet below

function useBlinqpay() {
  blinqpaySDK.init({
    publicKey: YOUR_PUBLIC_KEY,
    reference: "MST-" + Math.floor(Math.random() * 1000000000 + 4),
    amount: 5000.00,
    customerName: 'Test Client',
    customerEmail: '[email protected]',
    phoneNumber: '0800-Blinqpay',
    currency: 'NGN',
    callbackUrl: 'http://yourcallbackurl.com',
    onClose:   () => console.log('closed'),
    onSuccess: (data) => console.log(data),
    onFailure: (data) => console.log(data),
  });
}

PAYLOAD DETAILS

KeyRequiredDescription
publicKeytrueKeys gotten from your dashboard, and are dynamic based on Test or Live modes
referencetrueA unique alpha-numeric identifier for each transaction. An example is MST-8892A01
amounttrueTransaction amount (Minimum 100 Naira)
customerNametrueClient's name
customerEmailtrueClient's email
phoneNumbertrueClient's phone number
currencytrueTransaction currency - we currently support Naira
callbackUrltrueURL to redirect Clients to, upon successful / failed / cancelled transactions
onClose, OnSuccess, onFailuretrueExplained below

If all is done as instructed, the SDK modal pops up on the screen, and clients can make payments using any of the supported options. Please keep in mind that the test key obtained from your dashboard is to be used for test purposes only. Remember to switch to a live key for production environments.

D - RECEIVING SUCCESSFUL TRANSACTION NOTIFICATIONS

When a transaction has been made successfully, a notification would be sent to the webhook URL provided in your dashboard, which includes relevant details for specific transactions. The notification would have the format highlighted on the webhook section

Communicating with the Checkout through the embedded script

When the Checkout is loaded onto a browser and in use, certain actions ( as functions ) are exposed within the script to allow interactions with the Checkout, based on statuses or events. These are Required, and explained in details below

KeyTypeDetails
onSuccessFunctionActions for when a transaction is successful
onCloseFunctionActions for when the payment modal is closed
onFailureFunctionActions for when a transaction fails