mena-payment-guardian
Skill4 starsChanged 6 months agoMITView on GitHub
Use when building or reviewing Arab/MENA payment or BNPL flows, including Paymob, FawryPay, Geidea, PayTabs, Tap Payments, MyFatoorah, HyperPay, Moyasar, Amazon Payment Services, EasyKash, Kashier, PaySky, Tabby, Tamara, valU, Souhoola, webhooks, signatures, redirects, captures, refunds, or payment secret boundaries.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/egypt-payment-guardian.mdcCursor rule
- .cursor/rules/mena-payment-guardian.mdcCursor rule
- egypt-payment-guardianSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 15 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill for Arab/MENA payment and BNPL integrations where redirects, webhook delivery, signature validation, capture timing, local …
- Distinctive: line 14
Always follow this order:
- Distinctive: line 19
Verify the authenticity signal: HMAC, signature, SecureHash, webhook secret, encrypted webhook payload, static auth header, or documented …
- Very specific: line 23
Add tests or manual QA for duplicate events, invalid signatures, delayed callbacks, stale failures, capture/refund/void misuse, and …
- Distinctive: line 27
Treat all money movement as high risk.
- Distinctive: line 28
Never fulfill from a browser redirect, hosted checkout result, SDK callback, BNPL approval page, or frontend-only status alone.
- Distinctive: line 29
Verify provider signatures, HMACs, SecureHash values, webhook secrets, encrypted payloads, or documented server-side inquiry exactly as …
- Distinctive: line 30
Keep merchant credentials, HMAC secrets, server keys, secret API keys, access codes, terminal secrets, SHA phrases, and service role keys …
- Distinctive: line 34
Do not overwrite a stronger final paid/captured state with older pending, failed, cancelled, expired, rejected, or duplicate signals.
- Distinctive: line 39
Before implementing or reviewing payment code, identify:
- Very specific: line 72
Use references/provider-index.json to check source URLs, coverage depth, readiness, public/gated status, and last verification dates.
- Distinctive: line 76
Use the provider reference first as the public-safe integration checklist.
- Very specific: line 78
Keep Arab/MENA-wide updates in this skill.
- Distinctive: line 79
Do not import Egypt-only endpoint, currency, callback, BNPL, or signature assumptions into regional guidance unless the official MENA …
- Distinctive: line 80
Do not vendor full provider docs, watcher snapshots, screenshots, merchant docs, credentials, signatures, test cards, or dashboard material …
- Very specific: line 94
Prefer server-confirmed activation.
- Distinctive: line 95
Use a payment transaction table plus a payment event table or equivalent durable records.
- Distinctive: line 99
If official docs are unavailable, gated, partial, or country-specific, state that and ask for current merchant docs.
- Distinctive: line 105
When answering a payment implementation or review request, return:
- Very specific: line 112
Test matrix including duplicate events, invalid signature, amount/currency/country mismatch, callback-before-redirect, …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MENA Payment Guardian
Mission
Use this skill for Arab/MENA payment and BNPL integrations where redirects, webhook delivery, signature validation, capture timing, local currencies, and duplicate events can break production. Provider references are source-linked field notes; official provider docs and merchant agreements remain the authority for endpoint-level details.
Decision Path
Always follow this order:
- Identify the provider, country, integration path, payment method, and environment.
- Load the matching provider reference and shared pattern.
- Confirm the server boundary and list secret env var names only.
- Verify the authenticity signal: HMAC, signature, SecureHash, webhook secret, encrypted webhook payload, static auth header, or documented server-side inquiry.
- Compare order reference, provider reference, amount, currency, country/account context, and status.
- Store provider events and provider transaction references idempotently before fulfillment.
- Fulfill only from verified server-side state.
- Add tests or manual QA for duplicate events, invalid signatures, delayed callbacks, stale failures, capture/refund/void misuse, and frontend secret exposure.
Non-Negotiables
- Treat all money movement as high risk.
- Never fulfill from a browser redirect, hosted checkout result, SDK callback, BNPL approval page, or frontend-only status alone.
- Verify provider signatures, HMACs, SecureHash values, webhook secrets, encrypted payloads, or documented server-side inquiry exactly as documented.
- Keep merchant credentials, HMAC secrets, server keys, secret API keys, access codes, terminal secrets, SHA phrases, and service role keys server-side only.
- Compare provider amount, currency, country/account context, local order reference, and provider transaction/reference before creating paid state.
- Make callbacks, webhooks, retries, inquiry responses, capture calls, refunds, voids, and page refreshes idempotent.
- Store provider event/reference uniqueness before activating subscriptions, enrollments, bookings, credits, shipments, or invoices.
- Do not overwrite a stronger final paid/captured state with older pending, failed, cancelled, expired, rejected, or duplicate signals.
- Log safe identifiers only: local order id, provider reference, status, event id, timestamp. Never log tokens, card data, signatures, HMAC secrets, API keys, access codes, SHA phrases, or raw credentials.
Required Audit
Before implementing or reviewing payment code, identify:
- Provider, country/account, integration path, and payment method.
- Sandbox/test vs live environment and any country-specific endpoint.
- Amount unit and currency rules.
- Server endpoint receiving callbacks, webhooks, IPNs, or notification feedback.
- Signature/HMAC/SecureHash/encryption/webhook-secret method and raw-body requirements.
- Unique payment, order, event, authorization, capture, refund, and provider reference fields.
- Status mapping for created, authorized, paid, captured, failed, cancelled, expired, rejected, refunded, voided, released, abandoned, duplicate, and pending.
- Ordering behavior when webhook arrives before or after client redirect.
- What happens on duplicate webhook, retry, refresh, refund, void, capture failure, missing user, missing order, or provider outage.
- Env var names by name only, never values.
Provider References
Load only the provider file needed for the task:
- Paymob:
references/providers/paymob.md - FawryPay:
references/providers/fawrypay.md - Geidea:
references/providers/geidea.md - PayTabs:
references/providers/paytabs.md - Tap Payments:
references/providers/tap-payments.md - MyFatoorah:
references/providers/myfatoorah.md - HyperPay:
references/providers/hyperpay.md - Moyasar:
references/providers/moyasar.md - Amazon Payment Services:
references/providers/amazon-payment-services.md - EasyKash:
references/providers/easykash.md - Kashier:
references/providers/kashier.md - PaySky:
references/providers/paysky.md - Tabby:
references/providers/tabby.md - Tamara:
references/providers/tamara.md - valU and Souhoola through PSPs:
references/providers/valu-souhoola.md
Use references/provider-index.json to check source URLs, coverage depth, readiness, public/gated status, and last verification dates.
Latest Official Docs Access
- Use the provider reference first as the public-safe integration checklist.
- For endpoint-level fields, signatures, status values, payment-method availability, or country/account behavior, check the provider's
source_urlsinreferences/provider-index.jsonand fetch the official provider-controlled docs orllms.txtindex when available. - Keep Arab/MENA-wide updates in this skill. If the task is Egypt-specific Geidea, Paymob, FawryPay, EasyKash, Kashier, PaySky, valU, or Souhoola behavior, switch to
egypt-payment-guardianand its Egypt provider index. - Do not import Egypt-only endpoint, currency, callback, BNPL, or signature assumptions into regional guidance unless the official MENA provider docs say they apply across the requested country/account.
- Do not vendor full provider docs, watcher snapshots, screenshots, merchant docs, credentials, signatures, test cards, or dashboard material into the skill.
Shared Patterns
Load these when the implementation touches the matching risk:
- Fulfillment flow:
references/patterns/webhook-first-fulfillment.md - Idempotency and state transitions:
references/patterns/idempotency-state-transitions.md - Secret and server boundary:
references/patterns/server-secret-boundary.md - Capture, void, refund, and BNPL lifecycle:
references/patterns/capture-refund-void-lifecycle.md - Private docs policy:
references/patterns/private-docs-policy.md
Implementation Bias
- Prefer server-confirmed activation. Redirect pages should show
processingunless server state is already paid/captured. - Use a payment transaction table plus a payment event table or equivalent durable records.
- Enforce unique constraints on provider event ids, provider payment ids, provider transaction references, capture/refund ids, and merchant order references.
- For BNPL, separate approval/authorization from capture/settlement. Do not ship or grant final value until the provider state and merchant lifecycle step support it.
- For Supabase, privileged payment writes belong in Edge Functions or server routes with service role isolated from browser code.
- If official docs are unavailable, gated, partial, or country-specific, state that and ask for current merchant docs. Do not invent endpoints, status names, headers, signatures, test cards, local payment methods, or capture windows.
- For providers with full-depth coverage, use the provider file as a checklist and still link to official docs for endpoint-level details.
- For conservative coverage, stop before custom endpoint work unless official merchant docs are provided.
Required Output
When answering a payment implementation or review request, return:
- Current payment architecture.
- Provider contract, country scope, and source confidence.
- Server boundary and secret handling.
- Idempotency strategy.
- Risk points and safe fix plan.
- Test matrix including duplicate events, invalid signature, amount/currency/country mismatch, callback-before-redirect, redirect-before-callback, capture/refund/void misuse, and stale state.
- Remaining unknowns and deployment/rollback notes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

