Setup Cardbizpay logo

Setup Cardbizpay

Community
afu-it
setup-cardbizpay

Set up, build, debug, review, and explain CardBizPay payment integrations using official CardBizPay developer docs, Merchant API hosted payment page (Payment/Pymt), Payment Return URL callbacks, HMAC-SHA512 base64 signatures, payment enquiry, void, refund, refund enquiry, MDR enquiry, Open Payment API card tokenization (AddCard, RemoveCard, Sale, PreAuth, Capture, PreAuthCancel, Void, Refund, TrxnEnq), staging/production setup, Merchant No, Access Key, Secret Key, and status codes. Use when working with CardBizPay or Cardbiz Payment Services, FPX B2C/B2B, DuitNow, cards, e-wallets, saved cards, pre-authorization, callback verification, requery, refunds, or production readiness.

Overview

Publisherafu-it
Repositorymalaysia-payment-gateway
Skill namesetup-cardbizpay
Stars
74
Forks
11
Bundled files
5
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.

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

Use it in TypingMind

Enable Setup Cardbizpay 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 Cardbizpay 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 Cardbizpay 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.

CardBizPay Payment Gateway

Use this skill for CardBizPay (Cardbiz Payment Services Sdn Bhd) payment gateway integration work.

Source

Read references/cardbizpay-api.md before giving factual API guidance or writing integration code. It is the entry point: environments, endpoint catalogue, the signature algorithm, the Merchant API (hosted payment page, enquiry, void, refund, MDR), status codes, and documented doc defects.

Read references/cardbizpay-opa.md when the merchant needs saved cards, merchant-initiated charges, pre-authorization and capture, or the Open Payment API (/opa/*).

Read references/account-setup.md when the user asks how to register, which credentials exist, who configures the return/notify URL, sandbox access, payment methods, settlement, or pricing.

Read references/source-map.md to find the official page behind a fact, or to see what the public docs do not cover.

Core Workflow

  1. Identify environment: staging (https://uat.cardbizpay.com/paymentgateway) or production (https://www.cardbizpay.com/paymentgateway).
  2. Identify API family: Merchant API (/Payment/*, hosted payment page) or Open Payment API (/opa/*, card tokens).
  3. Confirm onboarding: merchant profile created by the CardBizPay administrator, Merchant No, Access Key, Secret Key used for signing (the docs name both and do not say whether they are the same value), API access enabled on the profile, Payment Return URL (Merchant API) or Notify URL (Open Payment API) registered with CardBizPay, payment methods subscribed.
  4. Create a local pending order with a unique OrderId (max 25 chars for /Payment/Pymt) and the exact amount string you will send.
  5. Build the request server-side, compute Signature = base64(HMAC-SHA512(secret, concatenated values in documented field order)), and auto-submit an HTML form POST from the browser to [Base URL]/Payment/Pymt.
  6. Receive the response form POST at the Payment Return URL. Verify Signature over the received values in the documented response field order before trusting any field.
  7. Check RespCode = "00", StatusCode = "A", MerchantNo, OrderId, and TrxnAmount against the local order. Store TrxnId (needed for void and refund).
  8. Requery with GET /Payment/PymtEnq when the return post is missing, unverifiable, or not final (N, W).
  9. Settle idempotently: one order transitions to paid once, no matter how many posts or enquiries arrive.

Core Facts

  • All requests are HTML form posts; enquiries are documented as GET. Field names are case-sensitive PascalCase (MerchantNo, OrderId, TrxnAmount).
  • Signature: HMAC-SHA512 keyed with the merchant Secret Key, output base64. String to sign = values only, no separators, in the documented field order, skipping Signature and any optional field whose value is empty.
  • Official test vector (reproduces): 1000000000000001M12345678910.50 with key Ws123456Ws987654 gives ++lLP7XD4fK3t7PsBz50LdVU35yutApDvZdmlltNXuBsrQnF0B/ed1uxAjSN+3anRjJWrDelYCZoWbsyTzAuMg==.
  • Optional (O) fields must still be posted as parameters, with an empty value if unused.
  • Amounts are ringgit strings, up to 2 decimals, no thousand separators ("10", "10.5", "10.50"). No currency field is documented.
  • ReqDate format yyyyMMddHHmmss. Open Payment API rejects a ReqDate more than 60 minutes from host time.
  • PymtMethodSelect values: empty (all), Card, FPX, FPX B2C, FPX B2B, e-Wallet, DuitNow; comma-separate multiple.
  • CustMobile is required in practice when e-Wallet is subscribed; CustEmail must be supplied to avoid declines.
  • Response code 00 = approved / accepted. Payment status: A approved, D declined, N pending (cancelled after 3 days unpaid), W awaiting status, V voided, C cancelled, Q partially refunded, R fully refunded; Open Payment API adds P pre-auth and T pre-auth cancelled.
  • Void is same-day only and returns 100%; refunds may be full or multiple partial, each with a unique RefundId (max 20).
  • Payment page session counter is 15 minutes.
  • The Payment Return URL is not a request field; CardBizPay configures it on the merchant profile (editable in the Merchant Portal if you have a login).

Critical Rules

  • Keep the Secret Key server-side only; compute signatures on the server, never in browser JavaScript.
  • Never mark paid from the browser landing alone or from an unsigned or badly signed post.
  • Verify the response signature over the exact received string values; do not reformat amounts before hashing.
  • Sign the exact strings you post. If you send "10.5", sign "10.5", and use the same string for later void, refund, and enquiry calls ("should be the same value when calling Payment API").
  • Compare signatures in constant time.
  • Use separate Merchant No and Secret Key per environment; never mix staging credentials with the production base URL.
  • OrderId must be unique per transaction (status 22 duplicate, 13 already paid).
  • Treat N and W as not final; requery, do not fail the order early.
  • Make return-URL handling idempotent; duplicate posts and enquiry results must not double-fulfil.
  • Where the docs are ambiguous (listed in references/cardbizpay-api.md under Doc Defects), confirm with CardBizPay in staging before going live.

Completion Criteria

A CardBizPay integration is done only when:

  1. Payment requests are built and signed server-side with the documented field order and all optional parameters present.
  2. The Payment Return URL (and Notify URL for Open Payment API) is registered with CardBizPay for each environment.
  3. The return handler verifies Signature over the documented response field order, with empty optional fields skipped.
  4. Settlement checks RespCode, StatusCode, MerchantNo, OrderId, TrxnAmount, and stores TrxnId.
  5. PymtEnq requery covers missing or non-final results; void and refund use stored TrxnId and the original amount string.
  6. Tests cover bad signature, wrong amount, wrong order, duplicate post, declined (D), pending (N/W), and approved (A), plus the official signature test vector.
  7. Deployment docs list CARDBIZPAY_MERCHANT_NO, CARDBIZPAY_SECRET_KEY, CARDBIZPAY_BASE_URL, and the registered return URL per environment.

Loophole Review Loop

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

  1. List trust boundaries: browser form post, CardBizPay payment page, Payment Return URL handler, Notify URL handler, enquiry calls, database, fulfilment, void/refund jobs, Merchant Portal settings.
  2. Check bypasses: forged return post, signature over wrong field order, amount reformatted before hashing, empty optional field wrongly included, staging key in production, reused OrderId, stale enquiry, duplicate post, pending N/W treated as failed, void after the same-day window, refund over the remaining amount, token used with the wrong CustId.
  3. Add fixes: server-side signing, strict field-order tables, constant-time compare, local pending order first, PymtEnq fallback, idempotent state transitions, per-environment config, unique RefundId and RequestId.
  4. Re-read the relevant sections of references/cardbizpay-api.md or references/cardbizpay-opa.md.
  5. State remaining uncertainty: whether the return post is browser or server-to-server, enquiry response format, Transaction List encoding, profile-level API enablement, subscribed methods, and pricing. These are not settled by public docs.

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 Cardbizpay AI skill do?

Set up, build, debug, review, and explain CardBizPay payment integrations using official CardBizPay developer docs, Merchant API hosted payment page (Payment/Pymt), Payment Return URL callbacks, HMAC-SHA512 base64 signatures, payment enquiry, void, refund, refund enquiry, MDR enquiry, Open Payment API card tokenization (AddCard, RemoveCard, Sale, PreAuth, Capture, PreAuthCancel, Void, Refund, TrxnEnq), staging/production setup, Merchant No, Access Key, Secret Key, and status codes. Use when working with CardBizPay or Cardbiz Payment Services, FPX B2C/B2B, DuitNow, cards, e-wallets, saved ca...

Why use Setup Cardbizpay on TypingMind?

Because you install it once and use it with any model. Setup Cardbizpay 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 Cardbizpay in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-cardbizpay. 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 Cardbizpay?

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 Cardbizpay?

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

Is the Setup Cardbizpay 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 👇