Checkout Javascript SDK
Embed fusbeast JavaScript checkout SDK in your website.
Include and modify this script in your app.
<!-- DOC: https://developer.fusbeast.com/fusbeast-checkout/checkout -->
<!--
Ensure:
//---------
<div id = "fuspayForm">
<button style = "display: none" id = "fuspay-close">X</button>
</div>
//-----------
is in your DOM
-->
<div id = "fuspayForm">
<!-- You can ommit the html elements if using $_fp.Pay(checkout_data) -->
<button style = "display: none" id = "fuspay-close">X</button>
<script src="https://api.fusbeast.com/checkout/fusbeast-inline.min.js"></script>
<input type = "hidden" name = "merchant_id" value = "M51505" />
<input type = "hidden" name = "reference" value = "FUS-10012" />
<input type = "hidden" name = "amount" value = "100" />
<input type = "hidden" name = "customer_name" value = "Emma O" />
<input type = "hidden" name = "customer_email" value = "[email protected]" />
<input type = "hidden" name = "customer_phone" value = "" />
<input type = "hidden" name = "callback_url" value = "" />
<input type = "hidden" name = "webhook_url" value = "" />
<!-- checkout_type = DIRECT or PAY_LINK -->
<input type = "hidden" name = "checkout_type" value = "DIRECT" />
<input type = "hidden" name = "payment_id" value = "" />
<input type = "hidden" name = "custom_name" value = "Pay Now" />
<input type = "hidden" name = "custom_logo" value = "" />
<input id = "fus-inline" type = "hidden" name = "inline" value = "true" />
<!-- TRIGGER WITH A BUTTON -->
<!-- <button id = "fpayBtn" type="button" onclick="$_fp.Pay()"> Pay </button> -->
<script>
var checkout_data = {
merchant_id: "M51505",
amount: "200", customer_name: "John Doe",
customer_email: "[email protected]", customer_phone: "",
callback_url: "", webhook_url: "", checkout_type: "DIRECT",
reference: "FIS-2002", payment_id: "", custom_name: "",
custom_logo: "", inline: true
}
$_fp.Pay(checkout_data) // this will use js obj (checkout_data )
//$_fp.Pay() // -- this will use html form element
</script>
</div>
checkout_type: DIRECT or PAY_LINK
payment_id is required if checkout_type is PAY_LINK
SDK
<script src="https://api.fusbeast.com/checkout/fusbeast-inline.min.js"></script>
Last modified 2yr ago