Lamba Product Documentation
Learn More
  • πŸ‘‹Welcome to Lamba
  • Overview
    • πŸ’‘Why Lamba?
    • 🍒Our Strategies for Solving Problems
    • β˜‘οΈReasons Why Lamba is Almost Costless!
    • πŸ”’Methods of Security Enforcement
  • Use Cases
    • πŸ‘ For E-commerce (collecting & splitting payments)
    • 🏹For CRMs
    • πŸ‘©β€πŸ’»For CMS
    • πŸ“§Building Email Apps
    • πŸ“©Building SMS Apps
    • πŸ§‘β€πŸ€β€πŸ§‘Building Social Media Publishing Apps
  • Getting Started
    • 🀝Creating Your First App
    • πŸ”Generating API keys & Enabling Services
    • πŸ”‘Recommended Security Considerations
  • Documentation
    • 🐦Understanding Lamba Model
    • ⛱️Lamba UI (JS Client)
      • πŸ‹Live Demo
      • πŸ§‘Installation & Initialization
      • πŸ“Structure of the Initialization Object
      • πŸ§‘How to use a service
        • Using LowMail
        • Using LowSMS
        • Using LowFi
      • 〽️Listening for Events
      • πŸ•ΈοΈHandling Webhooks
    • ♐Lamba API
      • πŸŽ†Endpoint & Authorization
  • Development Roadmap
    • πŸ—ΎRDMP 2023
    • πŸ—ΎRDMP 2024
  • Join The Team
    • πŸ«‚Bring On Your Skillset
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Lamba UI (JS Client)

Structure of the Initialization Object

Let's take a closer look at the parameters we passed when calling `Lamba`

Helpful tip: always refer back to this section for a proper list of all the parameters you can provide when initializing Lamba object.

Structure of the Init. object

The table below summarizes the different parameters that can be supplied when creating a new Lamba instance:

Property
Type
Meaning
Required

title

String

The name of your product, website or app

No

icon

String

The icon url of your product's logo. Helpful for white-labeling or branding the Lamba UI to your own taste.

No

theme

String

One of either light or dark should be selected to toggle between the light and dark modes of the Lamba UI. It's important to note that when you switch to either light or dark theme, you should ideally update the icon to an image that complements the chosen theme variation.

No

appId

String

The id of the app you created from your Lamba dashboard

Yes

customerId

String

The Customer ID of the user you added to your app (e.g cus_x1673). Do you remember what we discussed in the section Creating Your First App? Please do check it out.

The reason for utilizing your own product/model IDs for each user is to avoid the need to add a new column or record in your current database for tracking users newly created in your Lamba app. Consequently, the userId from your database can be employed to look up the corresponding user (i.e., customerId) in your Lamba app.

Yes

enabledServices

Array or Object

Helps you specify the kind of services you'd want to display in the Lamba UI. All services are shown by default, if omitted or set to an empty array

No

...

To enable only email services

...

To enable specific services and their contained products

lowFiConfig

Object

e.g

Helps you specify the payment structure of each payment gateway in the low_fi service

No (unless low_fi service is enabled

usageCapabilities

Array of String

(e.g one of ['connect'] and ['connect','use'])

Specifies if the customerId is limited to only connecting a service, or if they can both connect and utilize the services they have connected.

Yes (at least one of connect and use must be provided)

Available services and their corresponding products:

Service
Available Products

low_fi

"stripe" | "paystack" | "seerbit" | "flutterwave" | "budpay"

low_mail

"gmail" | "sendgrid" | "mailgun" | "postmark" | "custom"

low_sms

"twilio" | "infobip" | "clickatell" | "africastalking"

low_meet

"zoom" | "google_meet" | "microsoft_teams" | "calendly" | "webex"

low_social

"facebook" | "linkedin" | "instagram" | "x" | "reddit" | "tiktok" | "snapchat" | "pinterest" | "behance" | "dribble" | "telegram" | "youtube" | "discord" | ""

low_cms

"medium" | "hashnode" | "devto"

low_ai

"chatgpt"

PreviousInstallation & InitializationNextHow to use a service

Last updated 7 months ago

Was this helpful?

⛱️
πŸ“
['low_mail']
{low_mail: ["gmail","sendgrid"],low_fi:["stripe","paystack"],low_meet:["google_meet","microsoft_teams"]}
{
   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: "test@emaildomain.com",
   }, 
   flutterwave: { // (OPTIONAL)
     amount: 1500,
     currency: "NGN",
     payment_options: "card, ussd",
     customer: {
       email: "bose@sellmart.com",
       phone_number: "08102909304",
       name: "Bose Moday",
     },
   },
   budpay: { // (OPTIONAL)
     email: "test@emaildomain.com",
     amount: "200", //amount must be a string!
     currency: 'NGN', // Use GHS for Ghana Cedis or USD for US Dollars
   },
   seerbit: { // (OPTIONAL)
     email: "test@emaildomain.com",
     currency: "NGN",
     description: "testing...",
     amount: "150", //amount must be a string!
   },
   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: "test-email@domain.com", // refer to https://stripe.com/docs/api/payment_intents/create
      // split payment feature
      on_behalf_of: "{{CONNECTED_ACCOUNT_ID}}", // the subaccount id
      transfer_data: {
          destination: "{{CONNECTED_ACCOUNT_ID}}", // the subaccount id
          amount: 32, // amount the ticket seller should receive. // $32. will be automatically converted to cents by lamba
      }
  },
}

// 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`