Skip to content
Meem Payment

API reference · Integration

Checkout sessions

Create a hosted checkout session and redirect the customer. The public session endpoints are called by the hosted page.

Create a checkout session

POST/api/v1/checkout/sessions

IntegrationBearer tokenPermission: checkout_sessions.manage

Create a hosted checkout session and get its URL.

Guide

Headers

  • Authorizationstringrequired
  • Content-Typestringrequired
  • X-Correlation-Idstringoptional
  • X-Merchant-Contextstringoptional

Request bodyapplication/json · CreateCheckoutSessionRequest

  • amountnumber (double)required

    Greater than zero.

  • currencystringrequirednullable

    ISO 4217, e.g. SAR.

  • orderRefstringnullable

    Your order reference, shown on the page and kept with the session.

  • successUrlstringnullable

    Absolute URLs the customer returns to.

  • failureUrlstringnullable

    Absolute URLs the customer returns to.

  • expiryMinutesinteger (int32)nullable

    Positive number of minutes. Default 30.

  • captureModestringnullable

    Automatic (default) captures on approval; Manual leaves the payment authorized for you to capture.

  • checkoutProfileIdstring (uuid)nullable

    An active checkout profile of yours (branding, method order, copy). Without it, your default active profile applies, else platform defaults. Unknown or inactive profiles return 422.

  • workflowIdstringnullable

    Pin a published routing workflow (id or code).

  • allowedPaymentMethodsarray<string>nullable

    Limit the methods offered, e.g. ["card", "mada"].

  • localestringnullable

    Page language, e.g. ar or en.

  • descriptionstringnullable

    Shown on the hosted page.

  • customerNamestringnullable

    Shown on the hosted page.

  • customerEmailstringnullable

    Shown on the hosted page.

The spec marks no fields as required; the required flags shown here come from the guide. Other constraints are reported as 422.

Status codes

The spec lists only 200 OK. The codes below follow the platform's status mapping. Errors guide

  • 201Created
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 422Validation or business rule (ValidationProblemDetails with code)
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 249.5,
    "currency": "SAR",
    "orderRef": "ORDER-2001",
    "successUrl": "https://shop.example.com/checkout/return",
    "failureUrl": "https://shop.example.com/checkout/return",
    "expiryMinutes": 30,
    "captureMode": "Automatic",
    "locale": "ar",
    "description": "Order #2001"
  }'
using System.Net.Http.Headers;
using System.Net.Http.Json;

using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("MEEM_ACCESS_TOKEN"));

using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions")
{
    Content = JsonContent.Create(new
    {
        amount = 249.5m,
        currency = "SAR",
        orderRef = "ORDER-2001",
        successUrl = "https://shop.example.com/checkout/return",
        failureUrl = "https://shop.example.com/checkout/return",
        expiryMinutes = 30,
        captureMode = "Automatic",
        locale = "ar",
        description = "Order #2001",
    })
};

using var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    amount: 249.5,
    currency: "SAR",
    orderRef: "ORDER-2001",
    successUrl: "https://shop.example.com/checkout/return",
    failureUrl: "https://shop.example.com/checkout/return",
    expiryMinutes: 30,
    captureMode: "Automatic",
    locale: "ar",
    description: "Order #2001",
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type CreateCheckoutSessionRequest = {
  amount?: number;
  currency?: string | null;
  orderRef?: string | null;
  successUrl?: string | null;
  failureUrl?: string | null;
  expiryMinutes?: number | null;
  captureMode?: string | null;
  checkoutProfileId?: string | null;
  workflowId?: string | null;
  allowedPaymentMethods?: string[] | null;
  locale?: string | null;
  description?: string | null;
  customerName?: string | null;
  customerEmail?: string | null;
};

const body: CreateCheckoutSessionRequest = {
  amount: 249.5,
  currency: "SAR",
  orderRef: "ORDER-2001",
  successUrl: "https://shop.example.com/checkout/return",
  failureUrl: "https://shop.example.com/checkout/return",
  expiryMinutes: 30,
  captureMode: "Automatic",
  locale: "ar",
  description: "Order #2001",
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
});

console.log(res.status, await res.text());
import os
import requests

response = requests.post(
    "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    json={
        "amount": 249.5,
        "currency": "SAR",
        "orderRef": "ORDER-2001",
        "successUrl": "https://shop.example.com/checkout/return",
        "failureUrl": "https://shop.example.com/checkout/return",
        "expiryMinutes": 30,
        "captureMode": "Automatic",
        "locale": "ar",
        "description": "Order #2001",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

{
  "sessionId": "ff2606f7-9ca8-4343-a2c4-018329ef501d",
  "token": "cs_<session_token>",
  "checkoutUrl": "https://checkout.sandbox.meem-dev.example/checkout?session=cs_<session_token>",
  "expiresAt": "2026-12-03T10:00:00+00:00",
  "amount": 249.5,
  "currency": "SAR",
  "orderRef": "ORDER-2001",
  "merchantName": "<your merchant name>"
}

Read a checkout session

GET/api/v1/checkout/sessions/{token}

IntegrationPublic

Read a session's order summary (used by the hosted page). 410 when expired.

No API token: called by the hosted checkout page or the customer's browser.

Guide

Path parameters

  • tokenstringrequired

Headers

  • X-Correlation-Idstringoptional

Request body

No request body.

Status codes

The spec lists only 200 OK. The codes below follow the platform's status mapping. Errors guide

  • 200OK
  • 404Unknown resource, or one that belongs to another merchant
  • 410Expired checkout session or unavailable payment link
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>"
using System.Net.Http.Headers;

using var http = new HttpClient();

using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>");

using var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>", {
  method: "GET",
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>", {
  method: "GET",
});

console.log(res.status, await res.text());
import requests

response = requests.get(
    "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>",
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet. See the guide for what it returns. Guide

Complete a checkout session

POST/api/v1/checkout/sessions/{token}/complete

IntegrationPublic

Finalize a session and get the merchant redirect URL (hosted page).

No API token: called by the hosted checkout page or the customer's browser.

Guide

Path parameters

  • tokenstringrequired

Query parameters

  • paymentIdstring (uuid)optional

Headers

  • X-Correlation-Idstringoptional

Request body

No request body.

Status codes

The spec lists only 200 OK. The codes below follow the platform's status mapping. Errors guide

  • 200OK
  • 404Unknown resource, or one that belongs to another merchant
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/complete"
using System.Net.Http.Headers;

using var http = new HttpClient();

using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/complete");

using var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/complete", {
  method: "POST",
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/complete", {
  method: "POST",
});

console.log(res.status, await res.text());
import requests

response = requests.post(
    "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/complete",
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet. See the guide for what it returns. Guide

Pay a checkout session

POST/api/v1/checkout/sessions/{token}/pay

IntegrationPublic

Pay a session from the hosted page (sandbox card entry).

No API token: called by the hosted checkout page or the customer's browser.

Guide

Path parameters

  • tokenstringrequired

Headers

  • Content-Typestringrequired
  • X-Correlation-Idstringoptional

Request bodyapplication/json · CheckoutPayRequest

  • cardNumberstringnullable
  • cardHolderstringnullable
  • expiryMonthinteger (int32)
  • expiryYearinteger (int32)
  • cvvstringnullable
  • paymentMethodstringnullable

The spec marks no fields as required. Constraints are enforced server-side and reported as 422.

Status codes

The spec lists only 200 OK. The codes below follow the platform's status mapping. Errors guide

  • 200OK
  • 404Unknown resource, or one that belongs to another merchant
  • 422Validation or business rule (ValidationProblemDetails with code)
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/pay" \
  -H "Content-Type: application/json" \
  -d '{
    "cardNumber": "<cardNumber>",
    "cardHolder": "<cardHolder>",
    "expiryMonth": 1,
    "expiryYear": 1,
    "cvv": "<cvv>",
    "paymentMethod": "<paymentMethod>"
  }'
using System.Net.Http.Headers;
using System.Net.Http.Json;

using var http = new HttpClient();

using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/pay")
{
    Content = JsonContent.Create(new
    {
        cardNumber = "<cardNumber>",
        cardHolder = "<cardHolder>",
        expiryMonth = 1,
        expiryYear = 1,
        cvv = "<cvv>",
        paymentMethod = "<paymentMethod>",
    })
};

using var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/pay", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    cardNumber: "<cardNumber>",
    cardHolder: "<cardHolder>",
    expiryMonth: 1,
    expiryYear: 1,
    cvv: "<cvv>",
    paymentMethod: "<paymentMethod>",
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type CheckoutPayRequest = {
  cardNumber?: string | null;
  cardHolder?: string | null;
  expiryMonth?: number;
  expiryYear?: number;
  cvv?: string | null;
  paymentMethod?: string | null;
};

const body: CheckoutPayRequest = {
  cardNumber: "<cardNumber>",
  cardHolder: "<cardHolder>",
  expiryMonth: 1,
  expiryYear: 1,
  cvv: "<cvv>",
  paymentMethod: "<paymentMethod>",
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/pay", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
});

console.log(res.status, await res.text());
import requests

response = requests.post(
    "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/pay",
    json={
        "cardNumber": "<cardNumber>",
        "cardHolder": "<cardHolder>",
        "expiryMonth": 1,
        "expiryYear": 1,
        "cvv": "<cvv>",
        "paymentMethod": "<paymentMethod>",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet. See the guide for what it returns. Guide

Expire a checkout session

POST/api/v1/checkout/sessions/{token}/expire

IntegrationPublic

Enforce session expiry, voiding any in-flight authorization.

No API token: called by the hosted checkout page or the customer's browser.

Guide

Path parameters

  • tokenstringrequired

Headers

  • X-Correlation-Idstringoptional

Request body

No request body.

Status codes

The spec lists only 200 OK. The codes below follow the platform's status mapping. Errors guide

  • 200OK
  • 404Unknown resource, or one that belongs to another merchant
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/expire"
using System.Net.Http.Headers;

using var http = new HttpClient();

using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/expire");

using var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/expire", {
  method: "POST",
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/expire", {
  method: "POST",
});

console.log(res.status, await res.text());
import requests

response = requests.post(
    "https://api.sandbox.meem-dev.example/api/v1/checkout/sessions/<token>/expire",
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet. See the guide for what it returns. Guide

3-D Secure callback

POST/api/v1/checkout/3ds/callback

IntegrationPublic

3-D Secure callback that resumes the payment after the challenge.

No API token: called by the hosted checkout page or the customer's browser.

Guide

Headers

  • Content-Typestringrequired
  • X-Correlation-Idstringoptional

Request bodyapplication/json · ThreeDsCallbackRequest

  • paymentIdstring (uuid)nullable
  • sessionTokenstringnullable
  • authenticatedboolean
  • versionstringnullable
  • authenticationPayloadstringnullable

The spec marks no fields as required. Constraints are enforced server-side and reported as 422.

Status codes

The spec lists only 200 OK. The codes below follow the platform's status mapping. Errors guide

  • 200OK
  • 422Validation or business rule (ValidationProblemDetails with code)
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl -X POST "https://api.sandbox.meem-dev.example/api/v1/checkout/3ds/callback" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentId": "<paymentId>",
    "sessionToken": "<sessionToken>",
    "authenticated": false,
    "version": "<version>",
    "authenticationPayload": "<authenticationPayload>"
  }'
using System.Net.Http.Headers;
using System.Net.Http.Json;

using var http = new HttpClient();

using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sandbox.meem-dev.example/api/v1/checkout/3ds/callback")
{
    Content = JsonContent.Create(new
    {
        paymentId = "<paymentId>",
        sessionToken = "<sessionToken>",
        authenticated = false,
        version = "<version>",
        authenticationPayload = "<authenticationPayload>",
    })
};

using var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/3ds/callback", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    paymentId: "<paymentId>",
    sessionToken: "<sessionToken>",
    authenticated: false,
    version: "<version>",
    authenticationPayload: "<authenticationPayload>",
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type ThreeDsCallbackRequest = {
  paymentId?: string | null;
  sessionToken?: string | null;
  authenticated?: boolean;
  version?: string | null;
  authenticationPayload?: string | null;
};

const body: ThreeDsCallbackRequest = {
  paymentId: "<paymentId>",
  sessionToken: "<sessionToken>",
  authenticated: false,
  version: "<version>",
  authenticationPayload: "<authenticationPayload>",
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/checkout/3ds/callback", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
});

console.log(res.status, await res.text());
import requests

response = requests.post(
    "https://api.sandbox.meem-dev.example/api/v1/checkout/3ds/callback",
    json={
        "paymentId": "<paymentId>",
        "sessionToken": "<sessionToken>",
        "authenticated": False,
        "version": "<version>",
        "authenticationPayload": "<authenticationPayload>",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet. See the guide for what it returns. Guide

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.