lomi.
Payment channels

How do I accept card payments?

Choose hosted checkout for most card flows, or embedded card collection when your app needs full UI control.

For most teams, card payments should start with hosted checkout. Use embedded card collection only when your product needs card entry inside your own UI.

Cards work on hosted checkout (fastest) or embedded flows with Payment Elements and POST /charge/card.

Card payment form on lomi. hosted checkout

Which card flow should I use?

FlowUse when
Hosted checkoutYou want the fastest, safest card experience
Payment linksYou want a card-capable shareable URL
Embedded card chargeYou own the checkout UI and can handle client confirmation
Payment ElementsYou want reusable card UI primitives in your application
  1. Create a checkout session.
  2. Customer selects Card and enters details on lomi.. page.
  3. Handle 3D Secure when the test card or issuer requires authentication.
  4. Verify with webhooks before fulfilling.

Embedded card charge

Embedded card charges (POST /charge/card) and Switch charges (POST /charge/switch) are not available yet and currently return 503 service_unavailable. Use hosted checkout for cards today.

  1. POST /charge/card → receive client_secret.
  2. Confirm with Payment Elements on your site.
  3. Poll or webhook for final transaction_status.

See Charges API and the direct charge reference app.

Sandbox test cards

PANBehavior
4242 4242 4242 4242Success
Decline / auth test numbersSee Sandbox payments

Never use real card numbers in test mode or test numbers in live mode.

Safety notes

  • Never handle secret keys in a browser or mobile app.
  • Treat client_secret values as short-lived sensitive capabilities.
  • Use publishable keys only where the card flow requires them.
  • Confirm final state from webhooks or server-side API reads.

On this page