LakiPay Biller

Overview

LakiPay Biller collects recurring money for a merchant. The merchant sells a product. Each product has one or more pricing plans. Each plan has one billing model, which decides both the amount and whether the customer pays in advance or in arrears. A customer is the person who pays. A subscription puts that customer on one plan. A bill is the amount owed for one period. A usage record is the data usage some packages need before that amount exists. A manual payment is a bank-transfer receipt matched to a bill.

Base URL

Base URL

text
https://{host}/api/v2

Every path in the API reference is relative to that base. Example: POST /api/v2/biller/products/create.

API capabilities

With a merchant API key you can:

  • Create and manage products, pricing plans, and billing models
  • Create and manage customers and subscriptions
  • Record usage and manual amounts
  • Read bills and their timeline
  • Start hosted checkout for a bill
  • Register banks and submit, confirm, approve, or reject receipts
  • Receive bill, product, subscription, and manual-payment events on your callback_url

Domain model

Objects nest under the merchant. Create them in order: product (with plans and models) → customer → subscription → usage (if arrears) → bill → checkout or manual receipt.

Catalog side

  1. 1

    Merchant

    FiberHub — owns all biller data

  2. 2

    Product

    Fiber Internet — category + callback

  3. 3

    Pricing plan

    Starter, Plus, Pro, Flex packages

  4. 4

    Billing model

    FIXED (advance) or usage/manual (arrears)

Customer side

  1. 1

    Customer

    Abel Bekele — the person who pays

  2. 2

    Subscription

    Account HUB-10042 on one package

  3. 3

    Usage / bill

    Period charge → checkout or receipt

  4. 4

    Manual bank + receipt

    Transfer proof matched to a bill

Quickstart

Do this against a sandbox merchant and a test key. The bodies are in the API reference.

  1. 1

    Create product + plans

    POST /api/v2/biller/products/create with at least one pricing plan and billing model. Save product_id, pricing_plan_id, and billing_model_id.

  2. 2

    Create customer

    POST /api/v2/biller/customers for Abel. Save customer_id.

  3. 3

    Subscribe account

    POST /api/v2/biller/products-user/create for account HUB-10042. Save product_user_id.

  4. 4

    Post usage (arrears only)

    For Flex or any usage/tiered/hybrid/manual plan, post POST /api/v2/biller/usage/record or POST /api/v2/biller/usage/manual before the period ends.

  5. 5

    Start checkout

    When a bill exists, POST /api/v2/biller/products-user/payment/initiate and send the customer to checkout_url.

  6. 6

    Fulfill on bill:paid

    On your callback, store the event and fulfill only on bill:paid.