Logotipo de Setup Setel

Setup Setel

Comunidad
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.

Descripción general

Editorafu-it
Repositoriomalaysia-payment-gateway
Nombre de la habilidadsetup-setel
Estrellas
74
Forks
11
Archivos incluidos
6
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 6 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por afu-it en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Setup Setel en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-setel
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Setup Setel en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Setup Setel automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Setup Setel no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA 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...

¿Por qué usar Setup Setel en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Setup Setel está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Setup Setel en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-setel. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Setup Setel?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Setup Setel?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Setup Setel con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Setup Setel?

afu-it la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇