Core concepts
Transaction IDs, references, payments, links and claims.
Transaction ID — the source of truth#
Every MoMo transfer has a Transaction ID chosen by the network (MTN, Telecel or AirtelTigo). LokiPay stores one record per (network, Transaction ID), and a Transaction ID can verify at most one payment, enforced by a unique constraint in the database. Re-sent SMS, duplicate claims and double clicks can never credit twice.
Payments (intents)#
A payment — called an intent in the API — is something you expect to be paid for: an order, an invoice, or one payer on a payment link. It has your reference (for example an order ID), an expected amount, an amount policy, and a LokiPay short reference the customer types when paying.
| Status | Meaning |
|---|---|
PENDING | Waiting for the customer to pay. |
CLAIM_SUBMITTED | The customer submitted a Transaction ID; waiting for that SMS to arrive. |
VERIFIED | Paid. Final. |
REVIEW | Something needs a human: wrong amount, mismatched reference, SMS never arrived… An admin approves or rejects it. |
EXPIRED | The reference window passed without payment. Customers can still claim with a Transaction ID during the claim window. |
CANCELLED | Cancelled by you before it was paid. Final. |
REJECTED | An admin rejected it from the review queue. Final. |
Short references#
References are 8 characters from an alphabet without look-alikes (no 0 O 1 I) and contain the marker LP at a random position — 4KLP7QMX, Q7MX2DLP, LP4GH3W2. The marker lets LokiPay find the reference anywhere in an SMS; the varying position avoids a fixed prefix on every transfer, which networks may flag.
Payment links#
A payment link is a reusable page with a fixed amount, like /pay/football-jersey. Every payer who presses Pay gets their own payment and reference, so payments never collide.
Claims (“I have paid”)#
If a customer forgot the reference or the SMS is late, they submit the Transaction ID from their MoMo confirmation. When the matching SMS arrives — or if it already has — LokiPay verifies the payment. See claims.
Relay phones#
The phone with the MoMo SIM runs the LokiPay Relay app. Each phone is paired once with a QR code and gets its own signing key; every request it sends is signed (HMAC-SHA256) and checked for replay. Revoking a phone in the dashboard disconnects it immediately.
Money#
All amounts are integers in pesewas (GHS 1.00 = 100) to avoid rounding errors. Currency is GHS.
Glossary
| Term | Meaning |
|---|---|
| Intent / payment | An expected payment created by a payment link or the API. |
| reference | Your own ID for the payment (order or invoice ID). Unique per purpose. |
| shortRef | The 8-character LokiPay reference the customer types in MoMo. |
| Transaction ID (TxID) | The network’s ID for the MoMo transfer, from the SMS. |
| Relay phone | The Android phone holding the MoMo SIM, running LokiPay Relay. |
| Review queue | Payments LokiPay could not settle on its own. |
