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
/embedded/payment-linksCreate a new payment link. Returns a shareable URL that opens a Mazad-hosted checkout page.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| amount | integer | required | Payment amount in smallest currency unit. Set to 0 for customer-entered amount. |
| currency | string | required | ISO 4217 currency code (e.g., IQD, USD). |
| description | string | required | Displayed on the checkout page. Max 256 characters. |
| reference | string | optional | Your invoice or order ID for reconciliation. |
| redirect_url | string | optional | URL to redirect after successful payment. |
| expires_at | string | optional | Expiration in ISO 8601. Defaults to 30 days from creation. |
| max_uses | integer | optional | Max number of times the link can be used. Defaults to 1. Set to 0 for unlimited. |
| metadata | object | optional | Arbitrary 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
/embedded/payment-links/{id}Retrieve details of a payment link including its current status, usage count, and associated payments.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | required | The 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
/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
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | required | The 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