Logo vun Setup Setel

Setup Setel

Communautéit
afu-it
setup-setel

Set up, build, debug, review, and explain Setel payment integrations using official Setel developer docs, Pay with Setel online checkout sessions, payment intents, direct capture or hold-and-capture, webhook signature verification (HMAC-SHA256 keyed with SHA-256 of x-api-secret), session requery, refunds, cancellations, Pay with Setel code scan wallet transactions, SSO, Mesra loyalty, settlement reports (Setel Dashboard, SFTP, manual settlement API), and sandbox/production setup. Use when working with Setel, Pay with Setel, Setel Wallet, Setel CardTerus, Setel Checkout, Setel x-api-key/x-api-secret, Setel webhooks, Setel settlement files (MPF), or production readiness for a Setel merchant integration.

Iwwersiicht

Editeurafu-it
Repositorymalaysia-payment-gateway
Skill-Nummsetup-setel
Stären
74
Forks
11
Matgeliwwert Fichieren
6
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 6 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum afu-it op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Setup Setel an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-setel
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-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-setel .claude/skills/setup-setel
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Setup Setel an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Setup Setel automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Setup Setel net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Setel Payment Gateway

Use this skill for Setel (Setel Ventures Sdn Bhd) merchant payment integration work. The main online product is "Pay with Setel online": a checkout session that sends the customer to Setel Checkout or the Setel app, where they pay with Setel Wallet or Setel CardTerus.

Source

Read references/setel-api.md before giving factual API guidance or writing integration code. It holds environments, auth headers, the endpoint catalogue, checkout session and payment intent field tables, statuses, the webhook payload and signature algorithm, refunds, cancellation, capture, error codes and known documentation inconsistencies.

Read references/setel-other-apis.md for Pay with Setel code scan (wallet transactions), SSO/OAuth, user accounts, user payment methods, Mesra loyalty, external orders, automated parking and EV charging APIs.

Read references/setel-settlement.md for settlement reports (Setel Dashboard, SFTP), the MPF file format, and the manual settlement API.

Read references/account-setup.md for onboarding, credentials, dashboard, sandbox vs production, env var names and commercial contact.

Read references/source-map.md to pick the right official page and to see docs coverage.

Core Workflow

  1. Confirm the merchant has been onboarded by Setel and holds x-api-key, x-api-secret and merchantId for the right environment.
  2. Pick the surface: online checkout session (web/mobile), code scan wallet transaction (in-person), or a partner flow (SSO, loyalty, parking, EV).
  3. Create a local pending order with a unique referenceId before calling Setel.
  4. Decide capture mode: capture: true (direct) or capture: false (hold, then capture within 30 minutes).
  5. Call POST /v1/checkout/sessions server-side with x-api-key and x-api-secret, amount (string, MYR), currency: "MYR", redirect.successUrl / redirect.cancelUrl, and webhook.url.
  6. Send the customer to the returned checkout URL (PC: Setel Checkout page; mobile: redirect link, checkout URL, or app deep link). Log the real response field names in sandbox.
  7. Treat successUrl as browser UX only. Do not fulfil from the redirect.
  8. On webhook, recompute the signature header: HMAC-SHA256 keyed with hex SHA-256 of x-api-secret, over the documented field concatenation. Constant-time compare.
  9. Confirm with GET /v1/checkout/sessions/{session id} (or GET /v1/payments/payment-intents/{id}) and settle idempotently only when paymentIntentStatus is succeeded and amount, currency, referenceId and session id match.
  10. If a held payment is final, capture with POST /v1/payments/payment-intents/{id}/capture (never above the authorised amount) or cancel it.
  11. Requery sessions that have no webhook after a timeout; Setel says webhooks may be lost or sent more than once.

Core Facts

  • Sandbox base URL: http://api-pre-prod.setel.com (System environment page, last updated 18 Nov 2024). Production: https://api.setel.com.
  • Partner auth: headers x-api-key and x-api-secret on every request; Content-Type: application/json. Keys are backend-only.
  • Create session: POST /v1/checkout/sessions. Required body fields: amount, currency, redirect.
  • Retrieve session: GET /v1/checkout/sessions/{id}. Cancel: PATCH /v1/checkout/sessions/{id}/cancel.
  • Payment intents: GET /v1/payments/payment-intents/{id}, POST .../{id}/capture, POST .../{id}/cancel, POST .../{id}/refund.
  • amount is a string in ringgit (examples use "10"); only MYR is supported.
  • capture defaults to true. Held (authorised) payments expire after 30 minutes.
  • Payment intent statuses: requires_payment_method, requires_action (not supported yet), authorised, processing, failed, succeeded, cancelled, expired, partially_refunded, refunded.
  • Webhook is set per session via webhook.url; the header is signature; the body has id, createdAt, updatedAt, apiKey, paymentIntentId, paymentIntentStatus, amount, referenceId.
  • Signature: secretHash = sha256_hex(x-api-secret); data = id+createdAt+updatedAt+apiKey+paymentIntentId+paymentIntentStatus+amount+referenceId (missing field = empty string); signature = hmac_sha256_hex(key=secretHash, data).
  • Online payment methods: Setel Wallet and Setel CardTerus. Code scan supports Setel Wallet only and has no webhook.
  • Duplicate referenceId returns 400 REFERENCE_ID_EXISTED (9300101).
  • Refunds draw from the merchant available balance (not pending balance); partial refunds are allowed until refundedAmount equals amount.
  • Settlement reports are generated daily at 01:00 GMT+8 and cover 00:00 to 23:59 of the previous day.

Critical Rules

  • Keep x-api-key and x-api-secret server-side; never ship them to a browser or mobile bundle, never commit them.
  • Always send a unique referenceId per checkout attempt; Setel warns this prevents multiple payments and enables reconciliation.
  • Verify the webhook signature before trusting the body, and still requery the session or payment intent before fulfilment.
  • Build the signature string from the exact received string values; do not reformat timestamps or amounts.
  • Handle out-of-order and duplicate webhooks: compare updatedAt and keep the latest; make settlement idempotent on session id and paymentIntentId.
  • Do not treat processing or authorised as paid. Only succeeded (or later refund states) means funds were collected.
  • For capture: false, capture or cancel within 30 minutes, or the intent becomes expired.
  • Third-party acquirers must send subMerchant (name, reference, merchantCategoryCode, state).
  • Treat field-name and method inconsistencies listed in references/setel-api.md as items to confirm in sandbox, not as settled facts.
  • Do not quote fees; Setel does not publish merchant rates.

Completion Criteria

A Setel integration is done only when:

  1. Checkout sessions are created server-side with both auth headers and a unique referenceId.
  2. The redirect page only shows status; fulfilment comes from a verified webhook plus a session/payment intent requery.
  3. Webhook handler recomputes signature with the documented algorithm and passes the published test vector.
  4. Settlement checks session id, paymentIntentId, referenceId, amount, currency MYR, status succeeded, and environment.
  5. Duplicate and out-of-order webhooks, lost webhooks (requery job), and expired holds are handled idempotently.
  6. Refund, cancel and capture paths are guarded against double execution and over-amount.
  7. Tests cover bad signature, duplicate webhook, wrong amount/reference, failed/expired/cancelled, and succeeded.
  8. Deployment docs list SETEL_API_KEY, SETEL_API_SECRET, SETEL_MERCHANT_ID, SETEL_BASE_URL, success/cancel URLs and webhook URL per environment.

Loophole Review Loop

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

  1. List trust boundaries: browser redirect, Setel Checkout page, Setel app deep link, backend session creator, Setel API, webhook receiver, database, fulfilment job, capture/cancel/refund jobs, settlement report import.
  2. Check bypasses: fake success redirect, forged webhook, signature built from re-serialised JSON, wrong secret or environment, reused referenceId, amount mismatch, processing treated as paid, duplicate or stale webhook overriding a newer state, lost webhook, hold expiring before capture, capture above authorised amount, refund failing on low available balance, duplicate refund.
  3. Add fixes: server-side session creation, local pending order first, documented HMAC check with constant-time compare, requery before settle, updatedAt ordering, idempotency keys, capture deadline job, refund guard, environment-separated config.
  4. Re-read the relevant section of references/setel-api.md.
  5. State remaining uncertainty: exact checkout URL field names, retrieve-by-referenceId method, webhook retry schedule, webhook source IPs, rate limits, sandbox test accounts, sandbox scheme (http vs https), and commercial terms. These are not documented and must be confirmed with Setel.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Setup Setel?

Set up, build, debug, review, and explain Setel payment integrations using official Setel developer docs, Pay with Setel online checkout sessions, payment intents, direct capture or hold-and-capture, webhook signature verification (HMAC-SHA256 keyed with SHA-256 of x-api-secret), session requery, refunds, cancellations, Pay with Setel code scan wallet transactions, SSO, Mesra loyalty, settlement reports (Setel Dashboard, SFTP, manual settlement API), and sandbox/production setup. Use when working with Setel, Pay with Setel, Setel Wallet, Setel CardTerus, Setel Checkout, Setel x-api-key/x-ap...

Firwat Setup Setel op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Setup Setel besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Setup Setel an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-setel an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Setup Setel benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Setup Setel benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Setup Setel domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Setup Setel gratis?

De Skill gëtt vum afu-it op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇