Logo Setup Moby

Setup Moby

Cộng đồng
afu-it
setup-moby

Set up, build, debug, review, and explain MOBY (MobyPay, Moby Omni) payment integrations using official MOBY docs, the MOBY OpenAPI spec and MOBY plugin source, covering Bearer token auth with Client ID and Secret Key, hosted checkout payLink, Direct API payUrl for cards, FPX, e-wallets, DuitNow QR and shariah-compliant BNPL, callbackUrl webhooks, HMAC-SHA256 callback signatures, payment status and detail requery, capture, void, refunds, card tokenisation and recurring charges, subscriptions, POS and kiosk TCP with installment plans, sandbox test cards, rate limits, and plugins for WooCommerce, Shopify, Magento, OpenCart and EasyStore. Use when working with MOBY or MobyPay checkout, Moby Islamic BNPL, pay.mobycheckout.com, callback verification, settlement, refunds, recurring billing, or production readiness.

Tổng quan

Nhà phát hànhafu-it
Kho mãmalaysia-payment-gateway
Tên kỹ năngsetup-moby
Sao
74
Bản fork
11
Tệp đi kèm
6
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 6 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được afu-it công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Setup Moby trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-moby
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/afu-it/malaysia-payment-gateway.git /tmp/malaysia-payment-gateway
mkdir -p .claude/skills
cp -r /tmp/malaysia-payment-gateway/setup-moby .claude/skills/setup-moby
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Setup Moby trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Setup Moby ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Setup Moby không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

MOBY (MobyPay) Payment Gateway

Use this skill for MOBY / MobyPay payment integration work.

Source

Read references/moby-api.md before giving factual API guidance or writing integration code. It holds environments, auth, the endpoint catalogue, hosted checkout and Direct API field tables, callback payload, the signature algorithm, status/detail requery, capture/void/refund, sandbox data, rate limits, errors, plugins, and the known conflicts between MOBY's sources.

Read references/moby-recurring.md for card tokens, token charges, charge status/refund, the subscription API, and dashboard Recurring Billing.

Read references/moby-pos.md for POS/kiosk TCP integration, IPP installment plans, and Visa plan cancel.

Read references/account-setup.md for onboarding, where credentials come from, sandbox vs live, dashboard features, env vars, settlement and pricing caveats.

Read references/source-map.md to pick the official page for a topic and to see coverage.

Core Workflow

  1. Identify environment: sandbox https://dev.pay.mobycheckout.com or production https://pay.mobycheckout.com.
  2. Identify surface: hosted checkout (default), Direct API for one method, token/recurring, dashboard payment link or recurring billing, plugin, or POS/kiosk.
  3. Confirm credentials: Client ID and Secret Key for that environment, issued by merchantsupport@moby.my; merchant category (insurance merchants must send NRIC).
  4. Create a local pending payment with a unique referenceNo, expected amount (MYR, 2 decimals), and environment before calling MOBY.
  5. Get a Bearer token with POST /api/auth/token; cache until expired_at, refresh on 401.
  6. Create the session server-side (/api/merchant/payment/checkout/hosted returns payLink; /api/merchant/payment/direct/pay returns payUrl) and redirect the customer.
  7. Treat the returnUrl redirect as UX only, even though it carries a signed query string.
  8. On the callbackUrl POST, verify signature (HMAC-SHA256, Secret Key, 8 fields in fixed order) before anything else.
  9. Settle idempotently only when status is success and referenceNo, amount, environment and merchant match; reply HTTP 200 {"status":"success"}.
  10. Requery with /api/merchant/payment/detail or /status when a callback is missing, late, or not success.

Core Facts

  • Token: POST /api/auth/token with clientId + secretKey; use Authorization: Bearer <token>; docs say 30 minute lifetime.
  • Hosted checkout: POST /api/merchant/payment/checkout/hosted, required clientId, customerName, referenceNo, details, amount; response { success, payLink }.
  • Direct pay: POST /api/merchant/payment/direct/pay with payMethod from POST /api/merchant/payment/method/list; response { success, payUrl }.
  • Amounts are MYR decimals (ringgit, not sen) on live v1 endpoints. The /v2/... cents API is Coming Soon only.
  • Callback fields: referenceNo, transactionId, amount, payMethod, status, time, merchantOrderRef, description, signature.
  • Signature: lowercase hex HMAC-SHA256 with the Secret Key over the concatenated values of amount, description, merchantOrderRef, payMethod, referenceNo, status, time, transactionId (null becomes empty string, no separator).
  • Statuses: docs list success, failed, pending; MOBY's plugins also handle cancelled and processing.
  • Requery: POST /api/merchant/payment/status (clientId, referenceNo, transactionId) or /detail (clientId, referenceNo).
  • Refund POST /api/merchant/payment/refund; void POST /api/merchant/payment/void same day only; capture POST /api/merchant/payment/capture.
  • Recurring: POST /api/v2/tokens returns a save-card redirect_url; charge with POST /api/v2/tokens/{token}/charges (3ds required).
  • Rate limits: auth 10/min per client, general 60/min per token, 429 with Retry-After.
  • Sandbox: Mastercard test cards, expiry drives result (01/39 approved); FPX only ACF Bank B2B user1/password1; no e-wallet sandbox (real charges).
  • No webhook IP list, signature header, dashboard webhook registry, or public status page is documented.

Critical Rules

  • Keep the Secret Key server-side. It mints tokens and is the callback HMAC key.
  • Never mark paid from returnUrl, payLink/payUrl creation, a frontend message, or an unsigned payload.
  • Verify the signature over values exactly as received; do not reformat amount or time; map null to "" (JavaScript String(null) is "null").
  • Use constant-time comparison and reject on mismatch; log the raw payload instead of loosening the check.
  • Do not put your own query params in callbackUrl/returnUrl unless you strip them before hashing; also strip a leading ? from keys MOBY may append.
  • Make referenceNo unique per attempt; hosted checkout returns no session ID, so it is your only correlation key.
  • Make callback handling idempotent; one referenceNo may see several transactions and repeated callbacks.
  • Compare amounts as 2-decimal strings or integer sen, never floats.
  • Do not test e-wallets casually in sandbox; they charge real money.
  • Do not build on /v2/..., Financing, Loyalty, or Merchant Management endpoints; they are not in production.
  • Where docs, OpenAPI and plugins disagree (listed in the references), confirm with MOBY Merchant Support before go-live.

Completion Criteria

A MOBY integration is done only when:

  1. Token, session creation and requery run server-side with environment-matched Client ID, Secret Key and base URL.
  2. A local pending payment with unique referenceNo and expected amount exists before redirecting.
  3. The callback handler verifies the HMAC over the documented 8 fields with the Secret Key, in constant time.
  4. Settlement checks status === "success", referenceNo, amount, environment and merchant, and is idempotent.
  5. The handler returns HTTP 200 {"status":"success"} only after durable processing.
  6. Missing or non-final callbacks are reconciled through /api/merchant/payment/detail or /status.
  7. Refunds and voids are recorded as pending until a signed callback or status check confirms them.
  8. Tests cover valid signature, tampered field, null merchantOrderRef, wrong amount, duplicate callback, failed/pending/cancelled, and a ?-prefixed query key.
  9. Deployment docs list MOBY_CLIENT_ID, MOBY_SECRET_KEY, base URL, callback URL, return URL, and sandbox/live separation.

Loophole Review Loop

When asked whether a MOBY strategy is "100% confident", run this loop until no factual gaps remain:

  1. List trust boundaries: browser return redirect, MOBY hosted page, backend session creator, token cache, MOBY API, callback receiver, body parser, database, fulfilment job, refund/void job, recurring charge scheduler, plugin, dashboard, POS/kiosk TCP link.
  2. Check bypasses: forged return URL, unsigned or tampered callback, null hashed as "null", reformatted amount, wrong Secret Key or environment, reused referenceNo, wrong amount, duplicate callback, callback before local record committed, expired token mid-flow, rate-limit storms from per-request auth, partial refund field guess, sandbox e-wallet charges, replayed kiosk message, default kiosk secret.
  3. Add fixes: server-side session creation, pending record first, documented 8-field HMAC, constant-time compare, strict amount/reference checks, durable event log, idempotent settlement, token caching, status/detail requery, nonce and timestamp checks on TCP, environment-separated config.
  4. Re-read the relevant section of references/moby-api.md, references/moby-recurring.md or references/moby-pos.md for any gap.
  5. State remaining uncertainty where it depends on MOBY confirmation: direct-pay callback delivery, partial refund field, callback retry policy, insurance NRIC field name, token charge client_id placement and custom_data type, x-token issuance, settlement timing, account method activation, and pricing.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Setup Moby làm được gì?

Set up, build, debug, review, and explain MOBY (MobyPay, Moby Omni) payment integrations using official MOBY docs, the MOBY OpenAPI spec and MOBY plugin source, covering Bearer token auth with Client ID and Secret Key, hosted checkout payLink, Direct API payUrl for cards, FPX, e-wallets, DuitNow QR and shariah-compliant BNPL, callbackUrl webhooks, HMAC-SHA256 callback signatures, payment status and detail requery, capture, void, refunds, card tokenisation and recurring charges, subscriptions, POS and kiosk TCP with installment plans, sandbox test cards, rate limits, and plugins for WooComme...

Vì sao nên dùng Setup Moby trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Setup Moby là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Setup Moby trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-moby. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Setup Moby?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Setup Moby với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Setup Moby với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Setup Moby có miễn phí không?

Kỹ năng này được afu-it phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇