Shopify
Install lomi. Shopify app (custom install), enable cart pay, and accept mobile money and cards via hosted checkout sessions and signed webhooks.
Shopify
lomi. Shopify app lets merchants accept Wave, mobile money, cards, and more from the cart page using lomi. hosted checkout. Customers pay on lomi.; Shopify orders are created as draft orders before redirect and completed when payment succeeds.
This is a cart bypass integration distributed as a custom install app. It is not a native Shopify payment method in checkout and is not listed on the Shopify App Store for payments.
Related products
- API keys: Dashboard → Developers → API keys
- Webhooks: Dashboard webhooks — subscribe to
PAYMENT_SUCCEEDEDandREFUND_COMPLETED - Hosted checkout: Checkout, where shoppers pay after redirect
- Integrations: Dashboard → Payment channels → Integrations for OAuth install
Requirements
- Shopify store with lomi.. app installed (custom install link from lomi.)
- lomi. merchant account with secret API key and webhook signing secret
- Store currency supported by lomi. (e.g. XOF, USD, EUR)
- HTTPS on the app host (
connect.lomi.africain production)
Distribution is via custom install from the lomi. dashboard (not a public GitHub release).
Step 1, Install the app
From lomi. dashboard (recommended)
- Go to dashboard.lomi.africa → Settings → Payment channels → Integrations.
- Toggle Shopify on and enter your store domain (e.g.
my-store.myshopify.com). - Click Install on Shopify and complete OAuth.
Install URL pattern: https://connect.lomi.africa/install?shop={your-store}.myshopify.com
Step 2, Connect API keys
- Open the embedded app → Settings.
- Paste your Test secret key (
lomi_sk_test_…) and Test webhook secret (whsec_…). - Click Connect to lomi.
The app uses the key prefix to select sandbox vs live API (test keys → sandbox).
Step 3, Check Setup health
The Setup health panel should show:
- API secret key: Configured
- API connection:
GET /mesucceeded - Test mode: Sandbox API (test key)
When switching to live, paste a live secret key and matching live webhook secret together.
Step 4, Connect webhooks
- Copy the Webhook URL from Settings (
{app_host}/api/webhooks/lomi/payment-success). - In dashboard → Webhooks, create the endpoint.
- Enable
PAYMENT_SUCCEEDEDandREFUND_COMPLETED. - Paste the signing secret into app Settings.
Step 5, Add the cart block
Online Store → Themes → Customize → Cart → add Pay with lomi. app block → save.
Step 6, Run a test payment
- Add items to cart and click Pay with lomi.
- Complete sandbox payment on hosted checkout.
- Confirm the Shopify draft order is completed.
Go live
Replace test key + webhook secret with live credentials (same Settings screen) and run one small real payment.
Setup checklist (reference)
- In the app Settings, paste your lomi. secret key and webhook secret.
- In dashboard.lomi.africa → Webhooks, create an endpoint:
- URL:
{app_host}/api/webhooks/lomi/payment-success(shown in Settings) - Event:
PAYMENT_SUCCEEDED - Signing secret: same value as in the Shopify app Settings
- URL:
- Choose shipping mode:
- Subtotal only: charge cart line items only
- Subtotal + flat shipping fee: add a fixed shipping amount to the draft order
- In Online Store → Themes → Customize → Cart, add the Pay with lomi. app block and save.
- Test with a cart containing one or more items.
Payment flow
- Customer adds items to cart and clicks Pay with lomi. on the cart page.
- Theme block reads
/cart.jsand callsPOST /apps/lomi/cart-pay(app proxy, signed by Shopify). - App creates a Shopify draft order with all cart line items (and optional flat shipping).
- App calls
POST /checkout-sessionson lomi. with amount = draft order total and metadata (shopify_draft_order_id,shopify_shop, etc.). - Customer completes payment on lomi. Checkout.
- lomi. sends
PAYMENT_SUCCEEDEDwebhook → app completes the existing draft order in Shopify. - Customer lands on
/shopify/order-complete; cart is cleared and order reference is shown.
Webhooks
| Header | Role |
|---|---|
X-Lomi-Event | Must be PAYMENT_SUCCEEDED to complete the draft order |
X-Lomi-Signature | HMAC-SHA256 hex of raw body, secret = dashboard webhook secret |
Metadata used for reconciliation:
shopify_shopshopify_draft_order_idshopify_draft_order_nameshopify_checkout_session_id
Limitations
- Not a Payments Partner / native checkout payment method (no Shop Pay, no checkout UI gateway).
- Shipping and tax from Shopify checkout are not available on the cart page, use subtotal only or a flat shipping fee in app settings.
- Refunds are handled in lomi. dashboard, not automatically from Shopify Admin.
- Do not submit this cart-bypass flow to the public Shopify App Store (Shopify policy on bypassing checkout).
Go-live QA
| Scenario | Expected |
|---|---|
| Single-item cart | One line on draft order; lomi amount matches draft total |
| Multi-item / qty > 1 | All variants and quantities on draft order |
| Subtotal-only mode | No shipping line on draft order |
| Flat shipping mode | Draft total = subtotal + configured fee |
| Successful payment | Draft order completed; cart cleared on success page |
| Webhook retry | No duplicate Shopify orders |
| Cancel on lomi. | Customer returns to /cart; draft stays open |
Related
- E‑commerce hub
- WooCommerce: reference for hosted checkout + webhook contract
- Webhooks