Inline checkout integration

This page demonstrates Juspay's ability to complete the checkout in the same page. If authentication is required, then it is conducted using a popup window (which has a substantially higher effective conversion rate).

  • 1

    Create Order

Generate    
   

Purchase order is created at this point. This is required prior to payment.

curl https://api.juspay.in/order/create \
    -u 67E855BCFE924B20AA3A7BF5CD5BF4F7: \
    -d "amount=400.00" \
    -d "order_id=guest_ord_110011" \
    -d "customer_id=guest_user_101" \
    -d "customer_email=customer@mail.com" \
    -d "customer_phone=919988665522"
  • 2

    Pay using inline checkout

-

<script type="text/javascript" 
    src="https://api.juspay.in/pay.js"></script>

<!-- The payment form goes here. -->
<!-- You need to validate the form. -->
<!-- Ensure form elements don't have name attr. -->

<script type="text/javascript">
    Juspay.Setup({
        payment_form: "#payment_form",
        success_handler: function(status) {},
        error_handler: function(error_code, error_message, bank_error_code, bank_error_message, gateway_id) {}
    })
</script>