Malaysia Payment Gateway logo

Malaysia Payment Gateway

Community
afu-it
malaysia-payment-gateway

Build, debug, review, and explain Malaysia payment gateway integrations. Use when implementing checkout, payment links, hosted payment pages, redirects, callbacks, webhooks, HMAC/signature verification, idempotent settlement, paid-access unlocking, refunds, reconciliation, sandbox/live setup, or provider switching for Malaysian gateways such as CHIP Collect, Curlec/Razorpay, Xendit Malaysia, Bayarcash, BCL Pay, toyyibPay, Billplz, FPX, DuitNow QR, cards, or e-wallets.

Overview

Publisherafu-it
Repositorymalaysia-payment-gateway
Skill namemalaysia-payment-gateway
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 Malaysia Payment Gateway 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/malaysia-payment-gateway
  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/malaysia-payment-gateway .claude/skills/malaysia-payment-gateway
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Malaysia Payment Gateway 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 Malaysia Payment Gateway 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 Malaysia Payment Gateway 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.

Malaysia Payment Gateway

Use this skill to add production-grade payment collection to an app, not only to make a checkout button. Treat payment as a state machine: local intent first, gateway session second, verified server-side settlement last.

Quick Start

  1. Identify provider, product, currency, amount unit, and environment.
  2. Read references/integration-checklist.md.
  3. If provider-specific guidance is needed, read references/provider-patterns.md.
  4. Before marking complete, check references/security-settlement.md.

Implementation Workflow

1. Map Existing App

Find:

  • Auth/session helper.
  • Database access layer.
  • Existing order, invoice, subscription, entitlement, or payment tables.
  • Server route pattern.
  • Environment/secret handling.
  • Test style and deployment target.

Do not start with provider API calls before local payment records and settlement rules are clear.

2. Create Local Payment Intent

Create or reuse a payments table with at least:

  • id
  • user_id or customer id
  • product or order id
  • amount_original
  • discount_amount
  • amount_paid
  • currency
  • provider
  • status
  • gateway_ref
  • gateway_status
  • gateway_payload
  • created_at
  • updated_at
  • paid_at

Use pending before calling the gateway. Store gateway id after session/order/purchase creation. Add a unique index on (provider, gateway_ref) where gateway_ref is not null.

3. Create Checkout Server-Side

Create gateway checkout from a server route. Never expose secret keys. Return only:

  • Hosted checkout URL, or
  • Public key plus gateway order/session id required by browser SDK.

4. Verify Callback/Webhook

Browser redirect is user experience only. Webhook/callback verification must happen server-side with raw body when required.

After verification, fetch current gateway object from provider API when possible. Settle from fetched server-side state, not from client-sent success data alone.

5. Settle Idempotently

Before marking paid, verify:

  • Local payment exists.
  • Provider matches.
  • Gateway reference matches.
  • Status is final paid/captured/succeeded.
  • Amount matches expected amount.
  • Currency is expected, usually MYR.
  • Product/order belongs to local user.
  • Payment is still pending or already paid.

Then update status to paid, set paid_at, unlock entitlement/order fulfillment, and create referral/reward side effects once.

Provider Choice

Use project needs to choose:

  • CHIP Collect: Malaysian checkout, FPX/DuitNow/cards/e-wallets, purchase/webhook flow.
  • Curlec/Razorpay: Orders API plus Checkout.js, FPX/redirect methods, Razorpay-style signatures.
  • Xendit Malaysia: Hosted payment sessions or payment requests, FPX and e-wallet channels.
  • Bayarcash/BCL/toyyibPay/Billplz: Malaysian payment portals/API flows; verify exact docs/live dashboard before schemas.

If latest provider API details, channel availability, fees, dashboard paths, or webhook event names matter, check official current docs before coding.

Completion Criteria

Payment integration is done only when:

  • Checkout can be created from authenticated user flow.
  • Failed/missing config returns clear server error.
  • Webhook/callback rejects invalid signature.
  • Duplicate webhook is harmless.
  • Wrong amount/currency/provider cannot mark paid.
  • Successful sandbox payment marks local payment paid.
  • Fulfillment/access unlock happens from verified server state.
  • Tests cover helpers and settlement edge cases.
  • Deployment docs mention required secrets, webhook URLs, and migrations.

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 Malaysia Payment Gateway AI skill do?

Build, debug, review, and explain Malaysia payment gateway integrations. Use when implementing checkout, payment links, hosted payment pages, redirects, callbacks, webhooks, HMAC/signature verification, idempotent settlement, paid-access unlocking, refunds, reconciliation, sandbox/live setup, or provider switching for Malaysian gateways such as CHIP Collect, Curlec/Razorpay, Xendit Malaysia, Bayarcash, BCL Pay, toyyibPay, Billplz, FPX, DuitNow QR, cards, or e-wallets.

Why use Malaysia Payment Gateway on TypingMind?

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

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

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 Malaysia Payment Gateway?

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

Is the Malaysia Payment Gateway 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 👇