Setup Senangpay logo

Setup Senangpay

Community
afu-it
setup-senangpay

Set up, build, debug, review, and explain senangPay payment integrations using official senangPay guide pages, Manual Integration API, Direct API, callbacks, return URLs, query status APIs, refund API, sandbox/live setup, Merchant ID, Secret Key, Hash Type, shopping cart plugins, e-commerce integrations, recurring payments, payout API, tokenisation, split settlements, and DOKU migration references. Use when working with senangPay hosted checkout, payment forms, callbacks, SHA256/MD5 hash verification, Direct API client sessions, JavaScript Web SDK, FPX bank lists, refunds, package capabilities, sandbox testing, or senangPay dashboard setup.

Overview

Publisherafu-it
Repositorymalaysia-payment-gateway
Skill namesetup-senangpay
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 Senangpay 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-senangpay
  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-senangpay .claude/skills/setup-senangpay
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

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

SenangPay

Use this skill for senangPay payment gateway integration work.

Source

Read references/senangpay-api.md before giving factual API guidance or writing integration code. It contains source URLs, integration surfaces, environment URLs, endpoint roles, parameter rules, hash formulas, callback behavior, query APIs, Direct API, FPX bank list, refund API, and settlement/security cautions.

Read references/account-setup.md when user asks how to register, which credentials are needed, where keys come from, sandbox setup, dashboard setup, package capabilities, pricing, support, or migration context.

Read references/source-map.md when choosing which senangPay guide page applies to hosted checkout, Direct API, plugins, callbacks, query APIs, refunds, recurring, tokenisation, split settlement, payout, sandbox, or migration.

Core Workflow

  1. Identify environment: sandbox or production.
  2. Identify integration surface: hosted/manual payment form, shopping cart plugin, e-commerce platform integration, Direct API, recurring payment, refund API, payout API, tokenisation, or split settlement.
  3. Confirm credentials and dashboard setup: Merchant ID, Secret Key, Hash Type, Return URL, and Callback URL.
  4. Create a local pending payment before sending the customer to senangPay.
  5. Generate request hash server-side using the correct formula and account Hash Type.
  6. Redirect to hosted checkout or create a Direct API client session server-side.
  7. Treat Return URL as browser UX only; do not fulfil from return alone.
  8. Verify callback/return hash server-side, requery order or transaction status when needed, then settle only after amount, order ID, status, merchant, environment, and provider transaction reference match.
  9. Make settlement idempotent because senangPay can send multiple callbacks and later callbacks can supersede earlier statuses.

Core Facts

  • Production hosted checkout URL: https://app.senangpay.my/payment/{merchant_id}.
  • Sandbox hosted checkout URL: https://sandbox.senangpay.my/payment/{merchant_id}.
  • Hosted/manual checkout accepts GET or POST parameters.
  • Hosted/manual checkout amount uses two decimal places, for example 25.50.
  • Direct API amount uses cents, for example 200 means RM 2.00.
  • Manual request hash source sequence: {secret_key}{detail}{amount}{order_id}.
  • Return/callback status values: 1 successful, 0 failed, 2 pending authorization.
  • Return/callback verification source sequence: {secret_key}{status_id}{order_id}{transaction_id}{msg}.
  • Query order status endpoint: GET https://app.senangpay.my/apiv1/query_order_status.
  • Query transaction status endpoint: GET https://app.senangpay.my/apiv1/query_transaction_status.
  • Direct API endpoints: POST https://api.senangpay.my/payment/v3 and POST https://api.sandbox.senangpay.my/payment/v3.
  • Direct API requires Enterprise package, authorised merchant access, and outgoing server IP whitelisting.
  • Merchant ID and Secret Key are in Dashboard > Settings > Profile > Shopping Cart Integration Link.
  • SHA256 is recommended. MD5 is legacy/deprecated and should only be used for systems that explicitly require it.
  • Callback URL uses HTTP POST and must output exactly OK without HTML tags for successful receipt.

Critical Rules

  • Keep Secret Key and private hash inputs server-side only.
  • Do not mark paid from Return URL, frontend event, SDK response, or browser redirect alone.
  • Prefer SHA256/HMAC-SHA256 and avoid MD5 unless supporting an explicit legacy integration.
  • Always verify hash with the exact sequence documented for the active flow.
  • Verify local order, expected amount, status, transaction ID/reference, merchant ID, and environment before marking paid.
  • Log callback events durably and make processing idempotent before returning OK.
  • Expect duplicate callbacks for the same transaction.
  • Expect pending or failed callbacks before a later successful callback; latest callback can be the most up-to-date status.
  • Avoid callback redirects and session-dependent callback handlers.
  • Separate sandbox and production credentials, URLs, callback URLs, Return URLs, and dashboard settings.
  • For Direct API, never expose Secret Key in browser JavaScript and remember UUID is valid for only 60 seconds.
  • For refund API, store local refund attempts and do not retry blindly after duplicate, partial-refund, refund-window, or amount-exceeded errors.
  • If package capability, payment method availability, settlement timing, current pricing, IP whitelisting, migration behavior, or dashboard state matters, verify live senangPay dashboard/docs/support before claiming certainty.

Loophole Review Loop

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

  1. List trust boundaries: browser Return URL, backend checkout creator, senangPay hosted checkout, Direct API session endpoint, JavaScript SDK, callback receiver, query APIs, database, fulfilment job, refund job, dashboard settings, and package/channel activation.
  2. Check bypasses: fake success return, forged callback, wrong hash type, wrong hash sequence, wrong amount format, wrong order ID, wrong merchant ID, sandbox/live mix, duplicate callback, failed callback followed by success, pending marked paid, stale Direct API UUID, Direct API Secret Key leak, unwhitelisted Direct API server IP, inactive FPX bank, duplicate refund request, partial refund unsupported, and refund after 180-day window.
  3. Add fixes: server-side local pending payment, server-side hash generation, callback hash verification, status requery, strict amount/status/order checks, idempotency keys, callback event log, exact OK response after durable recording, environment-separated config, bank status filtering, package capability checks, and refund idempotency.
  4. Re-read references/senangpay-api.md sections relevant to any gap.
  5. State remaining uncertainty if it depends on current package, channel enablement, pricing, dashboard configuration, DOKU migration state, or senangPay support approval.

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

Set up, build, debug, review, and explain senangPay payment integrations using official senangPay guide pages, Manual Integration API, Direct API, callbacks, return URLs, query status APIs, refund API, sandbox/live setup, Merchant ID, Secret Key, Hash Type, shopping cart plugins, e-commerce integrations, recurring payments, payout API, tokenisation, split settlements, and DOKU migration references. Use when working with senangPay hosted checkout, payment forms, callbacks, SHA256/MD5 hash verification, Direct API client sessions, JavaScript Web SDK, FPX bank lists, refunds, package capabilit...

Why use Setup Senangpay on TypingMind?

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

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

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

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

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