Step-by-step guide to integrate the Juicyway Payment Widget
Include the Juicyway Library
<head>
<script src="https://checkout.juicyway.com/pay.js"></script>
Create the Payment Function
function openWidget() { Juicyway.PayWithJuice({ // Configuration options detailed below onClose: () => { // Called when user closes widget }, onSuccess: () => { // Called when payment is successful }, onError: (error) => { // Called when payment fails }, // Required parameters reference: "unique_ref_123", amount: 1000, currency: "USD", description: "Product purchase", isLive: true, key: "YOUR_API_KEY", order: { identifier: "ORDER123", items: [ { name: "E-book", type: "digital", qty: 1, amount: 1000 } ] }, // Optional parameters appName: "Your App Name", customer: { email: "customer@email.com", first_name: "Test", last_name: "Customer", phone_number: "+1234567890", billing_address: { line1: "123 Main St", city: "San Francisco", state: "CA", zip_code: "94105", country: "US" } }, paymentMethod: { type: "card" }, order: { // Additional payment order } }); }
Implement the Payment Button
<button onclick="openWidget()">Make Payment</button>
true
false
Show Properties
Show Item Properties
Show Address Properties