微算力 · API 导航与自营网关
API 接入 EN
未登录登录
💳

一站式印尼支付解决方案

mayar-payment · vlatest
效率 安全 S 级 作者 Unknown 公开目录收录
1k 下载 385 安装 2.7k 收藏 62.4k 浏览

简介

基于 Mayar.id 的 MCP 支付集成,支持印尼本地支付方式,快速构建invoice与自动化收款。

原始描述

Mayar.id payment integration for generating invoices, payment links, and tracking transactions via MCP. Use when needing to: (1) Create payment invoices/links for customers, (2) Track payment status and transactions, (3) Generate WhatsApp-friendly payment messages, (4) Handle Indonesian payment methods (bank transfer, e-wallet, QRIS), (5) Manage subscriptions/memberships, or (6) Automate payment workflows for e-commerce, services, or digital products.

通过你的 Agent 添加

安装目录:mayar-payment/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/mayar-payment-5802/
Codex CLI~/.codex/skills/mayar-payment-5802/
DeepSeek Harness~/.agents/skills/mayar-payment-5802/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Mayar Payment Integration 是一款专为印度尼西亚市场设计的支付处理 Skill,通过 MCP(Model Context Protocol)协议集成 Mayar.id 官方支付平台。其核心能力覆盖六大场景:

  1. 智能账单生成:一键创建含支付链接的订单,支持多币种、多商品、自定义过期时间
  2. 全渠道支付覆盖:原生支持印尼主流支付方式——银行转账(BCA、Mandiri、BRI等)、电子钱包(OVO、GoPay、DANA、LinkAja)、QRIS扫码支付
  3. WhatsApp 深度集成:内置消息模板,自动将支付链接格式化为印尼语友好型消息,直达客户手机
  4. 实时交易追踪:支持按状态筛选(created/paid)、按时间段查询、按客户检索等多维度交易管理
  5. 订阅会员管理:完整支持周期性会员产品(membership)的查询与管理
  6. 自动化工作流:通过 Webhook 或轮询模式实现支付确认的自动化处理

技术架构上,Skill 本身为纯文档型设计,无实际可执行代码,所有敏感操作均通过官方 MCP 服务器 mcp.mayar.id 完成,数据流向透明可控。

显著优点

  • 本土化深度:专为印尼市场优化,覆盖 90% 以上本地常用支付方式,支持印尼盾(IDR)自动格式化
  • 零代码集成:基于 MCP 协议,无需编写复杂代码即可在支持 MCP 的环境中(如 Claude、Cursor)直接调用
  • 安全架构清晰:API 密钥存储于本地 ~/.config/mayar/credentials,权限设置为 600,无硬编码风险
  • 双环境支持:正式环境(mayar.id)与沙盒环境(mayar.club)完全隔离,便于测试验证
  • 消息即服务:内置 WhatsApp 消息模板,降低电商客服的沟通成本
  • 开源可信:MIT 协议开源,社区可审计,维护者响应活跃

潜在缺点与局限性

  • 地域限制强:仅针对印尼市场,不支持其他国家的支付方式或货币
  • 依赖外部平台:功能完全依赖 Mayar.id 服务稳定性,若官方 API 变更需等待 Skill 更新
  • Webhook 需自行配置:实时支付通知需要用户额外配置 Webhook URL,对技术门槛有一定要求
  • 轮询模式效率低:若选择轮询而非 Webhook,支付确认存在 30-60 秒延迟
  • T3 来源可信度:维护者为个人开发者/社区项目,非企业级官方背书

适合人群

  • 印尼本土电商卖家:需要快速接入本地化支付的 Shopify、WooCommerce 或独立站运营者
  • 服务型中小企业:咨询、设计、教育等行业的自由职业者或小微公司,需简化账单流程
  • MCP 生态开发者:探索 Model Context Protocol 在支付场景应用的技术人员
  • 自动化工作流构建者:希望通过 AI 助手自动处理订单生成、支付追踪、客户通知的进阶用户

常规风险

  1. 资金安全依赖第三方:所有交易资金托管于 Mayar.id 平台,Skill 仅为接口层,需评估 Mayar 本身的金融资质与合规性
  2. API 密钥泄露风险:虽文档建议安全存储,但用户若未遵循最佳实践(如硬编码于代码、提交至 Git),可能导致密钥泄露
  3. 钓鱼链接仿冒:生成的支付链接格式为 *.myr.id,客户需警惕仿冒域名
  4. 汇率与手续费波动:跨境交易或货币转换时,实际到账金额可能因 Mayar 平台规则产生差异
  5. 合规性责任:涉及支付处理的业务需自行确保符合印尼央行(BI)及相关金融监管要求,Skill 不提供合规担保

技能正文


name: mayar-payment description: Mayar.id payment integration for generating invoices, payment links, and tracking transactions via MCP. Use when needing to: (1) Create payment invoices/links for customers, (2) Track payment status and transactions, (3) Generate WhatsApp-friendly payment messages, (4) Handle Indonesian payment methods (bank transfer, e-wallet, QRIS), (5) Manage subscriptions/memberships, or (6) Automate payment workflows for e-commerce, services, or digital products.

Mayar Payment Integration

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

Prerequisites

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

Setup

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.

Core Workflows

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"

Common Patterns

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

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:

Sandbox (Testing):

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

payfinance-accountingautomationapioperationssalescustomer-support

同类 Skill