Escrow Safe Trade is live: protect your next high-value deal Learn more
ProductsPayment links & checkoutM-Pesa, cards, invoices, split payoutsEscrow Safe TradeMilestone and release-based escrowWallets & P2PPersonal and business walletsChama, Lengo & DeniGroup savings, goals and IOUsBusiness toolkitAccounting, payroll, POS, ticketingBulk payments & payrollPay many people in one uploadSubscriptions & billingRecurring plans and renewalsRent, loans & donationsCollections and campaignsAll products
SolutionsMerchantsBuyersChama groupsBusiness solutionsIndustries
Pricing
DevelopersDeveloper overviewQuickstart, auth and sandboxREST APIsCheckout, invoices and requestsWebhooksSigned, real-time eventsWallet-as-a-ServiceVirtual sub-accountsDocumentationGuides and API reference
Security
CompanyAbout usCareersPartnersBlogHelp centreContact us
Log in Get started Talk to sales
Savings & credit

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.

Base URLhttps://api.paysasa.com/api/v1Authx-api-keyFormatJSON

Lengo 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.

POST/lengo/offers#

Create a merchant Lengo offer using your business API key or an authenticated dashboard session.

JavaScript
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).

POST/lengo/goals#

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.

JavaScript
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
  }),
});
POST/lengo/goals/:id/deposit#

Deposit from the customer's active personal wallet into the savings wallet backing the Lengo goal.

JavaScript
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"
  }),
});
GET/lengo/offers#

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.

JavaScript
// 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();
GET/lengo/offers/resolve#

Single-call resolver for embed widgets: pass offer_id or business_id + external_product_id.

JavaScript
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 page

Customer 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)

HTML
<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