Paymob payments skill
Integrate, configure, or debug Paymob (باي موب / Accept) — the Egypt-first MENA payment gateway (also KSA, UAE, Oman, Pakistan) — in any codebase. Use this skill whenever the work touches Paymob in any way: the Intention API (v1/intention), Unified Checkout or Pixel, auth tokens / secret keys (sk_test/sk_live), transaction callbacks or webhooks, HMAC verification, refunds/voids/captures, pay-with-saved-cards (CIT/MIT, card tokens), subscriptions, QuickLinks/payment links, transaction inquiry, mobile wallets (Vodafone Cash etc.), kiosk/Aman, BNPL, bank installments, Apple Pay via Paymob, Paymob plugins (WooCommerce, Shopify, Odoo, Magento…), Paymob mobile SDKs, or accept.paymob.com / developers.paymob.com generally. Also trigger for "online payments in Egypt", "EGP card payments", "payment gateway for Egyptian customers", or checkout flows for luminaai.company — even if the user says only "Paymob" or "the payment integration" without the word "payment". Bundles a complete offline mirror of developers.paymob.com/paymob-docs (116 pages, both Documentation and Developers tabs) plus a quick-reference cheatsheet — consult these instead of guessing endpoints, request shapes, HMAC key order, or test credentials.From its SKILL.md
npx -y skills add karem505/paymob-payments-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
8.5 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Paymob Payments
Paymob ("Accept") is the dominant Egyptian payment gateway: cards (3DS), mobile wallets (Vodafone Cash & co.), BNPL, bank installments, kiosk (Aman/Masary), Apple Pay. The modern integration path is Intention API → Unified Checkout (redirect) or Pixel (embedded) → webhook callbacks with HMAC verification.
Bundled references — read these, don't guess
references/cheatsheet.md— condensed integration guide: every endpoint with auth mode and request shape, HMAC algorithm + exact key order, checkout URL format, test credentials, Lumina/Next.js wiring plan. Start here.references/docs/INDEX.md— table of contents of the full offline docs mirror (116 pages from developers.paymob.com, both tabs, with per-pageMETHOD endpointannotations).references/docs/**/*.md— the mirrored pages themselves. Each file has frontmatter with the liveurl:andbreadcrumbs:. Grep this tree for any API detail; every API page carries full request/response schemas with examples, plus documented common errors.
Key pages you will reach for most:
| Topic | File |
|---|---|
| Create Intention (the core API) | references/docs/intention-apis/create-intention.md |
| Unified Checkout redirect | references/docs/checkout-experiences/unified-checkout-redirection.md |
| Pixel (embedded checkout) | references/docs/checkout-experiences/pixel-embedded.md |
| Callbacks (processed vs response) | references/docs/webhook-callbacks-and-hmac/transaction-callbacks.md |
| HMAC for transaction callbacks | references/docs/webhook-callbacks-and-hmac/hmac/hmac-transaction-callback.md |
| HMAC for card-token callbacks | references/docs/webhook-callbacks-and-hmac/hmac/hmac-for-card-tokens.md |
| Refund / Void / Capture | references/docs/manage-payment-apis/*.md |
| Saved cards (token, CIT, MIT) | references/docs/pay-with-saved-cards/*.md |
| Subscriptions (plans + actions) | references/docs/subscription/** |
| Transaction inquiry | references/docs/transaction-inquiry-apis/*.md |
| Test cards & wallet | references/docs/need-help/faq/test-credentials.md |
| Where credentials live in dashboard | references/docs/need-help/faq/getting-integration-credentials.md |
Core concepts (60-second model)
- Region hosts: Egypt
https://accept.paymob.com/(default for Lumina), KSAhttps://ksa.paymob.com/, UAEhttps://uae.paymob.com/, Omanhttps://oman.paymob.com/. Doc endpoint paths are relative to these. - Four credentials, all from the Accept Dashboard (Settings):
- Secret key
sk_test_…/sk_live_…→ headerAuthorization: Token <sk>for Intention API and refund/void/capture. Server-side only. - Public key
pk_…→ used in the checkout URL / Pixel. Safe for client. - API key → exchanged via
POST api/auth/tokensfor a Bearer token; needed only for subscriptions, QuickLinks, and transaction inquiry. - HMAC secret → verifies callbacks. Server-side only.
- Secret key
- Integration IDs: one per payment method/currency, separate Test and Live
sets (Dashboard → Developers → Payment Integrations). The test/live status of
the integration ID must match the secret key used — mismatch is the
classic 404
"Integration ID/Name does not exist"error. - Amounts are integer cents (EGP piasters): 1500 EGP →
150000. The sum ofitems[].amountmust equalamount. - Happy path: server creates intention (
POST v1/intention/) → getsclient_secret→ redirect customer tohttps://accept.paymob.com/unifiedcheckout/?publicKey=<pk>&clientSecret=<cs>→ Paymob POSTs the processed callback (JSON, server-to-server) to your webhook and GET-redirects the customer to your response callback page → verify HMAC (SHA-512) on both → fulfill only on the processed callback.
Rules that prevent real bugs
- Fulfill on the processed callback, never on the redirect. The response
callback is client-side and spoofable; the processed callback with a valid
HMAC is the source of truth. Check
success == trueand thatamount_centsandcurrencymatch what you stored for the order. - HMAC: concatenate the values of the documented 19 keys in their exact
documented (lexicographic) order — booleans as lowercase
true/false— then HMAC-SHA512 with the HMAC secret and compare to thehmacquery param. POST callback reads nestedobj.id/order.id; GET callback uses flatid/order_id. Exact list in the cheatsheet. - Correlate via
special_reference(returned asmerchant_order_idin callbacks) or storeintention_order_id/intentionidat creation time.special_referencemust be unique per intention — reuse is rejected, which makes it a natural idempotency key. - Don't hardcode integration IDs in code — env vars, one per method, and keep test/live pairs separate per environment.
payment_methodsaccepts integration IDs (numbers) or names (strings, e.g."card"). Currency of the intention must match the integration ID currency.- Per-intention
notification_url/redirection_urloverride the dashboard callback URLs but are card-only (redirection also works for wallets) — set the dashboard URLs anyway as the baseline. - Webhooks need a public URL — use the dashboard's webhook testing tool, or
ngrok/webhook.site locally (
references/docs/webhook-callbacks-and-hmac/webhook-testing-tool.md).
Lumina-specific wiring (Next.js 16 + Supabase, this repo)
When implementing here, follow the repo conventions (App Router, route
handlers, hooks in hooks/, Supabase service-role only server-side):
app/api/paymob/intention/route.ts— POST: authenticated student requests enrollment payment → server creates intention (secret key, EGP cents from the course pricing source of truth) → returns checkout URL. Never exposesk_to the client.app/api/paymob/webhook/route.ts— processed-callback receiver: verify HMAC before parsing, then activate the enrollment with the service-role Supabase client (no user session in webhooks; RLS must be bypassed deliberately), record the transaction id, and return 200 fast.app/[locale]/(student)/payment/result/page.tsx(or similar) — response callback landing page: parse query params, verify HMAC server-side, show localized success/failure (AR default, RTL).- Env vars (set on the
lumina-ai-academyVercel project — that's the one serving luminaai.company, notlumina-academy-platform):PAYMOB_SECRET_KEY,PAYMOB_PUBLIC_KEY,PAYMOB_HMAC_SECRET,PAYMOB_INTEGRATION_ID_CARD,PAYMOB_INTEGRATION_ID_WALLET(+PAYMOB_API_KEYonly if subscriptions/inquiry get used). - Payments table in Supabase keyed by intention id /
special_reference= enrollment id; status transitions only from webhook handler.
Test credentials (test mode)
Cards — holder Test Account, expiry 01/39, CVV 123:
Mastercard 5123456789012346 or 5123450000000008, Visa 4111111111111111.
Mobile wallet — number 01010101010, MPin 123456, OTP 123456.
Mirror maintenance
The mirror was generated 2026-06-11 from the live Theneo site. To refresh:
re-run the fetch+convert pipeline (see references/MIRROR.md) — it enumerates
pages from the site's __NEXT_DATA__ section map, so new pages are picked up
automatically.
What ships with it: 125 files
487.0 KB alongside SKILL.md, 3 of them executable
references/
- cheatsheet.md10.3 KB
- docs/authentication-request-generate-auth-token-1.md7.7 KB
- docs/checkout-experiences.md329 B
- docs/checkout-experiences/overview.md3.2 KB
- docs/checkout-experiences/pixel-embedded.md12.2 KB
- docs/checkout-experiences/unified-checkout-redirection.md1.5 KB
- docs/getting-started/dashboard.md3.7 KB
- docs/getting-started/integration-checklist.md3.0 KB
- docs/getting-started.md299 B
- docs/getting-started/new-dashboard.md6.1 KB
- docs/getting-started/onboarding-wizard.md797 B
- docs/getting-started/overview.md7.7 KB
- docs/INDEX.md9.4 KB
- docs/integration-paths/apis.md3.3 KB
- docs/integration-paths.md311 B
- docs/integration-paths/mobile-sdks.md3.3 KB
- docs/integration-paths/no-code.md1.8 KB
- docs/integration-paths/no-code/payment-links.md2.3 KB
- docs/integration-paths/overview.md3.8 KB
- docs/integration-paths/plugins/cs-cart.md3.0 KB
- docs/integration-paths/plugins/drupal.md2.6 KB
- docs/integration-paths/plugins/joomla.md3.0 KB
- docs/integration-paths/plugins/laravel-bagisto.md3.4 KB
- docs/integration-paths/plugins/magento.md2.7 KB
- docs/integration-paths/plugins.md3.4 KB
- docs/integration-paths/plugins/odoo.md16.3 KB
- docs/integration-paths/plugins/opencart.md2.9 KB
- docs/integration-paths/plugins/oscommerce.md2.5 KB
- docs/integration-paths/plugins/prestashop.md2.9 KB
- docs/integration-paths/plugins/shopify.md3.4 KB
- docs/integration-paths/plugins/staah.md3.3 KB
- docs/integration-paths/plugins/whmcs.md2.2 KB
- docs/integration-paths/plugins/wordpress.md7.8 KB
- docs/integration-paths/plugins/zencart.md2.6 KB
- docs/intention-apis/create-intention.md9.2 KB
- docs/intention-apis.md293 B
- docs/intention-apis/overview.md2.1 KB
- .gitignore113 B
- LICENSE1.4 KB
- README.md4.1 KB
85 more files not listed here. See all 125 in the repository.