lomi.
Customers

Create customer portal session

Create customer portal session

Overview

Create customer portal session

Returns a short-lived URL so the customer can manage subscriptions and payment methods in the hosted portal.

When to use this

Use from your app when a logged-in buyer opens “Manage billing” without building portal UI yourself.

See also

Portal audit log · List subscriptions

Authentication

Merchant routes require an API key in the X-API-KEY header (see Integration overview). Use a test key against https://sandbox.api.lomi.africa and a live key against https://api.lomi.africa.

Endpoint

POST /customers/{id}/portal-launch-session

Base URLs:

  • https://sandbox.api.lomi.africa
  • https://api.lomi.africa

Request

Path parameters

NameRequiredSchemaDescription
idYes-UUID du client

Query parameters

No query parameters.

Request body

JSON request payload.

Schema: object

FieldRequiredTypeDescription
return_urlNostring-
flow_typeNoenum ("portal_home", "subscription_cancel", "subscription_manage")-
flow_subscription_idNostring-
flow_after_completion_urlNostring-

Example body:

{
  "return_url": "string",
  "flow_type": "portal_home",
  "flow_subscription_id": "string"
}

Responses

StatusDescription
201Created successfully
401Invalid or missing API key
404Resource not found

Errors

Errors follow the standard JSON error format (status code and machine-readable message). Validate inputs before calling; 401 indicates a missing/invalid key, 404 a missing resource for this organization, 429 rate limiting. For safe retries on create-style calls, send an idempotency key when your flow supports it.

Example

curl -sS -X POST "https://sandbox.api.lomi.africa/customers/value/portal-launch-session" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_url":"string","flow_type":"portal_home","flow_subscription_id":"string"}'

OpenAPI

  • operationId: CustomersController_createPortalLaunchSession
  • Operation: POST /customers/{id}/portal-launch-session

Full schemas and Try it: API reference. Machine-readable contract: repo apps/docs/openapi.json.

On this page