Reference
API reference
The Meem Payment REST API lives under /api/v1. Endpoints are generated from the OpenAPI document the platform publishes, grouped by resource, with request examples in cURL, C#, JavaScript, TypeScript and Python. Meem publishes no SDKs, so every example is a plain HTTP call.
- Snapshot:
- 3 December 2026 ·
main@87ab8e8 - OpenAPI
- Payment Orchestration API v1 · OpenAPI 3.0.1
- endpoints
- 201 endpoints · 37 for merchant integrations
Base URLs
Sandbox and production are separate environments with separate credentials, and they never fall back to each other. The hosts below are placeholders; your real hosts are provided at onboarding.
| Environment | Base URL |
|---|---|
| Sandbox | https://api.sandbox.meem-dev.example/api/v1 |
| Production | https://api.meem-dev.example/api/v1 |
Authentication
Integrations authenticate with the OAuth 2.0 client credentials grant. Send your client id and secret to POST /api/v1/auth/token as a form, as JSON, or with HTTP Basic, and receive a short-lived, merchant-scoped bearer token.
Send the token on every call as Authorization: Bearer <access_token>. Cache it and reuse it until shortly before expires_in. Repeated failures lock the client out.
Endpoints marked Public are called by the hosted checkout page or the customer's browser and take no token. Console users sign in with a password and a TOTP code instead; integrations should not use those endpoints.
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/auth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=$MEEM_CLIENT_ID" \
--data-urlencode "client_secret=$MEEM_CLIENT_SECRET"{
"access_token": "<jwt>",
"token_type": "Bearer",
"expires_in": 900,
"scope": "payments.authorize payments.capture payments.void payments.refund payments.read checkout_sessions.manage payment_links.read payment_links.manage webhooks.read webhooks.manage"
}Request headers
| Header | When | Purpose |
|---|---|---|
Authorization | Every non-public endpoint | Bearer <access_token> from POST /api/v1/auth/token. |
Content-Type | Requests with a body | application/json. |
Idempotency-Key | POST /api/v1/payments, /{id}/capture, /{id}/void, /{id}/refund | A fresh UUID per logical operation. Scoped per merchant and endpoint. A replay returns the original response; 409 while the first request is in flight; the same key with a different body returns 422 IDEMPOTENCY_KEY_REUSED. Guide |
X-Correlation-Id | Any request (optional) | Any value you can search for. Echoed in the X-Correlation-Id response header and correlationId, passed to gateway calls and included in webhooks as correlation_id. Generated when omitted. Guide |
X-Merchant-Context | Parent merchants acting for a sub-account (optional) | The sub-account's merchant id. Verified server-side; it can only narrow access. Otherwise 403 merchant_context.forbidden. Guide |
Errors and status codes
The HTTP status tells you the kind of outcome and the code field tells you which one. Branch on codes, never on messages. Payment operations return a PaymentResponse; field validation returns ValidationProblemDetails with a code extension when there's a machine-readable reason.
| Status | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 202 | Accepted |
| 400 | Malformed request |
| 401 | Missing, expired or invalid token or credentials |
| 402 | Declined by the issuer or PSP, or blocked by a risk rule |
| 403 | Authenticated but not allowed (permission or merchant context) |
| 404 | Unknown resource, or one that belongs to another merchant |
| 409 | Conflict: idempotency key in flight, or not allowed in the current status |
| 410 | Expired checkout session or unavailable payment link |
| 422 | Validation or business rule (ValidationProblemDetails with code) |
| 429 | Rate limit exceeded; wait for Retry-After |
| 501 | Hosted fields outside the sandbox |
| 502 | No gateway could process the payment |
Rate limits
A global limit applies per user or IP, with a stricter limit on the authentication endpoints and account lockouts after repeated failures. Over the limit you get 429: wait for Retry-After, then retry.
Versioning
The API version is part of the path: every endpoint lives under /api/v1, and the OpenAPI document declares version v1.
The platform documents its API with Swagger (Swashbuckle) at /swagger. This reference is generated from a snapshot of that document, taken on the date shown above.
Resources
Merchant integration
What a merchant backend, the hosted checkout page and the customer's browser call.
- Authentication4 endpointsExchange client credentials for a short-lived, merchant-scoped bearer token (OAuth 2.0 client credentials). Console sign-in endpoints are listed too.
- Payments10 endpointsAuthorize (or purchase with
capture: true), capture, void and refund, then inspect a payment's timeline, routing trace and redacted API calls. - Checkout sessions6 endpointsCreate a hosted checkout session and redirect the customer. The public session endpoints are called by the hosted page.
- Payment links11 endpointsCreate, list, cancel, regenerate and share payment links. Public link endpoints are called from the customer's browser.
- Webhooks4 endpointsRegister webhook endpoints (signed with HMAC-SHA256 in
X-Webhook-Signature), list failed deliveries and replay them. - Recovery4 endpointsDecline recovery in hosted checkout: the customer chooses another card or eligible method after a conclusive decline.
- Hosted fields2 endpointsCard entry in one iframe per field. Sandbox only today; production card capture needs PSP tokenization.
Console and back office
Used by the Meem console. Not part of the merchant integration surface and may change without notice.
- Routing workflows18 endpointsCreate, list, assign and archive Routing Studio workflows, manage payment-option triggers and bindings, start from templates, and import, export or convert flat rules.
- Workflow versions and publishing11 endpointsThe version lifecycle of a routing workflow: Draft, Validated, Approved, Published, Archived. Save drafts, validate, submit for maker-checker approval, publish, schedule, roll back and export.
- Workflow simulation and analytics10 endpointsTest and observe routing workflows: saved scenarios, simulation (no payments are created), replay of past payments against a version, per-workflow analytics and the drafts-only AI assistant.
- Routing rules10 endpointsFlat routing rules, with simulation, history and analytics.
- Gateway accounts15 endpointsPer-merchant PSP accounts with their own priority, currencies, schemes, methods and countries. An account activates only after a passing Test Connection. Credentials are write-only.
- Gateways and providers22 endpointsThe platform provider catalogue and capability matrix, gateway health, eligibility explanations and inbound PSP webhooks (verified, fail-closed).
- Refund approvals4 endpointsMaker-checker approval of refunds above a threshold.
- Reports4 endpointsSeven report types (transaction, gateway performance, merchant, refund, settlement, reconciliation, routing) with filters and CSV/XLSX export.
- Settlements and reconciliation7 endpointsSettlement records with a manual status workflow, and reconciliation runs that match a settlement file against payments and resolve discrepancies.
- Risk and BIN intelligence16 endpointsMerchant and platform risk rules, risk events, BIN lookups and the decline-code mappings.
- Checkout profiles7 endpointsBranding, per-locale copy, method order and recovery settings for hosted checkout.
- Merchants and sub-accounts14 endpointsMerchants, one level of sub-accounts with inheritance, merchant users, API credentials and platform defaults.
- Users and MFA7 endpointsConsole users, roles and TOTP multi-factor enrolment.
- Alerts, audit and remediation5 endpointsOperational alerts, the append-only audit log and approval-gated remediation tasks (for example, a reversal after a late success).
- Sandbox simulators10 endpointsSimulated BNPL sessions and the simulated 3-D Secure issuer challenge used in the sandbox.
Documentation reflects the platform as verified on 3 December 2026. Placeholder hosts and credentials are used throughout; your real sandbox host and keys are provided at onboarding.