Wayl MCP
This server integrates the Wayl payments API (Iraqi Dinar) into AI assistants, enabling creation, management, and monitoring of payment links, products, refunds, and webhooks.
Payment Link Creation:
create_payment_link– full control over line items, webhooks, redirects, and custom parameters.sell_item/sell_book– quick sale with automatic price breakdowns, unique reference IDs, and checkout URL generation.
Order & Link Management:
check_order_paid– verify if an order is paid and safe to fulfil (distinguishes sandbox vs. real payments).get_payment_link– fetch a single link by reference ID.list_payment_links– list all links, filterable by status.get_payment_links_batch– look up to 100 links at once with missing-ID report.invalidate_payment_link– cancel a link unconditionally (irreversible).invalidate_payment_link_if_pending– cancel only if still pending.
Product Catalog:
list_products– list all products (Digital, Physical, Service) with stock and variants.get_product– fetch details for a single product.
Refunds:
create_refund– request a refund with a 100–1500 character justification.list_refunds– list refund requests, filterable by status or order reference.get_refund– fetch a single refund by its Wayl ID.cancel_refund– withdraw a pending refund request.
Webhooks & Diagnostics:
parse_webhook– verify HMAC-SHA256 signature and report payment status.verify_webhook– perform signature check only (local, no network).verify_auth_key– test API key validity.wayl_status– show server configuration without network calls.
wayl-mcp
An MCP server for the Wayl payments API — take payments online in Iraq from an AI assistant.
Ask your assistant to "charge 25,000 dinars for a consultation" and it creates the payment link, hands you the checkout URL, and can tell you later whether the customer actually paid. Works for anything you sell: physical goods, digital downloads, services, tickets, invoices.
Wayl is an Iraqi payment gateway. All amounts are in Iraqi Dinar (IQD).
Setup
You need an API key. Wayl's guide says to email jisr@wayl.io to request a merchant
token; their API reference says it is in your merchant dashboard. Try the dashboard
first, then email. Your store must be verified before it can create links.
uv syncThen set the key:
export WAYL_API_KEY="your-merchant-token"Check it works:
uv run python -c "import asyncio, wayl_mcp.server as s; print(asyncio.run(s.verify_auth_key()))"Related MCP server: PayPal
Connecting it
Claude Code
claude mcp add wayl --env WAYL_API_KEY=your-merchant-token -- uv run --directory /absolute/path/to/wayl_MCP wayl-mcpClaude Desktop
In claude_desktop_config.json:
{
"mcpServers": {
"wayl": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/wayl_MCP", "wayl-mcp"],
"env": {
"WAYL_API_KEY": "your-merchant-token",
"WAYL_ENV": "test"
}
}
}
}Use an absolute path — the server is launched from an arbitrary working directory.
Configuration
Variable | Default | Purpose |
| — | Required. Merchant token, sent as |
|
| Default environment for new links: |
|
| API host. |
| — | Default webhook URL for new links. |
| — | Default webhook signing secret (10–255 chars). |
| — | Where buyers land after paying. |
|
| Prefix for generated order IDs. |
|
| HTTP timeout in seconds. |
WAYL_ENV defaults to test so nothing moves real money until you opt in. Set it
to live when you are ready to actually sell, or pass env="live" per call.
While in test mode, check_order_paid and parse_webhook report paid: true for a
completed sandbox checkout but safeToFulfil: false — the payment is simulated, so the
order should not be fulfilled. Branch on safeToFulfil, not paid.
Tools
Selling
Tool | Does |
| Create a checkout link for a simple sale, with the price breakdown filled in. |
| Answer whether an order is paid and safe to fulfil. |
| Create a payment link with full control over every field. |
Links
Tool | Does |
| Fetch one link and its status. |
| List links, newest first, filterable by status. |
| Look up to 100 links at once; reports which were missing. |
| Cancel an unpaid link. |
| Cancel it only if still pending. |
Products
Tool | Does |
| List your Wayl catalogue (Digital, Physical, Service). |
| Fetch one product's details. |
Refunds
Tool | Does |
| Request a refund. Needs a 100+ character justification. |
| List refund requests. |
| Fetch one refund. |
| Withdraw a refund still in |
Webhooks and diagnostics
Tool | Does |
| Verify a webhook's signature and report whether the order is paid. |
| Signature check alone. |
| Confirm the API key works. |
| Show how the server is configured, without calling the API. |
Read-only tools are marked readOnlyHint; refunds and invalidations are marked
destructiveHint so your client can ask before running them.
Taking a payment
Creating the link:
Sell "Wireless keyboard" for 30000 IQD with 5000 delivery
sell_item builds the line items, generates a unique reference ID, and returns a
checkout URL like https://checkout.thewayl.com/pay/I94F590I. Send that to the
customer. It works the same for a service, a ticket or a digital download — set
delivery_fee=0 when nothing ships.
For full control over webhooks, redirects and custom line items, use
create_payment_link instead.
Finding out whether they paid — either poll:
Has order order-wireless-keyboard-a1b2c3 been paid?
or receive a webhook. Set webhookUrl and webhookSecret when creating the link, then
pass each incoming request to parse_webhook, which verifies the signature and tells
you whether to fulfil.
Webhooks
Wayl signs each delivery with HMAC-SHA256 over the raw request body, sending the
hex digest in the x-wayl-signature-256 header.
Three things that break integrations:
Hash the raw bytes.
json.dumps(json.loads(body))changes whitespace and key order, so the digest will not match. Verify before you parse.Wayl sends
Content-Type: text/plain, so JSON body parsers may hand you an empty body. Read the raw body yourself.Deduplicate on the payload's
id. There is no timestamp in the signature, so a captured request replays forever — and Wayl retries on timeout, so duplicates happen in normal operation too.
The webhook reports paymentStatus: "Paid", which is not one of the eight link
statuses the REST API uses. parse_webhook handles that distinction.
Development
uv run pytestuv run ruff check src testsSee CLAUDE.md for architecture notes and the API's sharp edges.
Licence
MIT
Maintenance
Related MCP Servers
- AlicenseCquality-maintenanceThis is an MCP server to manage PayPalLast updated12
- Alicense-qualityDmaintenanceThe PayPal Model Context Protocol server allows you to integrate with PayPal APIs through function calling. This protocol supports various tools to interact with different PayPal services.Last updated322189
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server for integrating with the SATIM payment gateway system in Algeria, enabling AI assistants to process CIB/Edhahabia card payments through the SATIM-ePAY platform.Last updated51115GPL 3.0
- AlicenseAqualityBmaintenanceMCP server for JazzCash mobile wallet and payments (Pakistan). Supports wallet payments, mobile account payments, vouchers, refunds, and balance inquiries.Last updated581MIT
Related MCP Connectors
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
MCP server for Appcircle mobile CI/CD platform.
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/muthanii/waylMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server