Logo vun Setup Paypal

Setup Paypal

Communautéit
afu-it
setup-paypal

Set up, build, debug, review, and explain PayPal payment integrations for Malaysian merchants using official PayPal developer docs, REST API OAuth 2.0, Orders v2 create/capture/authorize, Payments v2 refunds/voids/reauthorization, JavaScript SDK v6 and v5 buttons, webhooks with CRC32 plus SHA256withRSA signature verification or verify-webhook-signature postback, Subscriptions and Catalog Products, Transaction Search, Payouts, disputes, sandbox accounts, test cards, negative testing, MYR rules, and go-live. Use when working with PayPal Checkout, PayPal buttons, PayPal REST APIs, MYR payments, cross-border sales from Malaysia, PayPal webhooks, PayPal recurring billing, refunds, reconciliation, or production readiness.

Iwwersiicht

Editeurafu-it
Repositorymalaysia-payment-gateway
Skill-Nummsetup-paypal
Stären
74
Forks
11
Matgeliwwert Fichieren
10
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.

  • 10 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 Paypal 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-paypal
  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-paypal .claude/skills/setup-paypal
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Setup Paypal 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 Paypal 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 Paypal 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.

PayPal Payment Gateway (Malaysia)

Use this skill for PayPal integration work for a Malaysia-registered PayPal Business account.

Source

Read references/paypal-api.md first. It has the Malaysia scope summary, environments, auth, headers, amount rules, the default checkout flow, statuses, and the full endpoint catalogue.

Then load only what the task needs:

  • references/paypal-orders.md: Orders v2 and Payments v2 field tables, capture checks, PATCH, refunds.
  • references/paypal-webhooks.md: signature verification, headers, events, Webhooks Management API.
  • references/paypal-checkout-js.md: JavaScript SDK v6 and v5, callbacks, server routes.
  • references/paypal-subscriptions.md: products, plans, subscriptions, failure retry.
  • references/paypal-errors-testing.md: error codes, sandbox, test cards, negative testing.
  • references/paypal-reporting-payouts.md: Transaction Search, Payouts (MYR rules), disputes.
  • references/account-setup.md: registration, credentials, env vars, dashboard settings, Malaysian account notes, pricing link.
  • references/source-map.md: which official page backs each fact, coverage, and known gaps.

Core Workflow

  1. Identify environment (sandbox or live) and use matching credentials, host, client ID and Webhook ID.
  2. Identify surface: JS SDK buttons (v6 for new work), server redirect to the approval link, Subscriptions, Payment Links, or Payouts.
  3. Create a local pending payment with amount, MYR (or the chosen currency) and your reference.
  4. Server: get an OAuth token (cache it), then POST /v2/checkout/orders with intent: CAPTURE, custom_id/invoice_id, and a PayPal-Request-Id.
  5. Browser: buyer approves through the SDK or the approve / payer-action link.
  6. Server: POST /v2/checkout/orders/{id}/capture with a PayPal-Request-Id.
  7. Settle only when purchase_units[].payments.captures[].status is COMPLETED and amount, currency and reference match.
  8. Verify every webhook signature over the raw body, deduplicate by event id, re-fetch the order or capture, then settle idempotently.
  9. Handle PENDING captures, INSTRUMENT_DECLINED, reversals, refunds and disputes.

Core Facts

  • REST base: sandbox https://api-m.sandbox.paypal.com, live https://api-m.paypal.com.
  • Token: POST /v1/oauth2/token, Basic auth client_id:secret, body grant_type=client_credentials; use Authorization: Bearer <token> until expires_in.
  • Orders: POST /v2/checkout/orders, GET /v2/checkout/orders/{id}, POST /v2/checkout/orders/{id}/capture, /authorize, PATCH /v2/checkout/orders/{id}.
  • Payments: POST /v2/payments/captures/{id}/refund, GET /v2/payments/captures/{id}, authorization capture, void, reauthorize.
  • Amounts are decimal strings in {"currency_code","value"}; not sen.
  • MYR is supported as payment and balance currency for in-country (Malaysian) PayPal accounts only.
  • Order COMPLETED can still hold a declined payment; check the capture status.
  • Webhook self-verify string: transmission_id|transmission_time|webhook_id|crc32(raw body, decimal), verified with the cert at paypal-cert-url (SHA256withRSA). Postback: POST /v1/notifications/verify-webhook-signature must return verification_status: SUCCESS.
  • Webhook retries: up to 25 times over 3 days for non-2xx. Up to 10 webhook URLs per app.
  • JS SDK v6: https://www.paypal.com/web-sdk/v6/core (sandbox https://www.sandbox.paypal.com/web-sdk/v6/core). v5: https://www.paypal.com/sdk/js?client-id=...&currency=MYR.
  • Authorization: 29-day validity, 3-day honor period. Refund within 180 days of capture.
  • No published rate limit; 429 RATE_LIMIT_REACHED on abuse. Use webhooks, not polling.
  • Not available to Malaysian merchants per the docs: FPX, DuitNow, local e-wallets, Expanded Checkout card fields, card vaulting, Pay Later, PayPal Credit, Venmo. GrabPay via PayPal is Singapore only.

Critical Rules

  • Keep the client secret server-side. Only the client ID goes to the browser.
  • Create and price orders on the server; never trust amounts sent by the browser.
  • Never fulfil from onApprove, a redirect to return_url, or a browser-sent status.
  • Verify webhooks over the raw body bytes with the Webhook ID of the same environment; never re-serialize JSON before CRC32 or postback.
  • Use PayPal-Request-Id on create, capture, authorize and refund; reuse the same ID when retrying a timeout or 5xx.
  • Treat ORDER_ALREADY_CAPTURED as "fetch and settle", not as failure.
  • Keep invoice_id unique per order; duplicates are rejected by default.
  • Match SDK currency and intent to the API order.
  • Set Payment Receiving Preferences so MYR or foreign-currency payments do not sit pending for manual acceptance.
  • Do not use the API for personal payments in Malaysia (PayPal policy).
  • Do not claim local Malaysian methods or Expanded Checkout features for a Malaysian account.

Completion Criteria

A PayPal integration is done only when:

  1. Orders are created and captured server-side with cached OAuth tokens and PayPal-Request-Id.
  2. The browser only returns the order ID; the server decides paid state from the capture response or a verified webhook.
  3. Webhooks are subscribed per environment and verified (self or postback) over the raw body.
  4. Settlement checks order ID, capture ID, capture status, amount, currency, custom_id/invoice_id and environment.
  5. Duplicate webhooks, capture retries, pending captures, reversals and refunds are idempotent.
  6. Tests cover bad signature, replayed event, INSTRUMENT_DECLINED, pending capture, duplicate invoice ID, partial and over refund.
  7. Deployment docs list PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID, API base, webhook URL and sandbox/live separation.

Loophole Review Loop

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

  1. List trust boundaries: browser SDK, return/cancel URLs, server order creator, OAuth token cache, PayPal API, webhook receiver, raw-body parser, cert download, database, fulfilment, refund job, dashboard settings.
  2. Check bypasses: fake onApprove, client-sent amount, forged webhook, re-serialized body, wrong environment Webhook ID, sandbox/live mix, COMPLETED order with declined capture, pending capture fulfilled, duplicate webhook, capture retry without idempotency key, MYR pending manual acceptance, reversal after fulfilment, duplicate refund, cert URL from a non-PayPal host.
  3. Add fixes: server-side pricing, local pending record, capture-status checks, raw-body verification, event ID dedupe, PayPal-Request-Id, environment-scoped config, re-fetch before settle, reversal and dispute handlers.
  4. Re-read the relevant reference file for any gap.
  5. State remaining uncertainty that depends on account eligibility, receiving preferences, fees, PayPal-wallet vaulting for Malaysia, or undocumented fields listed in references/source-map.md.

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

Set up, build, debug, review, and explain PayPal payment integrations for Malaysian merchants using official PayPal developer docs, REST API OAuth 2.0, Orders v2 create/capture/authorize, Payments v2 refunds/voids/reauthorization, JavaScript SDK v6 and v5 buttons, webhooks with CRC32 plus SHA256withRSA signature verification or verify-webhook-signature postback, Subscriptions and Catalog Products, Transaction Search, Payouts, disputes, sandbox accounts, test cards, negative testing, MYR rules, and go-live. Use when working with PayPal Checkout, PayPal buttons, PayPal REST APIs, MYR payments...

Firwat Setup Paypal op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Setup Paypal 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 Paypal 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-paypal 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 Paypal 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 Paypal benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Setup Paypal 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 Paypal 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 👇