Logo Setup Oxpay

Setup Oxpay

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

Set up, build, debug, review, and explain OxPay payment integrations using official OxPay docs, the OxPay Payments API (v2), Hosted Payment Page (/payment-page), merchant-hosted Create Payment (/payment), void, refund, payment query by ID, session or merchant reference, payment/refund/void webhooks, Bearer API keys, HMAC-SHA256 Signature header with the Sign Key, card pre-auth capture flag, MPQR/CPQR QR wallets, payouts, merchant portal setup, and production go-live testing. Use when working with OxPay Malaysia (OxPay (M) Sdn Bhd, formerly MC Payment), OxPay Financial, cards, Alipay, WeChat Pay, GrabPay, ShopeePay, Atome, UPI, QR payments, hosted checkout, webhook settlement, refunds, voids, payouts, or production readiness.

Tổng quan

Nhà phát hànhafu-it
Kho mãmalaysia-payment-gateway
Tên kỹ năngsetup-oxpay
Sao
74
Bản fork
11
Tệp đi kèm
4
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ộ.

  • 4 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 Oxpay 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-oxpay
  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-oxpay .claude/skills/setup-oxpay
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 Oxpay 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 Oxpay 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 Oxpay 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.

OxPay Payment Gateway

Use this skill for OxPay (OxPay Financial / OxPay Malaysia) payment gateway integration work.

Source

Read references/oxpay-api.md before giving factual API guidance or writing integration code. It holds the endpoint catalogue, environments, required headers, the Signature (HMAC-SHA256) algorithm, full request/response field tables for hosted page, create payment, void, refund, queries, payouts, all webhooks, status codes, transaction states, brand enums and known doc gaps.

Read references/account-setup.md when the user asks how to become an OxPay merchant, where API keys and Sign Keys live, the merchant portal, MID/TID, go-live testing, payment method activation, settlement reports, pricing or support channels.

Read references/source-map.md to pick the right official page or to check docs coverage.

Core Workflow

  1. Confirm the merchant is onboarded and has MID (merchant_id, max 9 chars) and TID (terminal_id, exactly 14 chars) from OxPay.
  2. Choose surface: Hosted Payment Page (POST /payment-page, terminal needs the Ecommerce feature) or merchant-hosted Create Payment (POST /payment, card data requires your own PCI DSS compliance).
  3. Create a local pending order first, with a merchant_reference_id unique per terminal (1 to 100 chars).
  4. Serialize the request JSON once in compact form, sign it with HMAC-SHA256 using the Sign Key, send the same bytes with Authorization: Bearer <API_KEY>, Signature: <hex> and a User-Agent header.
  5. For hosted checkout, redirect the browser to body.oxpay_hpp_url. For QR (MPQR) render body.qr_string before payment_expiry_time.
  6. Treat success_url / failure_url as browser UX only. Do not fulfil from them.
  7. Receive the payment webhook at notification_url, verify the Signature header with the Sign Key, then parse.
  8. Settle idempotently only when headers.status_code is 0, body.transaction_state is success (or captured for pre-auth capture), and merchant_reference_id, oxpay_txn_id, amount and currency match the local order.
  9. If the webhook is late or missing, requery with GET /payment/{oxpay_txn_id} or GET /payment?merchant_reference_id=....
  10. Refund with POST /refund (successful sale) or void/cancel with POST /void; final outcome comes via the refund or void webhook.

Core Facts

  • Live base URL: https://api.oxpayfinancial.com. Sandbox listed in the OpenAPI spec: https://api.uat.oxpayfinancial.com, but Getting Started says "no UAT environment available" and testing is done in production with OxPay test cases. Confirm with OxPay.
  • API version in spec: 2.0.2; optional header OxPay-Version: 2.0.1.
  • Auth header: Authorization: Bearer <API_KEY> (keys look like ak-...).
  • Integrity header: Signature = lowercase hex HMAC-SHA256 of the compact JSON body (no whitespace between tokens, original key order) keyed with the Sign Key. Required on POST requests; sent by OxPay on every webhook.
  • User-Agent header is required on every request.
  • GET query endpoints and GET /payouts/{unique_reference} take Authorization and User-Agent only (no Signature in spec).
  • Amounts are positive integers in the smallest currency unit (docs example: SGD 1 = 100). For MYR this means sen.
  • Currency is ISO 4217 alpha-3. Public examples use SGD only; MYR support depends on your account.
  • headers.status_code: 0 Success, 1 Pending, 2 Rejected, 3 Error. Rejected/Error return HTTP 400.
  • transaction_state enum: success, requested, authorized, pending, rejected, error, expired, voided, refunded, captured, capture_submitted, capture_rejected.
  • Documented brands: card, alipay, wechat pay, grabpay, shopeepay, atome, dash, PayNow, upi. FPX, DuitNow and Touch 'n Go are not in the public API docs (checked 2026-10-21).
  • Card capture: false means pre-auth. No capture endpoint is documented.
  • Merchant portal: https://merchant.oxpayfinancial.com; login https://login.oxpayfinancial.com/login. API keys: Configurations > API Keys > Add New Key.
  • Support: support@oxpayfinancial.com, https://oxpay.freshdesk.com/support/home.

Critical Rules

  • Keep the API key and Sign Key server-side only.
  • Sign exactly the bytes you send. Do not pretty-print after signing or let an HTTP client re-serialize the body.
  • Verify the webhook Signature before trusting any field; use a constant-time comparison.
  • Never mark paid from success_url, a frontend callback, a status_code of 1, or a create-payment response alone (MPQR returns Pending).
  • Check amount, currency, merchant_reference_id, oxpay_txn_id, MID/TID and state before settling.
  • Make webhook handling idempotent; key on oxpay_txn_id plus transaction type.
  • Do not send raw card data to /payment unless the merchant is PCI DSS compliant; otherwise use the Hosted Payment Page.
  • Keep merchant_reference_id unique per terminal and stable across retries.
  • Session IDs from /payment-page expire; request a new one after expiry.
  • Webhook retry policy, source IPs, required HTTP response and rate limit numbers are not documented. Do not claim them.
  • Confirm MYR, FPX, DuitNow, e-wallet and BNPL availability with OxPay before promising them.

Completion Criteria

An OxPay integration is done only when:

  1. Hosted page or create payment runs server-side with Bearer API key, Signature and User-Agent headers.
  2. The signed string and the sent body are byte-identical, tested with a known vector.
  3. Webhook handler verifies Signature with the Sign Key before parsing and responds quickly.
  4. Settlement checks status_code, transaction_state, reference IDs, amount, currency and terminal.
  5. Duplicate webhooks, late webhooks and requery are idempotent.
  6. Refund and void flows store oxpay_original_txn_id and settle from their webhooks.
  7. Tests cover bad signature, wrong amount/currency/reference, pending, rejected, expired, duplicate and success.
  8. Deployment docs list OXPAY_API_KEY, OXPAY_SIGN_KEY, OXPAY_MERCHANT_ID, OXPAY_TERMINAL_ID, OXPAY_BASE_URL, notification URL and go-live test results.

Loophole Review Loop

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

  1. List trust boundaries: browser redirect, hosted page, merchant card form, backend signer, OxPay API, webhook receiver, JSON serializer, database, fulfilment, refund/void jobs, payout jobs, merchant portal.
  2. Check bypasses: fake success redirect, forged webhook, signature over re-ordered or pretty JSON, unicode escaping mismatch, wrong Sign Key, wrong amount/currency/reference, reused merchant_reference_id, Pending treated as paid, expired QR or session, duplicate webhook, refund replay, pre-auth treated as captured, UAT/live confusion.
  3. Add fixes: server-side signing, single serialization, constant-time compare, strict field checks, durable event log, idempotency keys, requery fallback, environment config separation.
  4. Re-read references/oxpay-api.md sections relevant to any gap.
  5. State remaining uncertainty: sandbox availability, MYR and local method support, webhook retries and response contract, rate limits, capture flow, settlement timing 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 Oxpay làm được gì?

Set up, build, debug, review, and explain OxPay payment integrations using official OxPay docs, the OxPay Payments API (v2), Hosted Payment Page (/payment-page), merchant-hosted Create Payment (/payment), void, refund, payment query by ID, session or merchant reference, payment/refund/void webhooks, Bearer API keys, HMAC-SHA256 Signature header with the Sign Key, card pre-auth capture flag, MPQR/CPQR QR wallets, payouts, merchant portal setup, and production go-live testing. Use when working with OxPay Malaysia (OxPay (M) Sdn Bhd, formerly MC Payment), OxPay Financial, cards, Alipay, WeChat...

Vì sao nên dùng Setup Oxpay 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 Oxpay 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 Oxpay 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-oxpay. 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 Oxpay?

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 Oxpay 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 Oxpay 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 Oxpay 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 👇