Skip to content
Meem Payment

API reference · Console

Workflow simulation and analytics

Test 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.

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

Workflow analytics

GET/api/v1/routing-workflows/{id}/analytics

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required

Query parameters

  • fromstring (date-time)optional
  • tostring (date-time)optional

Headers

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

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 404Unknown resource, or one that belongs to another merchant
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/analytics" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN"
using System.Net.Http.Headers;

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

using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/analytics");

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/routing-workflows/<id>/analytics", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/analytics", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

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

response = requests.get(
    "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/analytics",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Replay payments against a version

POST/api/v1/routing-workflows/{id}/versions/{versionId}/replay

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required
  • versionIdstring (uuid)required

Headers

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

Request bodyapplication/json · ReplayWorkflowRequest

  • fromstring (date-time)nullable
  • tostring (date-time)nullable
  • limitinteger (int32)nullable

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 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/routing-workflows/<id>/versions/<versionId>/replay" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-12-31T20:59:59Z",
    "to": "2026-12-31T20:59:59Z",
    "limit": 1
  }'
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/routing-workflows/<id>/versions/<versionId>/replay")
{
    Content = JsonContent.Create(new
    {
        from = "2026-12-31T20:59:59Z",
        to = "2026-12-31T20:59:59Z",
        limit = 1,
    })
};

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/routing-workflows/<id>/versions/<versionId>/replay", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from: "2026-12-31T20:59:59Z",
    to: "2026-12-31T20:59:59Z",
    limit: 1,
  }),
});

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

const body: ReplayWorkflowRequest = {
  from: "2026-12-31T20:59:59Z",
  to: "2026-12-31T20:59:59Z",
  limit: 1,
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/versions/<versionId>/replay", {
  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/routing-workflows/<id>/versions/<versionId>/replay",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    json={
        "from": "2026-12-31T20:59:59Z",
        "to": "2026-12-31T20:59:59Z",
        "limit": 1,
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Workflow assistant

GET/api/v1/routing-workflows/assistant

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Headers

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

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/assistant" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN"
using System.Net.Http.Headers;

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

using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/assistant");

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/routing-workflows/assistant", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/assistant", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

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

response = requests.get(
    "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/assistant",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Draft a workflow with the assistant

POST/api/v1/routing-workflows/assistant/draft

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Headers

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

Request bodyapplication/json · AssistantDraftRequest

  • merchantIdstring (uuid)
  • environmentstringnullable
  • promptstringnullable
  • currentGraphWorkflowGraph
    Show child attributes WorkflowGraph (3)
    • schemaVersioninteger (int32)
    • nodesarray<WorkflowNode>nullable
      Show child attributes WorkflowNode (3)
      • nodeIdstringnullable
      • typeWorkflowNodeType

        One of: Start · Condition · RiskDecision · Gateway · PriorityFallback · TrafficSplit · OptimizationStrategy · Terminal

      • parametersmap<string, string>nullable
    • edgesarray<WorkflowEdge>nullable
      Show child attributes WorkflowEdge (5)
      • fromNodeIdstringnullable
      • fromPortstringnullable
      • toNodeIdstringnullable
      • toPortstringnullable
      • labelstringnullable

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
  • 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/routing-workflows/assistant/draft" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantId": "<merchantId>",
    "environment": "<environment>",
    "prompt": "<prompt>",
    "currentGraph": {
      "schemaVersion": 1,
      "nodes": [],
      "edges": []
    }
  }'
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/routing-workflows/assistant/draft")
{
    Content = JsonContent.Create(new
    {
        merchantId = "<merchantId>",
        environment = "<environment>",
        prompt = "<prompt>",
        currentGraph = new
        {
            schemaVersion = 1,
            nodes = Array.Empty<object>(),
            edges = Array.Empty<object>(),
        },
    })
};

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/routing-workflows/assistant/draft", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    merchantId: "<merchantId>",
    environment: "<environment>",
    prompt: "<prompt>",
    currentGraph: {
      schemaVersion: 1,
      nodes: [],
      edges: [],
    },
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type AssistantDraftRequest = {
  merchantId?: string;
  environment?: string | null;
  prompt?: string | null;
  currentGraph?: Record<string, unknown> /* WorkflowGraph */;
};

const body: AssistantDraftRequest = {
  merchantId: "<merchantId>",
  environment: "<environment>",
  prompt: "<prompt>",
  currentGraph: {
    schemaVersion: 1,
    nodes: [],
    edges: [],
  },
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/assistant/draft", {
  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/routing-workflows/assistant/draft",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    json={
        "merchantId": "<merchantId>",
        "environment": "<environment>",
        "prompt": "<prompt>",
        "currentGraph": {
            "schemaVersion": 1,
            "nodes": [],
            "edges": [],
        },
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

List scenarios

GET/api/v1/routing-workflows/{id}/scenarios

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required

Headers

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

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 404Unknown resource, or one that belongs to another merchant
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN"
using System.Net.Http.Headers;

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

using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios");

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/routing-workflows/<id>/scenarios", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

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

response = requests.get(
    "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Create a scenario

POST/api/v1/routing-workflows/{id}/scenarios

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required

Headers

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

Request bodyapplication/json · SaveWorkflowScenarioCommand

  • namestringnullable
  • contextScenarioContext
    Show child attributes ScenarioContext (13)
    • currencystringnullable
    • amountnumber (double)nullable
    • countrystringnullable
    • paymentMethodstringnullable
    • cardBrandstringnullable
    • cardSchemestringnullable
    • binstringnullable
    • transactionTypestringnullable
    • trafficBucketinteger (int32)nullable
    • channelstringnullable
    • customerCountrystringnullable
    • deviceTypestringnullable
    • ipCountrystringnullable
  • expectScenarioExpectation
    Show child attributes ScenarioExpectation (5)
    • gatewaystringnullable
    • accountIdstring (uuid)nullable
    • outcomestringnullable
    • noGatewaybooleannullable
    • isEmptyboolean

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 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/routing-workflows/<id>/scenarios" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<name>",
    "context": {
      "currency": "SAR",
      "amount": 100,
      "country": "<country>",
      "paymentMethod": "<paymentMethod>",
      "cardBrand": "<cardBrand>",
      "cardScheme": "<cardScheme>",
      "bin": "<bin>",
      "transactionType": "<transactionType>",
      "trafficBucket": 1,
      "channel": "<channel>",
      "customerCountry": "<customerCountry>",
      "deviceType": "<deviceType>",
      "ipCountry": "<ipCountry>"
    },
    "expect": {
      "gateway": "<gateway>",
      "accountId": "<accountId>",
      "outcome": "<outcome>",
      "noGateway": false,
      "isEmpty": false
    }
  }'
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/routing-workflows/<id>/scenarios")
{
    Content = JsonContent.Create(new
    {
        name = "<name>",
        context = new
        {
            currency = "SAR",
            amount = 100m,
            country = "<country>",
            paymentMethod = "<paymentMethod>",
            cardBrand = "<cardBrand>",
            cardScheme = "<cardScheme>",
            bin = "<bin>",
            transactionType = "<transactionType>",
            trafficBucket = 1,
            channel = "<channel>",
            customerCountry = "<customerCountry>",
            deviceType = "<deviceType>",
            ipCountry = "<ipCountry>",
        },
        expect = new
        {
            gateway = "<gateway>",
            accountId = "<accountId>",
            outcome = "<outcome>",
            noGateway = false,
            isEmpty = false,
        },
    })
};

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/routing-workflows/<id>/scenarios", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "<name>",
    context: {
      currency: "SAR",
      amount: 100,
      country: "<country>",
      paymentMethod: "<paymentMethod>",
      cardBrand: "<cardBrand>",
      cardScheme: "<cardScheme>",
      bin: "<bin>",
      transactionType: "<transactionType>",
      trafficBucket: 1,
      channel: "<channel>",
      customerCountry: "<customerCountry>",
      deviceType: "<deviceType>",
      ipCountry: "<ipCountry>",
    },
    expect: {
      gateway: "<gateway>",
      accountId: "<accountId>",
      outcome: "<outcome>",
      noGateway: false,
      isEmpty: false,
    },
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type SaveWorkflowScenarioCommand = {
  name?: string | null;
  context?: Record<string, unknown> /* ScenarioContext */;
  expect?: Record<string, unknown> /* ScenarioExpectation */;
};

const body: SaveWorkflowScenarioCommand = {
  name: "<name>",
  context: {
    currency: "SAR",
    amount: 100,
    country: "<country>",
    paymentMethod: "<paymentMethod>",
    cardBrand: "<cardBrand>",
    cardScheme: "<cardScheme>",
    bin: "<bin>",
    transactionType: "<transactionType>",
    trafficBucket: 1,
    channel: "<channel>",
    customerCountry: "<customerCountry>",
    deviceType: "<deviceType>",
    ipCountry: "<ipCountry>",
  },
  expect: {
    gateway: "<gateway>",
    accountId: "<accountId>",
    outcome: "<outcome>",
    noGateway: false,
    isEmpty: false,
  },
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios", {
  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/routing-workflows/<id>/scenarios",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    json={
        "name": "<name>",
        "context": {
            "currency": "SAR",
            "amount": 100,
            "country": "<country>",
            "paymentMethod": "<paymentMethod>",
            "cardBrand": "<cardBrand>",
            "cardScheme": "<cardScheme>",
            "bin": "<bin>",
            "transactionType": "<transactionType>",
            "trafficBucket": 1,
            "channel": "<channel>",
            "customerCountry": "<customerCountry>",
            "deviceType": "<deviceType>",
            "ipCountry": "<ipCountry>",
        },
        "expect": {
            "gateway": "<gateway>",
            "accountId": "<accountId>",
            "outcome": "<outcome>",
            "noGateway": False,
            "isEmpty": False,
        },
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Update a scenario

PUT/api/v1/routing-workflows/{id}/scenarios/{scenarioId}

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required
  • scenarioIdstring (uuid)required

Headers

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

Request bodyapplication/json · SaveWorkflowScenarioCommand

  • namestringnullable
  • contextScenarioContext
    Show child attributes ScenarioContext (13)
    • currencystringnullable
    • amountnumber (double)nullable
    • countrystringnullable
    • paymentMethodstringnullable
    • cardBrandstringnullable
    • cardSchemestringnullable
    • binstringnullable
    • transactionTypestringnullable
    • trafficBucketinteger (int32)nullable
    • channelstringnullable
    • customerCountrystringnullable
    • deviceTypestringnullable
    • ipCountrystringnullable
  • expectScenarioExpectation
    Show child attributes ScenarioExpectation (5)
    • gatewaystringnullable
    • accountIdstring (uuid)nullable
    • outcomestringnullable
    • noGatewaybooleannullable
    • isEmptyboolean

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 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 PUT "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<name>",
    "context": {
      "currency": "SAR",
      "amount": 100,
      "country": "<country>",
      "paymentMethod": "<paymentMethod>",
      "cardBrand": "<cardBrand>",
      "cardScheme": "<cardScheme>",
      "bin": "<bin>",
      "transactionType": "<transactionType>",
      "trafficBucket": 1,
      "channel": "<channel>",
      "customerCountry": "<customerCountry>",
      "deviceType": "<deviceType>",
      "ipCountry": "<ipCountry>"
    },
    "expect": {
      "gateway": "<gateway>",
      "accountId": "<accountId>",
      "outcome": "<outcome>",
      "noGateway": false,
      "isEmpty": false
    }
  }'
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.Put, "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>")
{
    Content = JsonContent.Create(new
    {
        name = "<name>",
        context = new
        {
            currency = "SAR",
            amount = 100m,
            country = "<country>",
            paymentMethod = "<paymentMethod>",
            cardBrand = "<cardBrand>",
            cardScheme = "<cardScheme>",
            bin = "<bin>",
            transactionType = "<transactionType>",
            trafficBucket = 1,
            channel = "<channel>",
            customerCountry = "<customerCountry>",
            deviceType = "<deviceType>",
            ipCountry = "<ipCountry>",
        },
        expect = new
        {
            gateway = "<gateway>",
            accountId = "<accountId>",
            outcome = "<outcome>",
            noGateway = false,
            isEmpty = false,
        },
    })
};

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/routing-workflows/<id>/scenarios/<scenarioId>", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "<name>",
    context: {
      currency: "SAR",
      amount: 100,
      country: "<country>",
      paymentMethod: "<paymentMethod>",
      cardBrand: "<cardBrand>",
      cardScheme: "<cardScheme>",
      bin: "<bin>",
      transactionType: "<transactionType>",
      trafficBucket: 1,
      channel: "<channel>",
      customerCountry: "<customerCountry>",
      deviceType: "<deviceType>",
      ipCountry: "<ipCountry>",
    },
    expect: {
      gateway: "<gateway>",
      accountId: "<accountId>",
      outcome: "<outcome>",
      noGateway: false,
      isEmpty: false,
    },
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type SaveWorkflowScenarioCommand = {
  name?: string | null;
  context?: Record<string, unknown> /* ScenarioContext */;
  expect?: Record<string, unknown> /* ScenarioExpectation */;
};

const body: SaveWorkflowScenarioCommand = {
  name: "<name>",
  context: {
    currency: "SAR",
    amount: 100,
    country: "<country>",
    paymentMethod: "<paymentMethod>",
    cardBrand: "<cardBrand>",
    cardScheme: "<cardScheme>",
    bin: "<bin>",
    transactionType: "<transactionType>",
    trafficBucket: 1,
    channel: "<channel>",
    customerCountry: "<customerCountry>",
    deviceType: "<deviceType>",
    ipCountry: "<ipCountry>",
  },
  expect: {
    gateway: "<gateway>",
    accountId: "<accountId>",
    outcome: "<outcome>",
    noGateway: false,
    isEmpty: false,
  },
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>", {
  method: "PUT",
  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.put(
    "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    json={
        "name": "<name>",
        "context": {
            "currency": "SAR",
            "amount": 100,
            "country": "<country>",
            "paymentMethod": "<paymentMethod>",
            "cardBrand": "<cardBrand>",
            "cardScheme": "<cardScheme>",
            "bin": "<bin>",
            "transactionType": "<transactionType>",
            "trafficBucket": 1,
            "channel": "<channel>",
            "customerCountry": "<customerCountry>",
            "deviceType": "<deviceType>",
            "ipCountry": "<ipCountry>",
        },
        "expect": {
            "gateway": "<gateway>",
            "accountId": "<accountId>",
            "outcome": "<outcome>",
            "noGateway": False,
            "isEmpty": False,
        },
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Delete a scenario

DELETE/api/v1/routing-workflows/{id}/scenarios/{scenarioId}

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required
  • scenarioIdstring (uuid)required

Headers

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

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 404Unknown resource, or one that belongs to another merchant
  • 429Rate limit exceeded; wait for Retry-After

Example request

curl -X DELETE "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN"
using System.Net.Http.Headers;

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

using var request = new HttpRequestMessage(HttpMethod.Delete, "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>");

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/routing-workflows/<id>/scenarios/<scenarioId>", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

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

response = requests.delete(
    "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/scenarios/<scenarioId>",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Run scenarios against a version

POST/api/v1/routing-workflows/{id}/versions/{versionId}/scenarios/run

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required
  • versionIdstring (uuid)required

Headers

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

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 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/routing-workflows/<id>/versions/<versionId>/scenarios/run" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN"
using System.Net.Http.Headers;

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/routing-workflows/<id>/versions/<versionId>/scenarios/run");

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/routing-workflows/<id>/versions/<versionId>/scenarios/run", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

console.log(res.status, await res.text());
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/versions/<versionId>/scenarios/run", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
  },
});

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

response = requests.post(
    "https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/versions/<versionId>/scenarios/run",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    timeout=30,
)
print(response.status_code, response.text)

Example response

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

Simulate a version

POST/api/v1/routing-workflows/{id}/versions/{versionId}/simulate

ConsoleBearer token

Bearer token. The required permission isn't published in the spec.

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

Path parameters

  • idstring (uuid)required
  • versionIdstring (uuid)required

Headers

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

Request bodyapplication/json · SimulationContextRequest

  • cardBrandstringnullable
  • binstringnullable
  • cardIssuerstringnullable
  • currencystringnullable
  • amountnumber (double)nullable
  • countrystringnullable
  • merchantIdstring (uuid)nullable
  • paymentMethodstringnullable
  • customerCountrystringnullable
  • transactionTypestringnullable
  • cardSchemestringnullable
  • deviceTypestringnullable
  • ipCountrystringnullable
  • metadatamap<string, string>nullable
  • channelstringnullable
  • declineReasonstringnullable
  • environmentstringnullable
  • workflowIdstring (uuid)nullable
  • versionIdstring (uuid)nullable
  • trafficBucketinteger (int32)nullable

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
  • 401Missing, expired or invalid token or credentials
  • 403Authenticated but not allowed (permission or merchant context)
  • 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/routing-workflows/<id>/versions/<versionId>/simulate" \
  -H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "cardBrand": "<cardBrand>",
    "bin": "<bin>",
    "cardIssuer": "<cardIssuer>",
    "currency": "SAR",
    "amount": 100,
    "country": "<country>",
    "merchantId": "<merchantId>",
    "paymentMethod": "<paymentMethod>",
    "customerCountry": "<customerCountry>",
    "transactionType": "<transactionType>",
    "cardScheme": "<cardScheme>",
    "deviceType": "<deviceType>",
    "ipCountry": "<ipCountry>",
    "metadata": {
      "key": "value"
    },
    "channel": "<channel>",
    "declineReason": "<declineReason>",
    "environment": "<environment>",
    "workflowId": "<workflowId>",
    "versionId": "<versionId>",
    "trafficBucket": 1
  }'
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/routing-workflows/<id>/versions/<versionId>/simulate")
{
    Content = JsonContent.Create(new
    {
        cardBrand = "<cardBrand>",
        bin = "<bin>",
        cardIssuer = "<cardIssuer>",
        currency = "SAR",
        amount = 100m,
        country = "<country>",
        merchantId = "<merchantId>",
        paymentMethod = "<paymentMethod>",
        customerCountry = "<customerCountry>",
        transactionType = "<transactionType>",
        cardScheme = "<cardScheme>",
        deviceType = "<deviceType>",
        ipCountry = "<ipCountry>",
        metadata = new Dictionary<string, object?>
        {
            ["key"] = "value",
        },
        channel = "<channel>",
        declineReason = "<declineReason>",
        environment = "<environment>",
        workflowId = "<workflowId>",
        versionId = "<versionId>",
        trafficBucket = 1,
    })
};

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/routing-workflows/<id>/versions/<versionId>/simulate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    cardBrand: "<cardBrand>",
    bin: "<bin>",
    cardIssuer: "<cardIssuer>",
    currency: "SAR",
    amount: 100,
    country: "<country>",
    merchantId: "<merchantId>",
    paymentMethod: "<paymentMethod>",
    customerCountry: "<customerCountry>",
    transactionType: "<transactionType>",
    cardScheme: "<cardScheme>",
    deviceType: "<deviceType>",
    ipCountry: "<ipCountry>",
    metadata: {
      key: "value",
    },
    channel: "<channel>",
    declineReason: "<declineReason>",
    environment: "<environment>",
    workflowId: "<workflowId>",
    versionId: "<versionId>",
    trafficBucket: 1,
  }),
});

console.log(res.status, await res.text());
// Generated from the OpenAPI schema.
type SimulationContextRequest = {
  cardBrand?: string | null;
  bin?: string | null;
  cardIssuer?: string | null;
  currency?: string | null;
  amount?: number | null;
  country?: string | null;
  merchantId?: string | null;
  paymentMethod?: string | null;
  customerCountry?: string | null;
  transactionType?: string | null;
  cardScheme?: string | null;
  deviceType?: string | null;
  ipCountry?: string | null;
  metadata?: Record<string, string> | null;
  channel?: string | null;
  declineReason?: string | null;
  environment?: string | null;
  workflowId?: string | null;
  versionId?: string | null;
  trafficBucket?: number | null;
};

const body: SimulationContextRequest = {
  cardBrand: "<cardBrand>",
  bin: "<bin>",
  cardIssuer: "<cardIssuer>",
  currency: "SAR",
  amount: 100,
  country: "<country>",
  merchantId: "<merchantId>",
  paymentMethod: "<paymentMethod>",
  customerCountry: "<customerCountry>",
  transactionType: "<transactionType>",
  cardScheme: "<cardScheme>",
  deviceType: "<deviceType>",
  ipCountry: "<ipCountry>",
  metadata: {
    key: "value",
  },
  channel: "<channel>",
  declineReason: "<declineReason>",
  environment: "<environment>",
  workflowId: "<workflowId>",
  versionId: "<versionId>",
  trafficBucket: 1,
};

const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/routing-workflows/<id>/versions/<versionId>/simulate", {
  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/routing-workflows/<id>/versions/<versionId>/simulate",
    headers={
        "Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
    },
    json={
        "cardBrand": "<cardBrand>",
        "bin": "<bin>",
        "cardIssuer": "<cardIssuer>",
        "currency": "SAR",
        "amount": 100,
        "country": "<country>",
        "merchantId": "<merchantId>",
        "paymentMethod": "<paymentMethod>",
        "customerCountry": "<customerCountry>",
        "transactionType": "<transactionType>",
        "cardScheme": "<cardScheme>",
        "deviceType": "<deviceType>",
        "ipCountry": "<ipCountry>",
        "metadata": {
            "key": "value",
        },
        "channel": "<channel>",
        "declineReason": "<declineReason>",
        "environment": "<environment>",
        "workflowId": "<workflowId>",
        "versionId": "<versionId>",
        "trafficBucket": 1,
    },
    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.