API reference · Integration
Payments
Authorize (or purchase with capture: true), capture, void and refund, then inspect a payment's timeline, routing trace and redacted API calls.
Create a payment
POST/api/v1/payments
IntegrationBearer tokenPermission: payments.authorize
Authorize a payment, or authorize and capture with capture: true.
Headers
AuthorizationstringrequiredContent-TypestringrequiredIdempotency-KeystringoptionalA fresh UUID per logical operation. Scoped per merchant and endpoint. A replay returns the original response;
Guide409while the first request is in flight; the same key with a different body returns422IDEMPOTENCY_KEY_REUSED.X-Correlation-IdstringoptionalX-Merchant-Contextstringoptional
Request bodyapplication/json · AuthorizePaymentRequest
amountnumber (double)requiredAmount in major units, greater than zero (e.g.
150.00).currencystringrequirednullableThree-letter ISO 4217 code, e.g.
SAR.cardTokenstringrequirednullableA platform card token, never a raw card number in production. A hosted-fields token (
tok_hf_…) is single-use, bound to your merchant and valid for 15 minutes. In the sandbox the mock gateways read the first six digits, so test card numbers work here.cvvstringnullableUsed in-request only; never stored or logged.
capturebooleantrueauthorizes and captures in one call (purchase). Defaultfalse.environmentstringnullableSandboxorProduction. When omitted, it's resolved from your single resolvable gateway account; if that's ambiguous you get422 payment.environment_indeterminate. Any other value is422.cardBrandstringnullableCard attributes used by routing conditions.
binstringnullableCard attributes used by routing conditions.
cardIssuerstringnullableCard attributes used by routing conditions.
countrystringnullableCountry attributes used by routing and risk rules.
paymentMethodstringnullableMethod code, e.g.
cardormada.workflowIdstringnullableRun a specific published workflow (id or code). Invalid, unpublished or foreign workflows return
422; they're never substituted. See Workflow selection.channelstringnullableweb,mobile,link,apiorrecovery. Defaults toapi; unknown values return422.customerCountrystringnullableCountry attributes used by routing and risk rules.
transactionTypestringnullableFurther routing attributes.
cardSchemestringnullableScheme for routing and eligibility, e.g.
mada,Visa. Falls back tocardBrand. A mada payment only routes to a mada-enabled account.deviceTypestringnullableFurther routing attributes.
ipCountrystringnullableCountry attributes used by routing and risk rules.
customerIdentifierstringnullableA stable customer id used by risk rules and velocity checks.
metadatamap<string, string>nullableNon-sensitive key-value pairs that routing conditions can match. Never put card data here.
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
- 200OK
- 401Missing, expired or invalid token or credentials
- 402Declined by the issuer or PSP, or blocked by a risk rule
- 403Authenticated but not allowed (permission or merchant context)
- 409Conflict: idempotency key in flight, or not allowed in the current status
- 422Validation or business rule (
ValidationProblemDetailswithcode) - 429Rate limit exceeded; wait for
Retry-After - 502No gateway could process the payment
Example request
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payments" \
-H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount": 150,
"currency": "SAR",
"cardToken": "4000001111112223",
"cvv": "123",
"customerCountry": "SA",
"metadata": {
"orderRef": "ORDER-1001"
}
}'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/payments")
{
Content = JsonContent.Create(new
{
amount = 150m,
currency = "SAR",
cardToken = "4000001111112223",
cvv = "123",
customerCountry = "SA",
metadata = new Dictionary<string, object?>
{
["orderRef"] = "ORDER-1001",
},
})
};
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
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/payments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
amount: 150,
currency: "SAR",
cardToken: "4000001111112223",
cvv: "123",
customerCountry: "SA",
metadata: {
orderRef: "ORDER-1001",
},
}),
});
console.log(res.status, await res.text());// Generated from the OpenAPI schema.
type AuthorizePaymentRequest = {
amount?: number;
currency?: string | null;
cardToken?: string | null;
cvv?: string | null;
capture?: boolean;
environment?: string | null;
cardBrand?: string | null;
bin?: string | null;
cardIssuer?: string | null;
country?: string | null;
paymentMethod?: string | null;
workflowId?: string | null;
channel?: string | null;
customerCountry?: string | null;
transactionType?: string | null;
cardScheme?: string | null;
deviceType?: string | null;
ipCountry?: string | null;
customerIdentifier?: string | null;
metadata?: Record<string, string> | null;
};
const body: AuthorizePaymentRequest = {
amount: 150,
currency: "SAR",
cardToken: "4000001111112223",
cvv: "123",
customerCountry: "SA",
metadata: {
orderRef: "ORDER-1001",
},
};
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/payments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify(body),
});
console.log(res.status, await res.text());import os
import uuid
import requests
response = requests.post(
"https://api.sandbox.meem-dev.example/api/v1/payments",
headers={
"Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"amount": 150,
"currency": "SAR",
"cardToken": "4000001111112223",
"cvv": "123",
"customerCountry": "SA",
"metadata": {
"orderRef": "ORDER-1001",
},
},
timeout=30,
)
print(response.status_code, response.text)Example response
{
"paymentId": "6f1c2a9e-4b7d-4c1e-9a53-0d2b8f7e1c44",
"status": "Authorized",
"code": null,
"normalizedCode": null,
"declineCategory": null,
"message": null,
"redirectUrl": null,
"correlationId": "0b8e5f8a-2f4c-4d6e-8a1b-3c9d7e6f5a21"
}Search payments
GET/api/v1/payments
IntegrationBearer tokenPermission: payments.read
Search payments (paged).
Query parameters
statestringoptionalcurrencystringoptionalmerchantIdstring (uuid)optionalfromstring (date-time)optionaltostring (date-time)optionalpageinteger (int32)optionalDefault:
1pageSizeinteger (int32)optionalDefault:
25
Headers
AuthorizationstringrequiredX-Correlation-IdstringoptionalX-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
Example request
curl "https://api.sandbox.meem-dev.example/api/v1/payments" \
-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/payments");
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/payments", {
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/payments", {
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/payments",
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. See the guide for what it returns. Guide
Capture a payment
POST/api/v1/payments/{id}/capture
IntegrationBearer tokenPermission: payments.capture
Capture an authorized payment in full or in part.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredContent-TypestringrequiredIdempotency-KeystringoptionalA fresh UUID per logical operation. Scoped per merchant and endpoint. A replay returns the original response;
Guide409while the first request is in flight; the same key with a different body returns422IDEMPOTENCY_KEY_REUSED.X-Correlation-IdstringoptionalX-Merchant-Contextstringoptional
Request bodyapplication/json · CapturePaymentRequest
amountnumber (double)requiredGreater than zero. Less than the authorized amount is a partial capture.
currencystringrequirednullableISO 4217, same as the payment.
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
- 200OK
- 401Missing, expired or invalid token or credentials
- 402Declined by the issuer or PSP, or blocked by a risk rule
- 403Authenticated but not allowed (permission or merchant context)
- 404Unknown resource, or one that belongs to another merchant
- 409Conflict: idempotency key in flight, or not allowed in the current status
- 422Validation or business rule (
ValidationProblemDetailswithcode) - 429Rate limit exceeded; wait for
Retry-After - 502No gateway could process the payment
Example request
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payments/<id>/capture" \
-H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount": 100,
"currency": "SAR"
}'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/payments/<id>/capture")
{
Content = JsonContent.Create(new
{
amount = 100m,
currency = "SAR",
})
};
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
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/payments/<id>/capture", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
amount: 100,
currency: "SAR",
}),
});
console.log(res.status, await res.text());// Generated from the OpenAPI schema.
type CapturePaymentRequest = {
amount?: number;
currency?: string | null;
};
const body: CapturePaymentRequest = {
amount: 100,
currency: "SAR",
};
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/payments/<id>/capture", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify(body),
});
console.log(res.status, await res.text());import os
import uuid
import requests
response = requests.post(
"https://api.sandbox.meem-dev.example/api/v1/payments/<id>/capture",
headers={
"Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"amount": 100,
"currency": "SAR",
},
timeout=30,
)
print(response.status_code, response.text)Response shape (from the API contract)
// Response of authorize / capture / void / refund (from the API contract).
type PaymentResponse = {
paymentId?: string | null;
status?: string | null; // e.g. "Authorized", "Captured", "Declined"
code?: string | null; // machine-readable result code, e.g. "INSUFFICIENT_FUNDS"
normalizedCode?: string | null; // e.g. "DO_NOT_HONOUR"
declineCategory?: string | null; // "SoftDecline" | "HardDecline"
message?: string | null;
redirectUrl?: string | null; // 3-D Secure / customer action
correlationId?: string | null;
};Refund a payment
POST/api/v1/payments/{id}/refund
IntegrationBearer tokenPermission: payments.refund
Refund a captured payment in full or in part.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredContent-TypestringrequiredIdempotency-KeystringoptionalA fresh UUID per logical operation. Scoped per merchant and endpoint. A replay returns the original response;
Guide409while the first request is in flight; the same key with a different body returns422IDEMPOTENCY_KEY_REUSED.X-Correlation-IdstringoptionalX-Merchant-Contextstringoptional
Request bodyapplication/json · RefundPaymentRequest
amountnumber (double)currencystringnullable
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
- 402Declined by the issuer or PSP, or blocked by a risk rule
- 403Authenticated but not allowed (permission or merchant context)
- 404Unknown resource, or one that belongs to another merchant
- 409Conflict: idempotency key in flight, or not allowed in the current status
- 422Validation or business rule (
ValidationProblemDetailswithcode) - 429Rate limit exceeded; wait for
Retry-After - 502No gateway could process the payment
Example request
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payments/<id>/refund" \
-H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount": 25,
"currency": "SAR"
}'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/payments/<id>/refund")
{
Content = JsonContent.Create(new
{
amount = 25m,
currency = "SAR",
})
};
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
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/payments/<id>/refund", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
amount: 25,
currency: "SAR",
}),
});
console.log(res.status, await res.text());// Generated from the OpenAPI schema.
type RefundPaymentRequest = {
amount?: number;
currency?: string | null;
};
const body: RefundPaymentRequest = {
amount: 25,
currency: "SAR",
};
const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/payments/<id>/refund", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify(body),
});
console.log(res.status, await res.text());import os
import uuid
import requests
response = requests.post(
"https://api.sandbox.meem-dev.example/api/v1/payments/<id>/refund",
headers={
"Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"amount": 25,
"currency": "SAR",
},
timeout=30,
)
print(response.status_code, response.text)Response shape (from the API contract)
// Response of authorize / capture / void / refund (from the API contract).
type PaymentResponse = {
paymentId?: string | null;
status?: string | null; // e.g. "Authorized", "Captured", "Declined"
code?: string | null; // machine-readable result code, e.g. "INSUFFICIENT_FUNDS"
normalizedCode?: string | null; // e.g. "DO_NOT_HONOUR"
declineCategory?: string | null; // "SoftDecline" | "HardDecline"
message?: string | null;
redirectUrl?: string | null; // 3-D Secure / customer action
correlationId?: string | null;
};Void a payment
POST/api/v1/payments/{id}/void
IntegrationBearer tokenPermission: payments.void
Void an authorized payment before capture. No request body.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredIdempotency-KeystringoptionalA fresh UUID per logical operation. Scoped per merchant and endpoint. A replay returns the original response;
Guide409while the first request is in flight; the same key with a different body returns422IDEMPOTENCY_KEY_REUSED.X-Correlation-IdstringoptionalX-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
- 402Declined by the issuer or PSP, or blocked by a risk rule
- 403Authenticated but not allowed (permission or merchant context)
- 404Unknown resource, or one that belongs to another merchant
- 409Conflict: idempotency key in flight, or not allowed in the current status
- 422Validation or business rule (
ValidationProblemDetailswithcode) - 429Rate limit exceeded; wait for
Retry-After - 502No gateway could process the payment
Example request
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payments/<id>/void" \
-H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"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/payments/<id>/void");
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
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/payments/<id>/void", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
console.log(res.status, await res.text());const res = await fetch("https://api.sandbox.meem-dev.example/api/v1/payments/<id>/void", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MEEM_ACCESS_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
console.log(res.status, await res.text());import os
import uuid
import requests
response = requests.post(
"https://api.sandbox.meem-dev.example/api/v1/payments/<id>/void",
headers={
"Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
print(response.status_code, response.text)Response shape (from the API contract)
// Response of authorize / capture / void / refund (from the API contract).
type PaymentResponse = {
paymentId?: string | null;
status?: string | null; // e.g. "Authorized", "Captured", "Declined"
code?: string | null; // machine-readable result code, e.g. "INSUFFICIENT_FUNDS"
normalizedCode?: string | null; // e.g. "DO_NOT_HONOUR"
declineCategory?: string | null; // "SoftDecline" | "HardDecline"
message?: string | null;
redirectUrl?: string | null; // 3-D Secure / customer action
correlationId?: string | null;
};Payment metrics
GET/api/v1/payments/metrics
IntegrationBearer tokenPermission: payments.read
Descriptive payment metrics over the last N days (sinceDays).
Query parameters
sinceDaysinteger (int32)optionalDefault:
30
Headers
AuthorizationstringrequiredX-Correlation-IdstringoptionalX-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
Example request
curl "https://api.sandbox.meem-dev.example/api/v1/payments/metrics" \
-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/payments/metrics");
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/payments/metrics", {
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/payments/metrics", {
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/payments/metrics",
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.
Retrieve a payment
GET/api/v1/payments/{id}
IntegrationBearer tokenPermission: payments.read
Retrieve a payment with its status, amounts and attempt history.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredX-Correlation-IdstringoptionalX-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
Example request
curl "https://api.sandbox.meem-dev.example/api/v1/payments/<id>" \
-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/payments/<id>");
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/payments/<id>", {
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/payments/<id>", {
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/payments/<id>",
headers={
"Authorization": f"Bearer {os.environ['MEEM_ACCESS_TOKEN']}",
},
timeout=30,
)
print(response.status_code, response.text)Example response
{
"paymentId": "6f1c2a9e-4b7d-4c1e-9a53-0d2b8f7e1c44",
"merchantId": "<merchant_id>",
"status": "PartiallyRefunded",
"amount": 150,
"currency": "SAR",
"capturedAmount": 100,
"refundedAmount": 25,
"createdAt": "2026-12-03T09:15:02+00:00",
"updatedAt": "2026-12-03T09:21:40+00:00",
"requestedOperation": "Authorize",
"paymentMethod": "card",
"workflowId": "<workflow_id>",
"workflowVersion": 3,
"workflowResolution": "Default",
"channel": "api",
"attempts": [
{
"attemptNumber": 1,
"gatewayName": "Mock",
"gatewayTransactionReference": "<gateway_reference>",
"requestedAt": "2026-12-03T09:15:02+00:00",
"respondedAt": "2026-12-03T09:15:02+00:00",
"status": "Succeeded",
"normalizedOutcome": "Success",
"nextAction": "Complete",
"durationMs": 41
}
]
}Payment timeline
GET/api/v1/payments/{id}/timeline
IntegrationBearer tokenPermission: payments.read
End-to-end execution timeline of a payment.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredX-Correlation-IdstringoptionalX-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
Example request
curl "https://api.sandbox.meem-dev.example/api/v1/payments/<id>/timeline" \
-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/payments/<id>/timeline");
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/payments/<id>/timeline", {
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/payments/<id>/timeline", {
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/payments/<id>/timeline",
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. See the guide for what it returns. Guide
Payment API calls
GET/api/v1/payments/{id}/api-calls
IntegrationBearer tokenPermission: payments.read
Captured API and gateway calls for a payment, with redacted payloads.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredX-Correlation-IdstringoptionalX-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
Example request
curl "https://api.sandbox.meem-dev.example/api/v1/payments/<id>/api-calls" \
-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/payments/<id>/api-calls");
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/payments/<id>/api-calls", {
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/payments/<id>/api-calls", {
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/payments/<id>/api-calls",
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. See the guide for what it returns. Guide
Payment routing trace
GET/api/v1/payments/{id}/routing-trace
IntegrationBearer tokenPermission: payments.read
The routing decision recorded for a payment.
Path parameters
idstring (uuid)required
Headers
AuthorizationstringrequiredX-Correlation-IdstringoptionalX-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
Example request
curl "https://api.sandbox.meem-dev.example/api/v1/payments/<id>/routing-trace" \
-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/payments/<id>/routing-trace");
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/payments/<id>/routing-trace", {
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/payments/<id>/routing-trace", {
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/payments/<id>/routing-trace",
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. 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.