Skip to main content
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

1

Include the Juicyway Library

Add the following script tag to the <head> section of your HTML:
2

Create the Payment Function

Define a JavaScript function to initialize the payment widget:
3

Implement the Payment Button

Create a button or link that triggers the payment widget:

Configuration Parameters

Required Parameters

string
required
A unique identifier for the payment transaction
number
required
The payment amount in the smallest denomination of the currency (e.g., cents for USD)
string
required
A three-letter ISO 4217 currency code (e.g., USD, NGN, CAD)
string
required
A short description of the payment
boolean
required
Set to true for production environment, false for sandbox testing
string
required
Your Juicyway API key
object
required
Order details object containing:

Optional Parameters

string
The name of your merchant’s business or application
object
Customer details object containing:
object
Payment method configuration:
object
Additional data related to the payment

Callback Functions

function
Called when the user closes the payment widget
function
Called when the payment is successfully completed
function
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).