Install
openclaw skills install mayar-paymentClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Integrate Mayar.id payments to create invoices, generate payment links, track Indonesian payment methods, manage subscriptions, and automate payment workflows.
openclaw skills install mayar-paymentIntegrate Mayar.id payment platform via MCP (Model Context Protocol) for Indonesian payment processing.
mkdir -p ~/.config/mayar
cat > ~/.config/mayar/credentials << EOF
MAYAR_API_TOKEN="your-jwt-token-here"
EOF
chmod 600 ~/.config/mayar/credentials
Add to config/mcporter.json:
{
"mcpServers": {
"mayar": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.mayar.id/sse",
"--header",
"Authorization:YOUR_API_TOKEN_HERE"
]
}
}
}
Replace YOUR_API_TOKEN_HERE with actual token.
mcporter list mayar
Should show 15+ available tools.
Most common use case: Generate payment link for customer.
mcporter call mayar.create_invoice \
name="Customer Name" \
email="email@example.com" \
mobile="\"628xxx\"" \
description="Order description" \
redirectURL="https://yoursite.com/thanks" \
expiredAt="2026-12-31T23:59:59+07:00" \
items='[{"quantity":1,"rate":500000,"description":"Product A"}]'
Returns:
{
"id": "uuid",
"transactionId": "uuid",
"link": "https://subdomain.myr.id/invoices/slug",
"expiredAt": 1234567890
}
Key fields:
mobile - MUST be string with quotes: "\"628xxx\""expiredAt - ISO 8601 format with timezoneitems - Array of {quantity, rate, description}redirectURL - Where customer goes after payment// 1. Create invoice
const invoice = /* mcporter call mayar.create_invoice */;
// 2. Format message
const message = `
✅ *Order Confirmed!*
*Items:*
• Product Name
Rp ${amount.toLocaleString('id-ID')}
*TOTAL: Rp ${total.toLocaleString('id-ID')}*
💳 *Pembayaran:*
${invoice.data.link}
⏰ Berlaku sampai: ${expiryDate}
Terima kasih! 🙏
`.trim();
// 3. Send via WhatsApp
message({
action: 'send',
channel: 'whatsapp',
target: customerPhone,
message: message
});
# Get latest transactions (check if paid)
mcporter call mayar.get_latest_transactions page:1 pageSize:10
# Get unpaid invoices
mcporter call mayar.get_latest_unpaid_transactions page:1 pageSize:10
Filter by status: "created" (unpaid) → "paid" (success).
# Check account balance
mcporter call mayar.get_balance
# Get customer details
mcporter call mayar.get_customer_detail \
customerName="Name" \
customerEmail="email@example.com" \
page:1 pageSize:10
# Filter by time period
mcporter call mayar.get_transactions_by_time_period \
page:1 pageSize:10 \
period:"this_month" \
sortField:"createdAt" \
sortOrder:"DESC"
items='[
{"quantity":2,"rate":500000,"description":"Product A"},
{"quantity":1,"rate":1000000,"description":"Product B"}
]'
// Total: 2M (2×500K + 1×1M)
Use membership tools:
mcporter call mayar.get_membership_customer_by_specific_product \
productName:"Premium Membership" \
productLink:"your-product-link" \
productId:"product-uuid" \
page:1 pageSize:10 \
memberStatus:"active"
Option A: Webhook (Real-time)
Option B: Polling (Simpler)
get_latest_transactions every 30-60s404 on payment link:
https://your-subdomain.myr.id/invoices/slugInvalid mobile number:
"\"628xxx\"" (with escaped quotes)628xxxxxxxxxx (no + or spaces)Expired invoice:
expiredAt timestampProduction:
https://api.mayar.id/hl/v1/Sandbox (Testing):
https://api.mayar.club/hl/v1/