EMBED Payment iFrame
Depending on who's paying (merchant or patient) will determine which payment methods are available as well as the configurations of those payment methods.
- Published Merchant Key = staff/merchant facing and will allow access to staff only payment methods such as cash
- Published Patient Key = consumer/patient facing and will allow access to patient only payment methods such as PayPal
From your frontend code, take the order id and order key from the create order response, and embed the payment page. The public key will dictate whether the merchant facing or consumer/patient.
This iFrame has been optimized for 500px wide but is responsive.
- Include (for Prod):
<script src="https://pay.featherpay.io/featherpaymerchant.js"></script>
- Include (for Staging):
<script src="https://gfp-pay.acdev.io/featherpaymerchant.js"></script>
- Create UI div in your page:
<div id="featherpay"></div>

var config =
{
orderId: 'orderId', // Received after creating an order
orderKey: 'orderKey', // Received after creating an order
publicKey: 'publicKey', // FeatherPay to provide per-store
selector: document.querySelector('#featherpay'),
onCancel: function () {},
onReady: function () {},
onComplete: function (order)
{
console.log(order.id, order.status, order.state);
}
};
var fp = new FeatherPay(config);
// Passing in a selector will auto embed for you, otherwise you can embed like this
var target = document.querySelector('#featherpay');
fp.embed(target);