Skip to content
Meem Payment

API reference · Integration

Authentication

Exchange client credentials for a short-lived, merchant-scoped bearer token (OAuth 2.0 client credentials). Console sign-in endpoints are listed too.

Console sign-in

POST/api/v1/auth/login

ConsolePublic

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

Used by the Meem console. Not part of the merchant integration surface and may change without notice.

Headers

  • Content-Typestringrequired
  • X-Correlation-Idstringoptional

Request bodyapplication/json · LoginRequest

  • usernamestringnullable
  • passwordstringnullable
  • mfaCodestringnullable

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/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "<username>",
    "password": "<password>",
    "mfaCode": "<mfaCode>"
  }'
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/auth/login")
{
    Content = JsonContent.Create(new
    {
        username = "<username>",
        password = "<password>",
        mfaCode = "<mfaCode>",
    })
};

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/auth/login", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    username: "<username>",
    password: "<password>",
    mfaCode: "<mfaCode>",
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type LoginRequest = {
  username?: string | null;
  password?: string | null;
  mfaCode?: string | null;
};

const body: LoginRequest = {
  username: "<username>",
  password: "<password>",
  mfaCode: "<mfaCode>",
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/auth/login", {
  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/auth/login",
    json={
        "username": "<username>",
        "password": "<password>",
        "mfaCode": "<mfaCode>",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet.

Get an access token

POST/api/v1/auth/token

IntegrationClient credentials

Exchange API client credentials for a short-lived bearer token.

Guide

Headers

  • X-Correlation-Idstringoptional

Request body

Not described in the spec. Send grant_type=client_credentials with your client_id and client_secret as a form, as JSON, or with HTTP Basic; see the example.

Status codes

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

  • 200OK
  • 400Malformed request
  • 401Missing, expired or invalid token or credentials
  • 429Rate limit exceeded; wait for Retry-After

Example request

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"
using System.Net.Http.Json;

var http = new HttpClient { BaseAddress = new Uri("https://api.sandbox.meem-dev.example") };

using var response = await http.PostAsync("/api/v1/auth/token", new FormUrlEncodedContent(new Dictionary<string, string>
{
    ["grant_type"] = "client_credentials",
    ["client_id"] = Environment.GetEnvironmentVariable("MEEM_CLIENT_ID")!,
    ["client_secret"] = Environment.GetEnvironmentVariable("MEEM_CLIENT_SECRET")!,
}));
response.EnsureSuccessStatusCode();

var token = await response.Content.ReadFromJsonAsync<TokenResponse>();
Console.WriteLine($"Bearer token valid for {token!.expires_in} s");

record TokenResponse(string access_token, string token_type, int expires_in, string scope);
const BASE_URL = "https://api.sandbox.meem-dev.example";

const res = await fetch(`${BASE_URL}/api/v1/auth/token`, {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: new URLSearchParams({
    grant_type: "client_credentials",
    client_id: process.env.MEEM_CLIENT_ID,
    client_secret: process.env.MEEM_CLIENT_SECRET,
  }),
});
if (!res.ok) throw new Error(`Token request failed: ${res.status}`);

const { access_token, expires_in } = await res.json();
console.log(`Bearer token valid for ${expires_in} s`);
type TokenResponse = {
  access_token: string;
  token_type: "Bearer";
  expires_in: number; // seconds
  scope: string; // space-separated permissions
};

const BASE_URL = "https://api.sandbox.meem-dev.example";
let cached: { token: string; expiresAt: number } | null = null;

/** Returns a cached bearer token, refreshing it a minute before it expires. */
export async function getAccessToken(): Promise<string> {
  if (cached && Date.now() < cached.expiresAt - 60_000) return cached.token;

  const res = await fetch(`${BASE_URL}/api/v1/auth/token`, {
    method: "POST",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    body: new URLSearchParams({
      grant_type: "client_credentials",
      client_id: process.env.MEEM_CLIENT_ID!,
      client_secret: process.env.MEEM_CLIENT_SECRET!,
    }),
  });
  if (!res.ok) throw new Error(`Token request failed: ${res.status}`);

  const data = (await res.json()) as TokenResponse;
  cached = { token: data.access_token, expiresAt: Date.now() + data.expires_in * 1000 };
  return data.access_token;
}
import os
import requests

BASE_URL = "https://api.sandbox.meem-dev.example"

response = requests.post(
    f"{BASE_URL}/api/v1/auth/token",
    data={
        "grant_type": "client_credentials",
        "client_id": os.environ["MEEM_CLIENT_ID"],
        "client_secret": os.environ["MEEM_CLIENT_SECRET"],
    },
    timeout=30,
)
response.raise_for_status()
token = response.json()
print(f"Bearer token valid for {token['expires_in']} s")

Example response

{
  "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"
}

Refresh a console session

POST/api/v1/auth/refresh

ConsolePublic

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

Used by the Meem console. Not part of the merchant integration surface and may change without notice.

Headers

  • Content-Typestringrequired
  • X-Correlation-Idstringoptional

Request bodyapplication/json · RefreshRequest

  • refreshTokenstringnullable

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/auth/refresh" \
  -H "Content-Type: application/json" \
  -d '{
    "refreshToken": "<refreshToken>"
  }'
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/auth/refresh")
{
    Content = JsonContent.Create(new
    {
        refreshToken = "<refreshToken>",
    })
};

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/auth/refresh", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    refreshToken: "<refreshToken>",
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type RefreshRequest = {
  refreshToken?: string | null;
};

const body: RefreshRequest = {
  refreshToken: "<refreshToken>",
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/auth/refresh", {
  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/auth/refresh",
    json={
        "refreshToken": "<refreshToken>",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet.

Console sign-out

POST/api/v1/auth/logout

ConsolePublic

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

Used by the Meem console. Not part of the merchant integration surface and may change without notice.

Headers

  • Content-Typestringrequired
  • X-Correlation-Idstringoptional

Request bodyapplication/json · LogoutRequest

  • refreshTokenstringnullable

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/auth/logout" \
  -H "Content-Type: application/json" \
  -d '{
    "refreshToken": "<refreshToken>"
  }'
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/auth/logout")
{
    Content = JsonContent.Create(new
    {
        refreshToken = "<refreshToken>",
    })
};

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/auth/logout", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    refreshToken: "<refreshToken>",
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type LogoutRequest = {
  refreshToken?: string | null;
};

const body: LogoutRequest = {
  refreshToken: "<refreshToken>",
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/auth/logout", {
  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/auth/logout",
    json={
        "refreshToken": "<refreshToken>",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

The response schema isn't published in the spec yet.

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.