Lengo SNBL
Merchants publish offers, customers open a savings goal against one, and the item is released when the goal is met. Covers offers, goals, store discovery and the embeddable widget.
https://api.paysasa.com/api/v1Authx-api-keyFormatJSONLengo is the merchant-facing Save Now, Buy Later flow for Paysasa. Merchants create Lengo offers, customers open a goal against an offer, deposit into a savings wallet over time, and complete the goal when the target amount is reached. Requires a verified business by default — see Compliance & Trust.
Create a merchant Lengo offer using your business API key or an authenticated dashboard session.
const res = await fetch("https://api.paysasa.com/api/v1/lengo/offers", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "apk_live_a1b2c3d4.7f9e0a...",
},
body: JSON.stringify({
business_id: "biz_123",
title: "Mika Solar Cooker",
original_price: 250000,
lengo_price: 225000,
currency: "KES",
suggested_frequency: "weekly",
suggested_installment: 15000,
external_product_id: "sku_mika_001",
image_url: "https://merchant.example.com/images/cooker.jpg",
product_url: "https://merchant.example.com/products/mika-cooker",
default_saving_duration_days: 60
}),
});Optional default_saving_duration_days (14, 30, 60, or 90) sets the maximum saving window customers may choose (they can pick a shorter duration, not a longer one).
Customer-authenticated route to create a Lengo goal from an existing merchant offer. A savings wallet is auto-created if the customer does not already have one in the offer currency. Set saving_duration_days (14, 30, 60, or 90 — must be ≤ merchant maximum when set) or expires_at. Expired goals are refunded automatically. Email reminders fire at 7, 3, and 1 day(s) before save-by.
const res = await fetch("https://api.paysasa.com/api/v1/lengo/goals", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
offer_id: "lengo_offer_123",
frequency: "weekly",
installment_amount: 15000,
saving_duration_days: 60,
customer_auto_complete: false
}),
});Deposit from the customer's active personal wallet into the savings wallet backing the Lengo goal.
const res = await fetch("https://api.paysasa.com/api/v1/lengo/goals/lengo_goal_123/deposit", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
amount: 15000,
note: "Week 1 deposit"
}),
});Public catalog list. Filter by business_id, business_slug, external_product_id (requires business_id), status, currency, page, and limit. Response includes total, has_more, and public URLs per offer.
// Paginated catalog (default limit 24)
const res = await fetch(
"https://api.paysasa.com/api/v1/lengo/offers?business_id=biz_123&status=active&page=1&limit=24"
);
const { offers, total, has_more } = await res.json();Single-call resolver for embed widgets: pass offer_id or business_id + external_product_id.
const res = await fetch(
"https://api.paysasa.com/api/v1/lengo/offers/resolve?business_id=biz_123&external_product_id=sku_mika_001"
);
const { offer } = await res.json();
// offer.urls.embed → iframe widget URL
// offer.urls.public_page → shareable offer pageCustomer discovery surfaces#
/stores — public merchant & offer directory
/stores/:slug — single-store view
/stores/merchant/:businessId — store by business ID
/lengo/offers/:id — shareable offer page with sign-in → goal flow
/lengo/embed?offer_id=… — iframe widget (also supports SKU params)
<iframe
src="https://app.paysasa.com/lengo/embed?business_id=biz_123&external_product_id=sku_mika_001"
title="Save with Lengo"
width="100%"
height="420"
style="border:0;border-radius:12px;max-width:420px;"
loading="lazy"></iframe>Embed opens sign-in in the top window (OAuth-safe). After login, customers land on the Lengo dashboard with the offer pre-selected.
Merchant overview endpoints#
GET /lengo/stores — paginated businesses with active Lengo offers (page, limit)
GET /lengo/goals — customer goals (paginated)
GET /lengo/merchant/offers — paginated
GET /lengo/merchant/goals — paginated
GET /lengo/merchant/overview