Lexpay Docs
Getting Started
Welcome to the API documentation for the Lexpay payments platform. This API lets you connect Lexpay to your custom store, app, or backend so you can issue cards, accept payments, and manage payouts.
Base URL
All API requests should be made to:
All requests should be made over HTTPS. The API accepts and returns data in JSON format.
https://api.lexpay.comFor sandbox/testing, use the sandbox base URL instead:
https://api.sandbox.lexpay.comRate Limiting
The Lexpay API enforces rate limits to ensure fair usage across all merchants. The current limits are:
- 500 Requests / Hour
If you exceed the limit above, you will receive a 429 Too Many Requests response.
Authentication
The Lexpay API uses API keys to authenticate every request. Generate keys from your dashboard under Settings → API Keys. Send the key as a Bearer token in the Authorization header.
curl https://api.lexpay.com/v1/payouts \
-H "Authorization: Bearer lx_live_..." \
-H "Content-Type: application/json"Never expose live keys in client-side code. Treat them like passwords and rotate them if compromised.
Sandbox Mode
Sandbox mode lets you test the full Lexpay flow — card creation, checkout, webhooks, payouts — without moving real money. Use the sandbox base URL together with your test API key (prefixed lx_test_).
https://api.sandbox.lexpay.comAPI Reference
Every Lexpay endpoint, grouped by resource. All routes require a Bearer token.
Intercom
Sync customer conversations and tickets between Lexpay and Intercom to centralise merchant support.
/v1/intercom/threadsList all synced Intercom conversation threads./v1/intercom/threadsPush a new ticket from Lexpay into Intercom./v1/intercom/threads/{id}Retrieve a single thread with messages.curl https://api.lexpay.com/v1/intercom/threads \
-H "Authorization: Bearer lx_live_..."Store Add-on
Install, configure and uninstall the Lexpay add-on inside connected storefronts (WooCommerce, Magento, custom).
/v1/store-addonsList installed add-ons for the authenticated merchant./v1/store-addonsInstall a new add-on with provided config./v1/store-addons/{id}Uninstall an add-on.curl -X POST https://api.lexpay.com/v1/store-addons \
-H "Authorization: Bearer lx_live_..." \
-d '{ "platform": "woocommerce", "store_url": "https://shop.example.com" }'Webhook Logs
Inspect webhook delivery attempts, response codes and payloads for debugging integrations.
/v1/webhook-logsList recent webhook delivery attempts (paginated)./v1/webhook-logs/{id}Retrieve a single delivery with request/response body./v1/webhook-logs/{id}/retryManually retry a failed delivery.curl https://api.lexpay.com/v1/webhook-logs?status=failed \
-H "Authorization: Bearer lx_live_..."Webhooks
Subscribe an HTTPS endpoint to event notifications such as payment.succeeded, payout.paid, dispute.opened.
/v1/webhooksList configured webhook endpoints./v1/webhooksCreate a webhook endpoint with selected event types./v1/webhooks/{id}Delete a webhook endpoint.curl -X POST https://api.lexpay.com/v1/webhooks \
-H "Authorization: Bearer lx_live_..." \
-d '{ "url": "https://example.com/hooks", "events": ["payment.succeeded"] }'Ping
Lightweight health check used to verify connectivity, latency and authentication.
/v1/pingReturns { ok: true, time } when the API is reachable.curl https://api.lexpay.com/v1/ping \
-H "Authorization: Bearer lx_live_..."Cart Recovery
Track abandoned carts and trigger automated recovery emails or payment links.
/v1/cart-recoveryList abandoned carts within a date range./v1/cart-recovery/{id}/remindSend a recovery reminder for a cart.curl https://api.lexpay.com/v1/cart-recovery?from=2026-01-01 \
-H "Authorization: Bearer lx_live_..."Customers
Create and manage customer profiles, payment methods and saved billing information.
/v1/customersList all customers (paginated)./v1/customersCreate a new customer./v1/customers/{id}Retrieve a customer by id./v1/customers/{id}Update a customer.curl -X POST https://api.lexpay.com/v1/customers \
-H "Authorization: Bearer lx_live_..." \
-d '{ "email": "buyer@example.com", "name": "Ada Lovelace" }'Auth
Issue, rotate and revoke OAuth tokens used by partner apps and Connect integrations.
/v1/auth/tokenExchange credentials for a short-lived access token./v1/auth/revokeRevoke an active token.curl -X POST https://api.lexpay.com/v1/auth/token \
-d '{ "grant_type": "client_credentials", "client_id": "...", "client_secret": "..." }'Disputes
Manage chargebacks and dispute lifecycle: submit evidence, accept loss, or withdraw a dispute.
/v1/disputesList open and historical disputes./v1/disputes/{id}Retrieve a dispute with reason and evidence./v1/disputes/{id}/evidenceUpload evidence files.curl https://api.lexpay.com/v1/disputes?status=needs_response \
-H "Authorization: Bearer lx_live_..."Refunds
Issue full or partial refunds on captured payments. Refunds settle back to the original payment method.
/v1/refundsCreate a refund for a payment id./v1/refunds/{id}Retrieve refund status.curl -X POST https://api.lexpay.com/v1/refunds \
-H "Authorization: Bearer lx_live_..." \
-d '{ "payment_id": "pay_123", "amount": 2500, "currency": "AED" }'Store Referrals
Track referral codes used to onboard new merchants and calculate revenue share for partners.
/v1/referralsList referral codes and their conversion stats./v1/referralsCreate a new referral code.curl https://api.lexpay.com/v1/referrals \
-H "Authorization: Bearer lx_live_..."Reserves
View rolling reserves held to cover potential refunds and chargebacks. Reserves release on a schedule.
/v1/reservesCurrent reserve balance and release schedule./v1/reserves/historyHistorical reserve movements.curl https://api.lexpay.com/v1/reserves \
-H "Authorization: Bearer lx_live_..."Shopify Integrations
Connect a Shopify store, sync orders, and route checkout through Lexpay as a payment provider.
/v1/shopify/connectBegin OAuth handshake with a Shopify store./v1/shopify/storesList connected Shopify stores./v1/shopify/stores/{id}Disconnect a Shopify store.curl -X POST https://api.lexpay.com/v1/shopify/connect \
-H "Authorization: Bearer lx_live_..." \
-d '{ "shop": "my-store.myshopify.com" }'Onboarding
Submit KYC documents and business details required to activate a merchant account.
/v1/onboarding/applicationsCreate a new onboarding application./v1/onboarding/applications/{id}/documentsUpload KYC document./v1/onboarding/applications/{id}Get current application status.curl -X POST https://api.lexpay.com/v1/onboarding/applications \
-H "Authorization: Bearer lx_live_..." \
-d '{ "business_name": "Acme FZCO", "country": "AE" }'Withdrawals
Move available balance from your Lexpay account to an external bank or crypto wallet.
/v1/withdrawalsInitiate a withdrawal to a verified destination./v1/withdrawals/{id}Get withdrawal status.curl -X POST https://api.lexpay.com/v1/withdrawals \
-H "Authorization: Bearer lx_live_..." \
-d '{ "amount": 100000, "currency": "USD", "destination": "bank_acc_123" }'Payouts
Schedule and review payouts to merchants, vendors or affiliates. Supports SEPA, SWIFT and Lightning.
/v1/payoutsCreate a payout./v1/payoutsList payouts./v1/payouts/{id}Retrieve a payout.curl -X POST https://api.lexpay.com/v1/payouts \
-H "Authorization: Bearer lx_live_..." \
-d '{ "amount": 50000, "currency": "EUR", "method": "sepa", "iban": "AE07..." }'Checkout Sessions
Create hosted checkout sessions. Lexpay returns a URL you redirect customers to.
/v1/checkout/sessionsCreate a new checkout session./v1/checkout/sessions/{id}Retrieve session details (status, amount, customer).curl -X POST https://api.lexpay.com/v1/checkout/sessions \
-H "Authorization: Bearer lx_live_..." \
-d '{ "amount": 9900, "currency": "AED", "success_url": "https://example.com/ok" }'Balance Changes
Atomic ledger entries describing every change to your account balance (charges, refunds, payouts, fees).
/v1/balance-changesList balance changes (filter by type, currency, date)./v1/balance-changes/{id}Retrieve a single ledger entry.curl https://api.lexpay.com/v1/balance-changes?currency=AED \
-H "Authorization: Bearer lx_live_..."Payment Links
Generate shareable URLs that collect a fixed or variable amount from a buyer without any code.
/v1/payment-linksCreate a new payment link./v1/payment-linksList payment links./v1/payment-links/{id}Deactivate a payment link.curl -X POST https://api.lexpay.com/v1/payment-links \
-H "Authorization: Bearer lx_live_..." \
-d '{ "amount": 19900, "currency": "USD", "description": "Consulting hour" }'Analytics
Aggregate metrics for volume, success rate, refund rate, MRR and top customers.
/v1/analytics/summaryTopline KPIs for a date range./v1/analytics/seriesTime-series for a chosen metric.curl "https://api.lexpay.com/v1/analytics/summary?from=2026-05-01&to=2026-06-01" \
-H "Authorization: Bearer lx_live_..."API Keys
Programmatically create, list and revoke API keys. Scoped keys are recommended for partner integrations.
/v1/api-keysList API keys (live + sandbox)./v1/api-keysCreate a new API key with optional scopes./v1/api-keys/{id}Revoke an API key.curl -X POST https://api.lexpay.com/v1/api-keys \
-H "Authorization: Bearer lx_live_..." \
-d '{ "name": "Server key", "scopes": ["payments:read"] }'Fraud Protection
Score transactions in real time, manage block/allow lists, and review flagged payments before capture.
/v1/fraud/rulesList active fraud rules./v1/fraud/rulesCreate a custom rule (e.g. block country)./v1/fraud/reviewsList payments awaiting manual review.curl -X POST https://api.lexpay.com/v1/fraud/rules \
-H "Authorization: Bearer lx_live_..." \
-d '{ "type": "block_country", "value": "XX" }'