Setup Asiapay logo

Setup Asiapay

Community
afu-it
setup-asiapay

Set up, build, debug, review, and explain AsiaPay (PayDollar) Malaysia payment integrations using official AsiaPay developer docs, Client Post Through Browser (payForm.jsp hosted page), Direct Client Side and Server Side Direct Connection (payComp.jsp), SHA-1/SHA-256 secureHash request signing, datafeed (Return Value Link) verification with the src|prc|successcode|Ref|PayRef|Cur|Amt|payerAuth hash, the "OK" acknowledgement, Merchant API orderApi.jsp (Query, Capture, Void, RequestRefund, Cancel, QueryRequestLog), onlineApi.jsp OnlineReversal refunds, GenTxnXML settlement report, MemberPay tokens, PaySDK, 3DS 2.0, test vs live URLs, and merchant admin setup. Use when working with AsiaPay, PayDollar, AsiaPay Malaysia, MYR currCode 458, FPX, DuitNow, Touch 'n Go, GrabPay, cards, e-wallets, datafeed settlement, refunds, or production readiness.

Overview

Publisherafu-it
Repositorymalaysia-payment-gateway
Skill namesetup-asiapay
Stars
74
Forks
11
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by afu-it on GitHub. Read the source before you install it.

Installation

Install the Setup Asiapay AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-asiapay
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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-asiapay .claude/skills/setup-asiapay
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Setup Asiapay in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Setup Asiapay on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Setup Asiapay is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AsiaPay (PayDollar) Payment Gateway

Use this skill for AsiaPay payment gateway integration work. AsiaPay Malaysia sells the PayDollar gateway; the API, hosts and field names are the PayDollar ones (paydollar.com). SiamPay and PesoPay are the Thai and Philippine brands of the same platform and are out of scope.

Source

Read references/asiapay-api.md before giving factual API guidance or writing integration code. It holds the endpoint catalogue, test and live URLs, every payment request field, the exact secureHash string orders, datafeed fields, Merchant API inputs and outputs, status values, response codes, test cards and gotchas.

Read references/account-setup.md when the user asks how to sign up, where the merchant ID, Secure Hash Secret or API login live, how to enable datafeed or secure hash, sandbox vs live accounts, payment method activation in Malaysia, or pricing.

Read references/source-map.md to pick the right official page, or to see what the docs cover and leave out.

Core Workflow

  1. Identify environment: test (test.paydollar.com/b2cDemo) or production (www.paydollar.com/b2c2).
  2. Pick the connection method: Client Post Through Browser (hosted page, default for web), Direct Client Side Connection (merchant card form, needs PCI scope), Server Side Direct Connection (server post, wallets/app-to-app), or PaySDK (mobile).
  3. Confirm admin setup: Secure Hash enabled by AsiaPay, Secure Hash Secret copied, datafeed URL ("Return Value Link") enabled, Merchant API login issued, payment methods activated.
  4. Create a local pending order with a unique orderRef before posting to PayDollar.
  5. Build the form server-side: merchantId, orderRef, currCode=458, amount, payType, payMethod, lang, the three URLs, and secureHash = SHA(merchantId|orderRef|currCode|amount|payType|secret).
  6. Auto-submit the form to payForm.jsp from the browser. Treat successUrl, failUrl and cancelUrl as display only.
  7. Receive the datafeed POST, print OK first, then verify secureHash over src|prc|successcode|Ref|PayRef|Cur|Amt|payerAuth|secret.
  8. Settle idempotently only when hash, MerchantId, Ref, Amt, Cur and successcode=0 all match.
  9. If the datafeed is missing or successcode=2 (pending), requery with Merchant API actionType=Query.
  10. Run refunds and voids server-side through onlineApi.jsp (OnlineReversal) or orderApi.jsp (Void, RequestRefund).

Core Facts

  • Test hosted page: https://test.paydollar.com/b2cDemo/eng/payment/payForm.jsp; live: https://www.paydollar.com/b2c2/eng/payment/payForm.jsp.
  • Server Side Direct: .../eng/directPay/payComp.jsp; Direct Client Side: .../eng/dPayment/payComp.jsp (same two bases).
  • Merchant API: .../eng/merchant/api/orderApi.jsp; online void/refund: .../eng/merchant/api/onlineApi.jsp; settlement report: .../GenTxnXML.
  • All requests are application/x-www-form-urlencoded POSTs, UTF-8, and field names are case sensitive.
  • MYR currency code is "458". One merchant ID accepts one currency only.
  • amount is in ringgit with up to 2 decimals (Number(12,2)), not sen.
  • Request secureHash: merchantId|orderRef|currCode|amount|payType|secureHashSecret, SHA-1 by default or SHA-256 if set on the account.
  • Datafeed secureHash: src|prc|successcode|Ref|PayRef|Cur|Amt|payerAuth|secureHashSecret, same algorithm.
  • Once Secure Hash is enabled, requests without a valid hash are dropped. The secret is rotated every 2 years.
  • Datafeed successcode: 0 success, 1 failure, 2 pending, other values error.
  • The datafeed page must print OK; without it PayDollar treats the datafeed as lost. Only ports 80 and 443 are supported.
  • Merchant API auth is merchantId + loginId + password in the POST body, issued by AsiaPay on request.
  • Hold payments (payType=H) must be captured within 14 days or the hold is released.
  • Test merchant IDs are 6 digits; production merchant IDs are 4 or 8 digits.
  • Datafeed source IPs (PDF guide v3.67): test 203.105.61.183 to 203.105.61.218; production 103.149.149.1 to 103.149.149.62.

Critical Rules

  • Keep the Secure Hash Secret, API loginId and password server-side only. Compute secureHash on the server and render it into the form.
  • Hash the exact amount string you post (10 and 10.00 give different hashes).
  • Never mark paid from successUrl, failUrl, cancelUrl, the Ref query value, or PaySDK client results alone. Use the datafeed or Merchant API Query.
  • Verify the datafeed hash against the raw POST values before any type conversion. Accept the datafeed if any comma-separated value in secureHash matches (official plugin behaviour during secret rotation).
  • Use constant-time comparison for hashes.
  • Print OK to acknowledge before slow work; never let a processing error suppress the OK and trigger retries you cannot dedupe.
  • Expect several datafeeds for one orderRef (customer retries after Back). Once paid, ignore later failures for the same orderRef.
  • Treat successcode=2 and statuses Pending, Pending_3D, Pending_feedback as not final; requery later.
  • Do not mix test and production merchant IDs, URLs, secrets or API logins.
  • Never store card number, expiry or CVV. Direct Client Side and Server Side card posts put the merchant in PCI scope.

Completion Criteria

An AsiaPay integration is done only when:

  1. The payment form is built server-side with a correct secureHash and posts to the right environment URL.
  2. Redirect pages only show status; they do not fulfil orders.
  3. The datafeed URL is enabled in merchant admin for the right environment and reachable on 80/443 with a trusted TLS chain.
  4. The datafeed handler prints OK, verifies the hash, and checks MerchantId, Ref, Amt, Cur and successcode before settling.
  5. Settlement is idempotent across duplicate and retried datafeeds and Query fallbacks.
  6. Merchant API Query is used for missing datafeeds and pending results; refund/void code handles resultCode=-1.
  7. Tests cover bad hash, wrong amount/currency/ref, duplicate datafeed, success-then-failure for one orderRef, pending then accepted, and refund failure.
  8. Deployment docs list ASIAPAY_MERCHANT_ID, ASIAPAY_SECURE_HASH_SECRET, ASIAPAY_HASH_ALGO, ASIAPAY_API_LOGIN_ID, ASIAPAY_API_PASSWORD, the base URL and the datafeed URL per environment.

Loophole Review Loop

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

  1. List trust boundaries: browser form post, payment page, redirect URLs, datafeed receiver, Merchant API caller, database, fulfilment job, refund job, merchant admin settings.
  2. Check bypasses: forged datafeed, hash not enabled on the account, wrong algorithm (SHA-1 vs SHA-256), amount string mismatch, parsed instead of raw values, rotated secret, wrong merchant ID or currency, replayed success redirect, duplicate orderRef, success followed by failure datafeed, pending marked failed too early, missing OK, test/live mix, refund past the window, capture past 14 days.
  3. Add fixes: server-side hash, raw-value verification, constant-time compare, strict field checks, unique orderRef, event log with idempotency key PayRef, Query fallback, IP range check as defence in depth, separate env config.
  4. Re-read the relevant section of references/asiapay-api.md for any gap.
  5. State remaining uncertainty that depends on the merchant account: hash algorithm, enabled payment methods and their payMethod codes, refund window, datafeed retry setting, and production PaySDK hosts.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Setup Asiapay AI skill do?

Set up, build, debug, review, and explain AsiaPay (PayDollar) Malaysia payment integrations using official AsiaPay developer docs, Client Post Through Browser (payForm.jsp hosted page), Direct Client Side and Server Side Direct Connection (payComp.jsp), SHA-1/SHA-256 secureHash request signing, datafeed (Return Value Link) verification with the src|prc|successcode|Ref|PayRef|Cur|Amt|payerAuth hash, the "OK" acknowledgement, Merchant API orderApi.jsp (Query, Capture, Void, RequestRefund, Cancel, QueryRequestLog), onlineApi.jsp OnlineReversal refunds, GenTxnXML settlement report, MemberPay to...

Why use Setup Asiapay on TypingMind?

Because you install it once and use it with any model. Setup Asiapay is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Setup Asiapay in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-asiapay. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Setup Asiapay?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Setup Asiapay?

As many as you like. As long as a model supports skills, you can use Setup Asiapay with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Setup Asiapay AI skill free?

It is published on GitHub by afu-it. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇