# Send Mayar Payment Integration to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "mayar-payment",
    "name": "Mayar Payment Integration",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/ahsanatha/mayar-payment",
    "canonicalUrl": "https://clawhub.ai/ahsanatha/mayar-payment",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/mayar-payment",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=mayar-payment",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/api-reference.md",
      "references/integration-examples.md",
      "references/mcp-tools.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "mayar-payment",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T20:05:49.878Z",
      "expiresAt": "2026-05-06T20:05:49.878Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=mayar-payment",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=mayar-payment",
        "contentDisposition": "attachment; filename=\"mayar-payment-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "mayar-payment"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/mayar-payment"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/mayar-payment",
    "downloadUrl": "https://openagent3.xyz/downloads/mayar-payment",
    "agentUrl": "https://openagent3.xyz/skills/mayar-payment/agent",
    "manifestUrl": "https://openagent3.xyz/skills/mayar-payment/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/mayar-payment/agent.md"
  }
}
```
## Documentation

### Mayar Payment Integration

Integrate Mayar.id payment platform via MCP (Model Context Protocol) for Indonesian payment processing.

### Prerequisites

Mayar.id account - Sign up at https://mayar.id
API Key - Generate from https://web.mayar.id/api-keys
mcporter configured - MCP must be set up in Clawdbot

### 1. Store API Credentials

mkdir -p ~/.config/mayar
cat > ~/.config/mayar/credentials << EOF
MAYAR_API_TOKEN="your-jwt-token-here"
EOF
chmod 600 ~/.config/mayar/credentials

### 2. Configure MCP Server

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.

### 3. Test Connection

mcporter list mayar

Should show 15+ available tools.

### Create Invoice with Payment Link

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 timezone
items - Array of {quantity, rate, description}
redirectURL - Where customer goes after payment

### WhatsApp Integration Pattern

// 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
});

### Check Payment Status

# 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).

### Other Operations

# 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"

### Multi-Item Invoice

items='[
  {"quantity":2,"rate":500000,"description":"Product A"},
  {"quantity":1,"rate":1000000,"description":"Product B"}
]'
// Total: 2M (2×500K + 1×1M)

### Subscription/Recurring

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"

### Payment Confirmation Flow

Option A: Webhook (Real-time)

Register webhook URL with Mayar
Receive instant payment notifications
Best for production

Option B: Polling (Simpler)

Poll get_latest_transactions every 30-60s
Check for new payments
Best for MVP/testing

### Troubleshooting

404 on payment link:

Link format: https://your-subdomain.myr.id/invoices/slug
Check dashboard for correct subdomain
Default may be account name

Invalid mobile number:

Mobile MUST be string: "\\"628xxx\\"" (with escaped quotes)
Format: 628xxxxxxxxxx (no + or spaces)

Expired invoice:

Default expiry is expiredAt timestamp
Customer can't pay after expiration
Create new invoice if needed

### Reference Documentation

API Details: See references/api-reference.md
Integration Examples: See references/integration-examples.md
MCP Tools Reference: See references/mcp-tools.md

### Production Checklist

Use production API key (not sandbox)
 Setup webhook for payment notifications
 Error handling for failed invoice creation
 Store invoice IDs for tracking
 Handle payment expiration
 Customer database integration
 Receipt/confirmation automation

### Environments

Production:

Dashboard: https://web.mayar.id
API Base: https://api.mayar.id/hl/v1/

Sandbox (Testing):

Dashboard: https://web.mayar.club
API Base: https://api.mayar.club/hl/v1/
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ahsanatha
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T20:05:49.878Z
- Expires at: 2026-05-06T20:05:49.878Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/mayar-payment)
- [Send to Agent page](https://openagent3.xyz/skills/mayar-payment/agent)
- [JSON manifest](https://openagent3.xyz/skills/mayar-payment/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/mayar-payment/agent.md)
- [Download page](https://openagent3.xyz/downloads/mayar-payment)