Widget Integration Guide
Step-by-step guide to integrate the Juicyway Payment Widget
This guide will walk you through the process of integrating the Juicyway Payment Widget into your application.
Overview
The Juicyway Payment Widget provides a secure and customizable payment solution that can be easily integrated into your website or application. Follow these steps to implement the widget in your platform.
Integration Steps
Include the Juicyway Library
Add the following script tag to the <head>
section of your HTML:
Create the Payment Function
Define a JavaScript function to initialize the payment widget:
Implement the Payment Button
Create a button or link that triggers the payment widget:
Configuration Parameters
Required Parameters
A unique identifier for the payment transaction
The payment amount in the smallest denomination of the currency (e.g., cents for USD)
A three-letter ISO 4217 currency code (e.g., USD, NGN, CAD)
A short description of the payment
Set to true
for production environment, false
for sandbox testing
Your Juicyway API key
Order details object containing:
Optional Parameters
The name of your merchant’s business or application
Customer details object containing:
Payment method configuration:
Additional data related to the payment
Callback Functions
Called when the user closes the payment widget
Called when the payment is successfully completed
Called when an error occurs during payment processing
For security purposes, always ensure you’re using the correct API key for your environment (test or live).