Logo van Setup Paycools

Setup Paycools

Community
afu-it
setup-paycools

Richt PayCools-betaalintegraties in, bouw ze, debug ze, review ze en leg ze uit met de officiële PayCools Malaysia Open API-documentatie, WebPay hosted checkout, dynamische DuitNow QR, betaalmeldingen, RSA SHA256withRSA-handtekeningen over de param string, uitwisseling van appId en RSA-sleutels, opnieuw opvragen van de orderstatus, terugbetalingen, meldingen van terugbetalingen, uitbetalingen/disbursement, accountvalidatie, saldo opvragen, channel codes en response codes. Gebruik deze skill voor werkzaamheden met PayCools (Micro Bluetech Sdn Bhd), FPX, DuitNow QR, online bankieren via DuitNow RPP, Touch 'n Go, Boost, GrabPay, MCash, kaarten, uitbetalingen naar Maleisische banken of e-wallets, callback-verificatie, idempotente afwikkeling of voorbereiding op productie.

Add to TypingMind

Overzicht

Uitgeverafu-it
Repositorymalaysia-payment-gateway
Skillnaamsetup-paycools
Sterren
74
Forks
11
Meegeleverde bestanden
4
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 4

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door afu-it op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Setup Paycools in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-paycools
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

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-paycools .claude/skills/setup-paycools
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Setup Paycools in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Setup Paycools automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Setup Paycools niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

PayCools Payment Gateway

Use this skill for PayCools (Malaysia) Open API integration work.

Source

Read references/paycools-api.md before giving factual API guidance or writing integration code. It contains the endpoint catalogue, the request envelope, the RSA signature method (verified against the docs' own example), every request/response/notification field table, channel codes, status enums, response codes, and documented gaps and inconsistencies.

Read references/account-setup.md when the user asks how to become a merchant, what credentials exist, how the RSA key exchange works, env var names, sandbox/UAT, channel activation, pricing, or settlement.

Read references/source-map.md when choosing which official PayCools docs page applies, or to check coverage.

Core Workflow

  1. Get from PayCools: appId, the API base URL (not published in the docs), UAT/sandbox details if any, and the PayCools platform RSA public key.
  2. Generate a 4096-bit RSA key pair; send the public key to PayCools; keep the private key server-side.
  3. Create a local pending payment with a unique alphanumeric mchOrderId (max 32) and the expected amount in cents.
  4. Build the business param object, serialize it to a JSON string once, sign that exact string with SHA256withRSA, and POST {appId, sign, param} as JSON.
  5. WebPay: call POST /open-api/webpay/generate with a channelCode, redirect the customer to data.payUrl. DuitNow QR: call POST /open-api/qr/generate and render data.qrCodeContent.
  6. Treat redirectUrl as browser UX only.
  7. On the merchant notifyUrl, verify sign over the received param string with the PayCools public key before parsing param.
  8. Settle idempotently only when transactionStatus is COMPLETED and mchOrderId, transactionId, amount, and channelCode match the local record. Reply {"code":10000,"message":"Success"}.
  9. Requery with POST /open-api/webpay/detail or POST /open-api/qr/detail when a notification is missing or the order is still pending.
  10. Refunds use POST /open-api/payment/refund with the PayCools originalTransactionId; settle refunds from the verified refund notification or POST /open-api/refund/payments.

Core Facts

  • Every merchant-to-PayCools call is POST, Content-Type: application/json, body {"appId","sign","param"}.
  • param is a JSON-serialized string; sign is Base64 of SHA256withRSA (RSASSA-PKCS1-v1_5) over the exact param bytes, signed with the merchant private key (PKCS#8).
  • PayCools-to-merchant notifications are {"sign","param"}, signed with the PayCools private key; verify with the PayCools public key (X.509 SubjectPublicKeyInfo), which the merchant must request from PayCools.
  • RSA key length must be 4096.
  • Response envelope: {code, message, data}; 10000 means success. Codes 21000 to 21016 are errors (sign, param, appId, duplicate order id, timestamp, IP forbidden, and others).
  • Amounts are integers in cents (sen) for WebPay, QR, refund, and payout.
  • Every param carries timestamp (current time, documented as milliseconds on several pages).
  • WebPay create requires timestamp, channelCode, mchOrderId, amount, notifyUrl, redirectUrl, customerName, email, mobile; optional remark, expireSeconds (30 to 3600, default 3600).
  • Transaction status values: PENDING, COMPLETED, FAILED.
  • WebPay notification events: order.payment.success, order.payment.failed. QR events: qrcode.payment.success, qrcode.payment.failed.
  • Refund status enum: PENDING, PROCESS, COMPLETED, FAILED, CANCELLED (examples also show COMPLETE). Transaction fees are not returned on refunds.
  • WebPay channel codes include FPX_*_URL, RPP_*_URL, TOUCHNGO_URL, BOOST_URL, GRPY_URL, MCASH_URL, CARD_URL. QR channel: DUITNOW_DYNAMIC_QR.
  • API base URL, sandbox host, callback retry policy, and PayCools egress IPs are not documented publicly (checked 2026-10-21).

Critical Rules

  • Keep the merchant RSA private key server-side only. Never use the example key pair printed in the docs.
  • Sign the exact string you send as param; do not re-serialize after signing.
  • Verify notifications over the param string value as received (after decoding the outer JSON), never over a re-serialized object.
  • Use a constant-time-safe library verify call; reject on any verify failure or missing sign.
  • Do not mark paid from redirectUrl, payUrl creation, QR display, or a PENDING status.
  • Check amount (cents), mchOrderId, transactionId, and channelCode against the local record before settling.
  • Make notification handling idempotent; duplicate or late notifications must not double-fulfil.
  • mchOrderId must be unique (21007 on duplicate); payouts also need a unique idempotencyId (21015).
  • Send notifyUrl in WebPay create (the docs' example shows callbackUrl; the field table says notifyUrl). Confirm with PayCools.
  • Expect IP restrictions (21016 Merchant ip forbidden); ask PayCools to allowlist your server egress IPs.
  • Confirm base URL, UAT environment, enabled channels, and pricing with PayCools before claiming production readiness.

Completion Criteria

A PayCools integration is done only when:

  1. All Open API calls run server-side with appId and a SHA256withRSA signature over the exact param string.
  2. The local payment record exists before WebPay or QR creation and stores mchOrderId, transactionId, amount in cents, and channelCode.
  3. Redirect returns only show status; fulfilment waits for a verified notification or a requery showing COMPLETED.
  4. The notification handler verifies sign with the PayCools public key, parses param after verification, settles idempotently, and replies {"code":10000,"message":"Success"}.
  5. Requery via the detail endpoint covers missing notifications and pending orders.
  6. Tests cover invalid signature, tampered param, duplicate notification, wrong amount, wrong mchOrderId, FAILED, expired order, and successful COMPLETED.
  7. Deployment docs list PAYCOOLS_APP_ID, PAYCOOLS_PRIVATE_KEY, PAYCOOLS_PLATFORM_PUBLIC_KEY, PAYCOOLS_API_BASE_URL, the notify URL, redirect URL, and UAT/live separation.

Loophole Review Loop

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

  1. List trust boundaries: browser redirect, payUrl page, QR display, backend order creator, PayCools API, notification receiver, JSON parser, database, fulfilment job, refund job, payout job, and key storage.
  2. Check bypasses: fake redirect, forged notification, signature checked over re-serialized JSON, wrong public key (merchant key instead of PayCools key), UAT/live key mix, wrong amount unit (ringgit vs cents), reused mchOrderId, stale PENDING requery, duplicate notification, refund status COMPLETE vs COMPLETED mismatch, timestamp unit mismatch, IP not allowlisted, and duplicate payout without idempotencyId.
  3. Add fixes: server-side signing, local pending record first, verify-then-parse, strict amount/order/channel checks, durable event log, unique constraints, separate env config, requery fallback, and tolerant refund status mapping.
  4. Re-read references/paycools-api.md sections relevant to any gap.
  5. State remaining uncertainty where it depends on undocumented items: base URL, UAT host, retry policy, notification source IPs, timestamp unit, and channel activation for the merchant account.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Setup Paycools?

Richt PayCools-betaalintegraties in, bouw ze, debug ze, review ze en leg ze uit met de officiële PayCools Malaysia Open API-documentatie, WebPay hosted checkout, dynamische DuitNow QR, betaalmeldingen, RSA SHA256withRSA-handtekeningen over de param string, uitwisseling van appId en RSA-sleutels, opnieuw opvragen van de orderstatus, terugbetalingen, meldingen van terugbetalingen, uitbetalingen/disbursement, accountvalidatie, saldo opvragen, channel codes en response codes. Gebruik deze skill voor werkzaamheden met PayCools (Micro Bluetech Sdn Bhd), FPX, DuitNow QR, online bankieren via DuitN...

Waarom Setup Paycools gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Setup Paycools bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Setup Paycools in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-paycools. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Setup Paycools gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Setup Paycools gebruiken?

Zoveel als je wilt. Je kunt Setup Paycools gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Setup Paycools gratis?

Deze skill is door afu-it op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇