Create Your First Payment Intent

Executing a payment intent in Lipafy involves three simple steps: resolving a destination, submitting the intent with an idempotency key, and receiving real-time reconciliation.


Method A: Using TypeScript / Node.js SDK

Install the official Lipafy SDK:

$npm install @lipafy/sdk
1import { Lipafy } from '@lipafy/sdk'
2
3const lipafy = new Lipafy({
4 apiKey: process.env.LIPAFY_API_KEY!,
5})
6
7async function main() {
8 // 1. Create a Payment Intent (e.g. Safaricom Home Fibre Renewal)
9 const intent = await lipafy.payments.create({
10 paymentType: 'PAYBILL_PAYMENT',
11 paybill: '150501',
12 accountReference: '0722123456',
13 amountMinor: '300000', // KES 3,000.00
14 currency: 'KES',
15 purpose: 'Monthly Home Fibre Renewal',
16 })
17
18 console.log(`Payment Status: ${intent.status}`)
19 console.log(`Tracking ID: ${intent.id}`)
20}
21
22main().catch(console.error)

Method B: Using cURL

$curl -X POST https://api.lipafy.xyz/v1/payment-intents \
> -H "Authorization: Bearer lip_live_your_api_key" \
> -H "Idempotency-Key: fibre-renewal-2026-08" \
> -H "Content-Type: application/json" \
> -d '{
> "payment_type": "PAYBILL_PAYMENT",
> "paybill": "150501",
> "account_reference": "0722123456",
> "amount_minor": "300000",
> "currency": "KES",
> "purpose": "Monthly Home Fibre Renewal"
> }'

Response (201 Created):

1{
2 "id": "pi_9f83a2bc-d14e-4b92-8051-18239014819a",
3 "status": "SUCCEEDED",
4 "amount_minor": "300000",
5 "fee_minor": "0",
6 "currency": "KES",
7 "network_receipt": "QHK892N1P",
8 "destination": "PayBill 150501 (Ref: 0722123456)",
9 "purpose": "Monthly Home Fibre Renewal",
10 "created_at": "2026-08-17T00:00:00Z"
11}

Method C: Using Lipafy CLI

You can execute transfers and checks directly from your terminal:

$# Instant P2P @tag transfer
$npx lipafy transfer --to "@alice" --amount 1500 --note "Dinner split"
$
$# Pay a verified PayBill
$npx lipafy pay --paybill 150501 --account "0722123456" --amount 3000 --purpose "Fibre renewal"
$
$# Check wallet balance and active spending policy
$npx lipafy whoami