The service requests payment
HTTP 402 Payment Required: amount and terms, machine-readable.
Your AI agents buy services and settle them on their own, in MAD, on licensed rails — via x402 and MPP, the open standards for machine-to-machine payments.
↓See the protocolAgentPay is Aslan's payment rail for AI agents. A service answers an agent's request with HTTP 402 Payment Required; the agent pays on its own, in Moroccan dirhams, through the open x402 or MPP standards, and receives the resource with a receipt. AgentPay is currently available as a public sandbox on a test network.
HTTP 402 Payment Required: amount and terms, machine-readable.
MAD wallet, a signed operation, no card involved.
Settlement on an internal ledger, receipt and webhook.

An agent settles a resource — test network or production
AgentPay runs on Aslan's rails — Principal Agent of a payment institution licensed by Bank Al-Maghrib.
Pre-funded agent accounts, in dirhams, ready to spend.
Verify and settle — the layer that validates and executes every x402 payment.
operationId, statuses, webhooks: every movement leaves a trail.
Your services sell to agents. The protocol runs both ways.
An API, a dataset, a service — exposed behind HTTP.
Payment Required, with amount, currency and recipient in a machine-readable form.
With a signed payment (x402) or a capped Agent Payment Token (MPP).
Checks the payment, blocks replays and settles it on an internal ledger in centimes of dirham.
With a receipt in the response headers and a webhook for the seller.
Both start with HTTP 402. They differ in how the agent proves it can pay.
| x402 | MPP | |
|---|---|---|
| Signal | HTTP 402 with a list of accepted payments | HTTP 402 with a WWW-Authenticate: Payment challenge |
| Agent credential | A signed payment for each request | A reusable Agent Payment Token |
| Spending limits | Set by each signed payment | Per-charge cap and optional lifetime cap |
| Receipt | X-PAYMENT-RESPONSE header | Payment-Receipt header |
| Best for | Pay-per-call, wallet to wallet | Repeated purchases under a budget |
With a payment protocol built on HTTP. The API answers the agent with HTTP 402 Payment Required and its terms; the agent produces a payment — a signed authorisation (x402) or a capped token (MPP) — and retries the request. AgentPay verifies, settles in dirhams and returns the resource with a receipt.
x402 is an open standard that revives the HTTP 402 Payment Required status code. A server lists the payments it accepts, the client attaches a signed payment in an X-PAYMENT header, and a facilitator verifies and settles it. AgentPay acts as that facilitator for payments in dirhams.
MPP is an HTTP 402 standard where the server issues a challenge in a WWW-Authenticate: Payment header and the client answers with a credential. In AgentPay, that credential is an Agent Payment Token with spending caps, and each challenge can only be used once.
Yes. An Agent Payment Token has a maximum amount per charge and an optional maximum total over its lifetime; beyond that, payment is refused. In the sandbox, you can also try AP2 signed mandates, which define what an agent is allowed to buy.
Not yet. AgentPay is currently a public sandbox: a demo wallet with 100 MAD and real transactions on our test network, so you can run the full protocol end to end. Talk to the team if you want to use it with your own services.
Yes — the protocol works both ways. A service puts its paid routes behind HTTP 402, AgentPay verifies and settles the agents' payments, and every settlement is traced with a receipt, an operation ID and webhooks.
A public sandbox: a demo wallet, 100 MAD, and real transactions on our test network — the full protocol end to end.