lomi. Network
Create payments, checkout sessions, refunds, and transaction reads for connected Member Accounts.
lomi. Network lets an approved Operator organization act on behalf of connected Member Accounts. A Member Account is a real lomi. organization with a public account id such as acct_123....
Network requests use an active Operator secret API key plus Lomi-Account: acct_.... Without Lomi-Account, every endpoint behaves like the normal merchant API.
Concepts
| Term | Meaning |
|---|---|
| Operator | The organization that owns the API key and initiates delegated requests. |
| Member Account | The connected organization receiving the payment, checkout session, transaction, or refund. |
acct_... | Public Network account id for a Member Account. Operators use it in the Lomi-Account header. |
| Membership | The active relationship between one Operator and one Member Account. |
| Capability | Permission granted per membership and environment, such as payment.create or refund.create. |
| Operator fee | Optional fee rule recorded for reporting and later settlement. |
Headers
POST /charge/card HTTP/1.1
Host: api.lomi.africa
X-API-KEY: lomi_sk_live_operator_...
Lomi-Account: acct_1234567890
Content-Type: application/jsonThe API key environment controls the request environment. A test key requires test-mode capability grants; a live key requires live-mode grants.
Supported endpoints
| Endpoint | Capability |
|---|---|
POST /charge/card | payment.create |
POST /charge/wave | payment.create |
POST /charge/mtn | payment.create |
POST /checkout-sessions | payment.create |
GET /transactions, GET /transactions/{id} | transaction.read_own or transaction.read |
GET /charge/card/{id} | transaction.read_own or transaction.read |
GET /customers, GET /customers/{id} | customer.read |
POST /customers, PATCH /customers/{id} | customer.write |
GET /customers/{id}/transactions | customer.read |
POST /refunds | refund.create |
GET /refunds, GET /refunds/{id} | transaction.read_own or transaction.read |
If Lomi-Account is sent to another endpoint, the API rejects the request instead of silently switching organization scope.
Example
curl -X POST "https://api.lomi.africa/checkout-sessions" \
-H "X-API-KEY: $LOMI_OPERATOR_API_KEY" \
-H "Lomi-Account: acct_1234567890" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency_code": "XOF",
"title": "Order #12345",
"success_url": "https://example.com/success"
}'The checkout session is owned by the Member Account. The hosted checkout page shows the Member Account branding and providers. Network context is recorded separately so the Operator can view delegated performance in the Network dashboard.
Customers
Network customer API calls create and update customers under the Member Account organization. lomi. records Network metadata on customers created by an Operator, and customer lists include customers created by that Operator or attached to delegated Network transactions.
Idempotency
For endpoints that support Idempotency-Key, Operators still send a normal idempotency key. lomi. scopes the internal key by Network Membership and includes Lomi-Account in the request fingerprint, so two Operators targeting the same Member Account do not collide.
Common authorization errors
| Message | Meaning |
|---|---|
network_account_not_found | The acct_... id does not exist. |
network_account_not_active | The Member Account is not active for Network. |
operator_not_active | The API-key organization is not an active Operator. |
Network requests require a secret API key | Publishable keys cannot be used for delegated Network requests. |
network_membership_not_found | The Operator is not connected to that Member Account. |
network_membership_not_active | The connection exists but is not active. |
network_capability_missing | The membership does not have the required capability for this environment. |
Reporting
Operator reporting is available in the dashboard Network panel. Normal Transactions pages and normal transaction APIs stay scoped to the current organization unless Lomi-Account is supplied.