DS Tech Studio← Wapas website par
Free Guide · payment-gateway-integrator

Payment Gateway Integrator Guide Hindi Guide

Stripe, PayPal, Square integrations: checkout, subscriptions, webhooks, idempotency aur PCI — sab secure.

Pehle decide karo

Kaunsa processor (Stripe/PayPal/Square), one-time ya subscription, currencies aur regions (EU/UK par SCA/3DS2 lagu), hosted checkout ya embedded element.

PCI scope kam rakho

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.

Idempotency

Har payment-creating call par idempotency key: business operation ke liye pehle persist karo, same key dobara different params se use na karo.

Webhooks sahi verify 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.

SCA / 3D Secure

PaymentIntents/SetupIntents intent-based flow use karo taki EU/UK (PSD2) customers par 3DS2 challenge khud chale, kabhi bypass na karo.

Edge cases

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.

Koi project ya kaam chahiye?
Request bhejein
DS Tech Studio · Digital Solutions · Web · Design · Automation · IoT