Using LowFi
Enabling all payment products
function openBuilder(){
const lamba = new Lamba({
title: "Lamba",
icon: 'https://ik.imagekit.io/lambahq/lamba-dark.png',
theme: "light",
appId: "65aabeba6182d6903a2ea355",
customerId: "cus_x1847",
enabledServices: ["low_fi"], // enables all payment gateways in the `low_fi` service
lowFiConfig: {
orderId: String, // your unique orderId (in your DB) for this payment transaction (REQUIRED)
paystack: { // paystack gateway SDK initialization config/data (OPTIONAL)
amount: 100, // set the actual amount value here. Lamba will auto multiply it by 100 to convert to the lowest currency unit
currency: 'NGN', // Use GHS for Ghana Cedis or USD for US Dollars
email: "[email protected]",
// ... the rest of paystack config properties
},
flutterwave: {
// ... the rest of flutterwave config properties
},
seerbit: {
// ... the rest of seerbit config properties
},
budpay: {
// ... the rest of budpay config properties
},
stripe: { // processes only payment intents at the moment (OPTIONAL)
amount: 150, // $150. will be automatically converted to cents by Lamba
currency: "usd",
automatic_payment_methods: {
enabled: true,
allow_redirects: "never"
},
receipt_email: "[email protected]", // refer to https://stripe.com/docs/api/payment_intents/create
// split payment feature
payment_intent_data:{
transfer_data: {
destination: "{{CONNECTED_ACCOUNT_ID}}", // the subaccount id
amount: 125, // amount the destination (i.e the `connected_account_id`, typically a seller on your platform) should receive.
}
}
},
paypal:{
intent: "capture", // required
purchase_units: [{
amount: {
currency_code: "USD", // required
value: "10.00" // required
}
}],
items: [ // (optional)
{
name: "T-Shirt",
description: "Super Fresh Shirt",
unit_amount: {
currency_code: "USD",
value: "10.00"
},
quantity: "1",
},
],
query_params: {
"currency": "USD", // (optional)
"enable-funding": "venmo", // (optional)
}
}
// PLEASE TAKE NOTE OF THE FOLLOWING:
// * for each payment config in the lowFiConfig, do not specify a callback
// * function since it will be overriden with the inbuilt Lamba callback function.
// * Same goes for the onclose, onClose or close functions.
// *
// * `productId` in seerbit will be replaced with the `orderId` by the Lamba UI
// *
// * `last_name` in budpay will be replaced with the `orderId` by the Lamba UI
// *
// * public key for each payment gateway will be automatically injected & will override
// * existing ones
// *
// * transaction references will be automatically injected & will override
// * existing ones
// *
// * `ui_mode` in stripe will be overriden with `embedded`
},
usageCapabilities: ['connect','use'],
});
// call the `open` method on the lamba instance to open up the Lamba interface
lamba.open();
}
Enabling specific payment products
function openBuilder(){
const lamba = new Lamba({
title: "Lamba",
icon: 'https://ik.imagekit.io/lambahq/lamba-dark.png',
theme: "light",
appId: "65aabeba6182d6903a2ea355",
customerId: "cus_x1847",
enabledServices: {low_fi: ["stripe","paystack"]}, // enables only "stripe" and "paystack"
lowFiConfig: {...},
usageCapabilities: ['connect','use'],
});
// call the `open` method on the lamba instance to open up the Lamba interface
lamba.open();
}
When run, this would open up the Lamba UI with the finance product for the user to choose from and make a payment for your product.
function openBuilder(){
const lamba = new Lamba({
title: "Lamba",
icon: 'https://ik.imagekit.io/lambahq/lamba-dark.png',
theme: "light", // or "dark"
appId: "65aabeba6182d6903a2ea355", // (REQUIRED)
customerId: "cus_x1847", // (REQUIRED)
enabledServices: {low_fi: ["paystack","flutterwave"]}, // (OPTIONAL)
usageCapabilities: ['connect','use'], // (REQUIRED)
lowFiConfig: {
orderId: "order_28383",
paystack: {
amount: 100,
currency: 'NGN',
email: "[email protected]",
},
flutterwave: { // (OPTIONAL)
amount: 1500,
currency: "NGN",
payment_options: "card, ussd",
customer: {
email: "[email protected]",
phone_number: "08102909304",
name: "Bose Moday",
},
},
}
});
// open the Lamba dialog
lamba.open();
}
You should see a response like the one shown below, upon successful verification of your transaction:

Things you can build with the payment service on Lamba JS library and the API:
E-commerce Payment Gateway Integration:
Example: Seamlessly integrate payment processing solutions like Stripe or Paystack into your e-commerce platform, enabling customers to make secure and convenient online payments.
Subscription Service Billing:
Example: Implement recurring billing systems for subscription-based services, using Lamba's low_fi integrations to manage regular payments and subscription renewals.
Crowdfunding Platform Payment Management:
Example: Develop a crowdfunding platform where you can use Lamba's low_fi integrations to handle the collection and distribution of funds for various projects.
Donation Processing for Nonprofits:
Example: Create a system for nonprofits to receive donations online. Utilize Lamba's integrations to provide multiple donation options and process these transactions securely.
Split Payments in Marketplaces:
Example: For online marketplaces, implement a feature to split payments between sellers and the platform. This could be used to distribute revenues from sales, ensuring all parties receive their share.
Last updated
Was this helpful?