lomi.
Payment Links

Create payment link

Create payment link

Overview

Create payment link

Creates a shareable link: product-backed links pull catalog amounts; instant links collect a fixed amount you specify.

When to use this

Use for invoices, social selling, or lightweight payment pages without building full checkout.

See also

List payment links · Checkout sessions

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 /payment-links

Base URLs:

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

Request

Path parameters

No path parameters beyond the URL pattern.

Query parameters

No query parameters.

Request body

JSON request payload.

Schema: object

FieldRequiredTypeDescription
link_typeYesenum ("product", "instant")-
titleYesstring-
currency_codeYesenum ("XOF", "USD", "EUR")-
descriptionNostring-
amountNonumber-
product_idNostring-
price_idNostring-
allow_coupon_codeNoboolean-
allow_quantityNoboolean-
require_billing_addressNobooleanWhen true, show and require billing address on checkout. Default when unset follows org settings, then false. See Checkout form fields.
require_nameNobooleanWhen true, show and require customer name. When false, hide the name field (display name falls back to email or phone). Default when unset: true. See Checkout form fields.
require_emailNobooleanWhen true, show and require email. When false, hide email. Default when unset: true. See Checkout form fields.
require_phoneNobooleanWhen true, show and require phone. When false, phone is optional if email is visible, or hidden if email is hidden. Default when unset: false. See Checkout form fields.
fieldsNoarray<object>Optional ordered checkout field schema. When provided, overrides require_* booleans.
expires_atNostring-
success_urlNostring-
cancel_urlNostring-
metadataNoobject-

Example body:

{
  "link_type": "product",
  "title": "string",
  "currency_code": "XOF"
}

Responses

StatusDescription
201Created successfully
400Bad request, invalid or missing parameters
401Invalid or missing API key

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/payment-links" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"link_type":"product","title":"string","currency_code":"XOF"}'

OpenAPI

  • operationId: PaymentLinksController_create
  • Operation: POST /payment-links

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

On this page