Sandbox mode — Use https://wallet.e-mazad.store/api/v1 as your base URL
API Reference

Full API Reference

Complete list of all Mazad Wallet API endpoints. Every request requires authentication via your secret key in the Authorization: Bearer sk_sandbox_... header.

Base URLhttps://wallet.e-mazad.store/api/v1

All paths below are relative to this base URL. For production, use https://wallet.e-mazad.store/api/v1.

Idempotency required

All POST requests that create or modify resources should include an Idempotency-Key header with a UUID v4 value. See the Authentication page for details.

Embedded Wallet — Users

Sync your platform users into Mazad and auto-provision wallets.

POST
/embedded/users/sync

Create or update an embedded wallet user. Wallets are auto-created on first sync.

Embedded Wallet — Wallets

Read wallet balances and transaction history for embedded users.

GET
/embedded/users/{id}/wallet

Get wallet details and all currency balances for an embedded user.

GET
/embedded/users/{id}/transactions

List paginated transactions for an embedded user wallet.

Embedded Wallet — Checkout

Create checkout sessions and process payments through the hosted popup.

POST
/embedded/checkout/sessions

Create a new checkout session. Returns a session token for the popup.

GET
/embedded/checkout/sessions/{id}

Retrieve checkout session status and payment details.

Payments

Retrieve, capture, void, and refund payments.

GET
/embedded/payments/{id}

Get full payment details including status, amounts, and timestamps.

GET
/embedded/payments

List payments with optional filters for status, user, currency, and date range.

POST
/embedded/payments/{id}/capture

Capture an authorized payment. Supports full and partial capture.

POST
/embedded/payments/{id}/void

Void an authorized payment and release held funds.

POST
/embedded/payments/{id}/refund

Refund a completed payment. Supports full and partial refunds.

Payment Links

Generate shareable payment links that open a Mazad-hosted checkout page.

POST
/payment-links

Create a new payment link with amount, currency, and optional expiry.

GET
/payment-links

List all payment links with optional status and date filters.

GET
/payment-links/{id}

Retrieve payment link details and usage statistics.

DELETE
/payment-links/{id}

Deactivate a payment link. Already-paid links cannot be deactivated.

QR Codes

Generate and process QR code payments for in-person transactions.

POST
/qr/generate

Generate a merchant-presented QR code for a specific amount.

POST
/qr/pay

Process a payment by scanning a customer-presented QR code.

GET
/qr/{id}

Retrieve QR code details and payment status.

Subscriptions — Plans

Create and manage subscription plans with pricing, intervals, and trial periods.

POST
/subscriptions/plans

Create a new subscription plan with amount, currency, and billing interval.

GET
/subscriptions/plans

List all subscription plans with optional status filter.

GET
/subscriptions/plans/{id}

Retrieve plan details including subscriber count and status.

Subscriptions — Management

Enroll subscribers and manage subscription lifecycle.

POST
/subscriptions

Create a new subscription by enrolling a customer in a plan.

GET
/subscriptions

List subscriptions with filters for plan, status, and customer.

GET
/subscriptions/{id}

Retrieve subscription details including billing history.

POST
/subscriptions/{id}/pause

Pause an active subscription. No charges until resumed.

POST
/subscriptions/{id}/resume

Resume a paused subscription and restart billing.

DELETE
/subscriptions/{id}

Cancel a subscription permanently.

Payroll

Submit batch payouts to multiple recipients in a single API call.

POST
/payroll/batches

Create and submit a new payroll batch with recipients and amounts.

GET
/payroll/batches/{id}

Get batch progress including per-recipient payout status.

GET
/payroll/batches/{id}/payouts

List individual payouts within a batch with status details.

Wallets

Query wallet balances and transaction history directly.

GET
/wallets/{wallet_id}/balances

Get all currency balances for a wallet.

GET
/wallets/{wallet_id}/transactions

List wallet transactions with filters for type, currency, and date.

Foreign Exchange

Get real-time exchange rates and execute currency conversions.

GET
/fx/rates

Get live exchange rates for a base currency.

POST
/fx/quote

Request an FX quote with locked rate. Valid for 15 seconds.

POST
/fx/execute

Execute a currency conversion using a valid quote.

GET
/fx/history

List past FX trades with date and currency filters.

Session Tokens

Generate short-lived tokens for client-side SDK operations.

POST
/session-tokens

Create a scoped session token for a specific user. Expires in 15 minutes.

Webhooks

Mazad sends webhook events to your configured endpoint for real-time notifications.

POST
/webhooks (your server)

Receive payment.completed, subscription.activated, and other lifecycle events.

Authentication Summary

HeaderValueRequired
AuthorizationBearer sk_sandbox_...Always
Content-Typeapplication/jsonPOST / PATCH
Idempotency-KeyUUID v4Recommended for POST

HTTP Status Codes

StatusMeaning
200Success. The request completed and the response body contains the result.
201Created. A new resource was created successfully.
400Bad Request. The request body is malformed or missing required fields.
401Unauthorized. API key is missing, invalid, or expired.
403Forbidden. The API key does not have permission for this action.
404Not Found. The requested resource does not exist.
409Conflict. Idempotency key reused with different request body.
422Unprocessable Entity. Validation failed (e.g., insufficient balance).
429Too Many Requests. Rate limit exceeded. Retry after the indicated delay.
500Server Error. Something went wrong on our end. Contact support if persistent.

Detailed endpoint documentation

Each endpoint section in the sidebar (Embedded Wallet, Payment Gateway, Subscriptions, etc.) contains full request/response examples with code samples in cURL, Node.js, PHP, and Python.

Ready to integrate Mazad into your platform?

Our team will review your business and issue your production API keys within 2 business days.