Stripe, PayPal, Square integrations: checkout, subscriptions, webhooks, idempotency aur PCI — sab secure.
Kaunsa processor (Stripe/PayPal/Square), one-time ya subscription, currencies aur regions (EU/UK par SCA/3DS2 lagu), hosted checkout ya embedded element.
Raw card data kabhi servers par nahi — processor ke hosted fields/elements (Stripe Payment Element, PayPal Hosted Fields, Square Web SDK) use karo. Card number/CVV log ya store kabhi nahi.
Har payment-creating call par idempotency key: business operation ke liye pehle persist karo, same key dobara different params se use na karo.
Signature verification raw (unparsed) body par: webhook route par express.raw() global express.json() se PEHLE mount karo. Sahi mode ka signing secret (test/live), replay tolerance (~5 min), turant 2xx, event.id par idempotent processing.
PaymentIntents/SetupIntents intent-based flow use karo taki EU/UK (PSD2) customers par 3DS2 challenge khud chale, kabhi bypass na karo.
Failed payments, partial/full refunds, disputes aur chargebacks, currency conversion, aur processor report vs apne records ka reconciliation — sab handle karo. Secrets sirf env vars me, test aur live keys alag.