API reference
A REST API with predictable, resource-oriented URLs, JSON request and response bodies, and standard HTTP status codes. This page summarises core resources.
Illustrative reference
Endpoints shown here are representative of the API shape. The full, versioned reference and available capabilities are provided with sandbox access.
Conventions
- Base URL:
https://sandbox.api.madfoa.com - Amounts are integers in the smallest currency unit
- Timestamps are ISO 8601 in UTC
- Errors use standard HTTP status codes with a JSON body
Create a payment
POST /v1/payments — create a payment against a merchant.
POST /v1/payments
{
"amount": 4500,
"currency": "SAR",
"merchant_id": "mch_08c1a2",
"method": "card"
}List merchants
GET /v1/merchants — list merchants with cursor pagination.
GET /v1/merchants?limit=20Pagination
List endpoints return a data array and a has_more flag. Use limit and a cursor to page through results.
Next: Webhooks →