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

Payment Links

Generate shareable payment links that open a Mazad-hosted checkout page. No frontend integration required — share links via SMS, email, chat, or social media.

Use cases

Invoice payments

Email a payment link with your invoice. Customer clicks and pays in seconds.

Social commerce

Share links on Instagram, WhatsApp, or Telegram to collect payments without a website.

Freelancer billing

Send a one-time link after completing work. No recurring billing setup needed.

Donations

Create a reusable payment link for donation campaigns. Supports custom amounts.

Create a payment link

POST/embedded/payment-links

Create a new payment link. Returns a shareable URL that opens a Mazad-hosted checkout page.

Request Body

NameTypeRequiredDescription
amountintegerrequiredPayment amount in smallest currency unit. Set to 0 for customer-entered amount.
currencystringrequiredISO 4217 currency code (e.g., IQD, USD).
descriptionstringrequiredDisplayed on the checkout page. Max 256 characters.
referencestringoptionalYour invoice or order ID for reconciliation.
redirect_urlstringoptionalURL to redirect after successful payment.
expires_atstringoptionalExpiration in ISO 8601. Defaults to 30 days from creation.
max_usesintegeroptionalMax number of times the link can be used. Defaults to 1. Set to 0 for unlimited.
metadataobjectoptionalArbitrary key-value pairs passed through to webhooks.
curl -X POST https://wallet.e-mazad.store/api/v1/embedded/payment-links \
  -H "Authorization: Bearer sk_sandbox_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 75000,
    "currency": "IQD",
    "description": "Invoice #INV-2026-0042",
    "reference": "INV-2026-0042",
    "redirect_url": "https://acme.com/invoices/42/paid",
    "max_uses": 1,
    "metadata": {
      "invoice_id": "42",
      "client": "Ahmad Corp"
    }
  }'

Response

{
  "success": true,
  "data": {
    "id": "pl_a1b2c3d4e5f6",
    "url": "https://pay.mazad.com/l/a1b2c3d4e5f6",
    "short_url": "https://mzd.link/pL4xQ",
    "amount": 75000,
    "currency": "IQD",
    "description": "Invoice #INV-2026-0042",
    "reference": "INV-2026-0042",
    "status": "active",
    "uses": 0,
    "max_uses": 1,
    "expires_at": "2026-04-19T14:30:00Z",
    "payments": [],
    "created_at": "2026-03-20T14:30:00Z"
  }
}

Retrieve a payment link

GET/embedded/payment-links/{id}

Retrieve details of a payment link including its current status, usage count, and associated payments.

Path Parameters

NameTypeRequiredDescription
idstringrequiredThe payment link ID (pl_...).
curl -X GET https://wallet.e-mazad.store/api/v1/embedded/payment-links/pl_a1b2c3d4e5f6 \
  -H "Authorization: Bearer sk_sandbox_abc123"

Deactivate a payment link

DELETE/embedded/payment-links/{id}

Deactivate a payment link. The link URL will show an expired message. Existing payments made through this link are not affected.

Path Parameters

NameTypeRequiredDescription
idstringrequiredThe payment link ID (pl_...).
curl -X DELETE https://wallet.e-mazad.store/api/v1/embedded/payment-links/pl_a1b2c3d4e5f6 \
  -H "Authorization: Bearer sk_sandbox_abc123"

Delete response

{
  "success": true,
  "data": {
    "id": "pl_a1b2c3d4e5f6",
    "status": "deactivated",
    "deactivated_at": "2026-03-22T10:00:00Z"
  }
}

Deactivation is permanent

Once a payment link is deactivated, it cannot be reactivated. Create a new link if needed. Payments already completed through this link remain valid and are not affected.