Skip to content
Meem Payment

Accept payments

Payment links

A payment link is a non-guessable URL that opens a hosted checkout session for your customer. Share it by email, chat or QR code; no website integration needed.

Create a link

POST/api/v1/payment-links
Bearer tokenPermission: payment_links.manage
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payment-links" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500,
    "currency": "SAR",
    "merchantReference": "INV-3001",
    "description": "Invoice INV-3001",
    "customerEmail": "customer@example.com",
    "expiresAt": "2026-12-31T20:59:59Z",
    "singleUse": true,
    "successUrl": "https://shop.example.com/paid",
    "metadata": {
      "invoice": "INV-3001"
    }
  }'

Response (from the API contract)

{
  "id": "3b0f8f0e-7f61-4bf6-9a2f-6c5a1d0e9b11",
  "merchantId": "<merchant_id>",
  "publicId": "<public_id>",
  "url": "https://checkout.sandbox.meem-dev.example/link/<public_id>",
  "qrCodeUrl": "/api/v1/public/payment-links/<public_id>/qr.svg",
  "amount": 500,
  "minAmount": null,
  "maxAmount": null,
  "currency": "SAR",
  "merchantReference": "INV-3001",
  "expiresAt": "2026-12-31T20:59:59+00:00",
  "maxUses": 1,
  "singleUse": true,
  "usedCount": 0,
  "reservedCount": 0,
  "status": "Active",
  "createdAt": "2026-12-03T09:00:00+00:00"
}

Send the customer to url. qrCodeUrl is a public SVG of the same URL that you can embed in an email or invoice.

Request body

amountnumberoptional
Fixed amount. Omit it and set minAmount to let the customer enter the amount.
minAmount · maxAmountnumberoptional
Bounds for a customer-entered amount. Positive; minAmount ≤ maxAmount.
currencystringoptional
Three-letter ISO code. Defaults to SAR.
singleUsebooleanoptional
Defaults to true (one successful payment). Set false for a reusable link.
maxUsesintegeroptional
For reusable links: at least 1. Omit for unlimited uses.
expiresAtstring (date-time)optional
Must be in the future.
merchantReference · descriptionstringoptional
Your reference and the text shown to the customer.
customerName · customerEmail · customerPhonestringoptional
Optional customer details. customerEmail must contain @.
itemsarray<PaymentLinkItem>optional
Line items: name, quantity ≥ 1, unitPrice ≥ 0.
allowedPaymentMethodsarray<string>optional
Known method codes only, e.g. card, mada.
workflowIdstringoptional
Pin a published routing workflow.
checkoutProfileIdstring (uuid)optional
One of your active checkout profiles.
successUrl · failureUrlstringoptional
Absolute https URLs.
metadatamap<string, string>optional
Your own key-value pairs.

Customer-entered amount

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payment-links" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "minAmount": 10,
    "maxAmount": 1000,
    "currency": "SAR",
    "description": "Donation",
    "singleUse": false,
    "maxUses": 500
  }'

Validation errors return 422 with code payment_link.invalid and a message naming the problem.

Manage links

EndpointPurpose
GET /api/v1/payment-links?status=ActiveList links, optionally by status.
GET /api/v1/payment-links/{id}Retrieve one link.
GET /api/v1/payment-links/{id}/paymentsPayments made through the link.
GET /api/v1/payment-links/statsCounts and totals across your links.
POST /api/v1/payment-links/{id}/cancelCancel. A fully used link can't be cancelled (409).
POST /api/v1/payment-links/{id}/regenerateIssue a new public URL; optional new expiresAt.
POST /api/v1/payment-links/{id}/shareSend by email or sms to a recipient.
linkId="<link_id>"

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payment-links/$linkId/regenerate" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "expiresAt": "2027-01-31T20:59:59Z"
  }'

Link statuses

StatusMeaning
ActiveOpen for payment; no successful payment yet.
PendingA single-use link with a payment in progress.
PartiallyUsedA reusable link with at least one successful payment and uses left.
PaidA single-use link that was paid.
UsageLimitReachedA reusable link that reached maxUses.
Expired · CancelledPast expiresAt, or cancelled.

What the customer's browser calls

The link page uses public endpoints keyed by the link's publicId: GET /api/v1/public/payment-links/{publicId} for the summary, POST …/{publicId}/open to start a checkout session (with amount for open-amount links), and GET …/{publicId}/qr.svg for the QR code. An unavailable link returns 410. Payments from links are recorded on channel link, so workflow triggers can route them separately.

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.