Setup Atome logo

Setup Atome

Community
afu-it
setup-atome

Set up, build, debug, review, and explain Atome Buy Now Pay Later (BNPL) payment integrations using official Atome Open API v2 docs, HTTP Basic auth, create payment, redirectUrl and appPaymentUrl checkout, server-to-server callbacks, X-Signature HMAC-SHA256 callback verification, Get Payment Information requery, cancel, full and partial refunds, payment states, MYR sen amounts and minimums, test vs production endpoints, IP allowlisting, plugins, and mobile SDKs. Use when working with Atome Malaysia, apaylater, BNPL instalment checkout, Atome callbacks, Atome refunds, or production readiness.

Overview

Publisherafu-it
Repositorymalaysia-payment-gateway
Skill namesetup-atome
Stars
74
Forks
11
Bundled files
5
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.

  • 5 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 Atome 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-atome
  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-atome .claude/skills/setup-atome
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

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

Atome BNPL Payment Gateway

Use this skill for Atome (apaylater) online BNPL integration work.

Source

Read references/atome-api.md before giving factual API guidance or writing integration code. It contains the endpoint catalogue, base URLs, Basic auth, the 10-step checkout flow, full create payment and nested field tables, payment object and states, requery, cancel, refund, callback fields, X-Signature HMAC-SHA256, IP allowlist, amount rules, enums, the full error code table, and test notes.

Read references/atome-plugins-sdk.md when the merchant uses Shopify, WooCommerce, Magento, PrestaShop, OpenCart, EasyStore, Wix, or Salesforce, or opens appPaymentUrl from an iOS, Android, React Native, or Flutter app.

Read references/account-setup.md when the user asks how to register, where credentials come from, test vs production setup, env var names, plugins, Malaysia specifics, pricing, or settlement.

Read references/source-map.md when choosing which official Atome page applies, or to see the list of gaps that only the Atome Account Manager can answer.

Core Workflow

  1. Identify environment: test (api.apaylater.net) or production (api.apaylater.com).
  2. Identify surface: native API (web redirect or app appPaymentUrl) or a platform plugin (Shopify, WooCommerce, Magento, PrestaShop, OpenCart, EasyStore, Wix, Salesforce).
  3. Confirm credentials from the Atome Account Manager: API username, API password, and callback signing secret plus its encoding.
  4. Run POST /auth once with countryCode: "MY" and the callback URL to prove credentials and callback reachability.
  5. Create a local pending payment, then POST /payments server-side with a unique referenceId, MYR amount in sen, callbackUrl, paymentResultUrl, paymentCancelUrl, customerInfo.mobileNumber, shippingAddress, and items.
  6. Send the customer to redirectUrl (browser) or appPaymentUrl (in-app via SDK).
  7. Treat paymentResultUrl and paymentCancelUrl as browser UX only.
  8. On callback, verify X-Signature over the raw body, read referenceId, then call GET /payments/{referenceId}.
  9. Settle idempotently only when the fetched status is PAID and referenceId, amount, currency, and environment match.
  10. Call cancel when your own checkout hold expires; refund with a unique refundId.

Core Facts

  • Test base: https://api.apaylater.net/v2. Production base: https://api.apaylater.com/v2. TLS 1.2+.
  • Auth: Authorization: Basic base64(username:password), issued by the Atome Account Manager.
  • Endpoints: POST /auth, POST /payments, GET /payments/{referenceId}, POST /payments/{referenceId}/cancel, POST /payments/{referenceId}/refund.
  • POST /payments is idempotent by referenceId ([0-9a-zA-Z-_]{1,40}).
  • Amounts are integers in the smallest unit; MYR is sen. MYR minimum is RM10.00 (1000). Max is not documented.
  • Required create fields: currency, amount, callbackUrl, paymentResultUrl, customerInfo (with mobileNumber in E.164), shippingAddress (countryCode, lines, postCode), items (itemId, name, quantity, price).
  • Unpaid payments auto-cancel after 12 hours (default and max). expirationTime can shorten it, minimum 300 seconds.
  • Statuses: PROCESSING, PAID, FAILED, CANCELLED, REFUNDED.
  • PAID means the first instalment was received; it stays PAID if the shopper misses later instalments.
  • Partial refund keeps PAID; full refund becomes REFUNDED. Refunds are synchronous and idempotent by refundId.
  • Callback body is only {"referenceId": "..."}; Atome retries 5 times in 5 hours, then emails the merchant.
  • Callbacks are signed with HMAC-SHA256 over the raw body in the X-Signature header with a shared secret; encoding and secret come from the Account Manager.
  • Malaysia callback source IPs: 47.254.230.20, 47.254.238.153; test 47.254.247.54.
  • In Malaysia, shoppers pay in the Atome app (developer portal FAQ lists MY as app only).

Critical Rules

  • Keep the API password and callback secret server-side only.
  • Never mark paid from paymentResultUrl, the app return, or the callback body. Always settle from GET /payments/{referenceId}.
  • Verify X-Signature against the raw request bytes before parsing JSON; use constant-time comparison. Do not guess hex vs Base64; confirm with Atome.
  • Store referenceId, expected amount (sen), currency, environment, and local order id before redirecting.
  • Reuse the same referenceId when retrying a create after a timeout or 5xx; generate a new one only for a genuinely new attempt.
  • Return HTTP 200 to callbacks after durable recording; make processing idempotent across the 5 retries.
  • If your checkout reserves stock or a booking for less than 12 hours, call cancel when the hold expires. If cancel returns PAYMENT_NOT_CANCELLABLE, requery and fulfil or refund.
  • Never send decimal amounts; 12.34 is invalid, send 1234.
  • Branch on error code, never on message.
  • Do not mix test credentials with the production base URL, or the reverse.
  • Do not reverse an order because a shopper missed a later instalment.

Completion Criteria

An Atome integration is done only when:

  1. POST /auth succeeds for the target environment with countryCode: "MY".
  2. POST /payments runs server-side with Basic auth, a stored unique referenceId, and amount in sen at or above RM10.00.
  3. The browser redirect only shows a "confirming" page and triggers a server requery; it never fulfils.
  4. The callback handler verifies X-Signature (with the confirmed encoding), requeries, and settles idempotently.
  5. Settlement checks status PAID, referenceId, amount, currency, environment, and local order ownership.
  6. Cancel is wired to local checkout expiry; refunds send a unique refundId and handle AMOUNT_NOT_VALID and UNABLE_TO_REFUND.
  7. Tests cover invalid signature, duplicate callback, callback for unknown referenceId, FAILED, CANCELLED, partial refund (stays PAID), full refund (REFUNDED), and successful PAID.
  8. Deployment docs list ATOME_BASE_URL, ATOME_API_USERNAME, ATOME_API_PASSWORD, ATOME_CALLBACK_SECRET, callback URL, result and cancel URLs, and test/production separation.

Loophole Review Loop

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

  1. List trust boundaries: browser, merchant app webview, backend payment creator, Atome API, Atome app, callback receiver, raw-body parser, database, fulfilment job, refund job, cancel job, and plugin settings.
  2. Check bypasses: fake paymentResultUrl hit, forged callback, signature over parsed JSON, wrong secret or encoding, test/production mix, decimal amount, amount below RM10.00, reused referenceId across orders, stale requery, duplicate callback, payment completed after local hold expired without cancel, duplicate refund without refundId, refund above refundableAmount, inactive Atome account blocking refund, and firewall blocking Atome IPs.
  3. Add fixes: server-side create, local pending record first, raw-body HMAC check, mandatory requery, strict amount/currency/reference match, idempotent settlement keyed on referenceId, cancel on expiry, refundId idempotency, separate env config, IP allowlist, and /auth connectivity test.
  4. Re-read references/atome-api.md sections relevant to any gap.
  5. State remaining uncertainty if it depends on the callback secret encoding, maximum amount, MDR, settlement schedule, rate limits, test shopper accounts, or merchant contract terms.

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

Set up, build, debug, review, and explain Atome Buy Now Pay Later (BNPL) payment integrations using official Atome Open API v2 docs, HTTP Basic auth, create payment, redirectUrl and appPaymentUrl checkout, server-to-server callbacks, X-Signature HMAC-SHA256 callback verification, Get Payment Information requery, cancel, full and partial refunds, payment states, MYR sen amounts and minimums, test vs production endpoints, IP allowlisting, plugins, and mobile SDKs. Use when working with Atome Malaysia, apaylater, BNPL instalment checkout, Atome callbacks, Atome refunds, or production readiness.

Why use Setup Atome on TypingMind?

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

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

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

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

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