multivendor-payments
v0.0.3
Published
Multi-provider payment clients (Stripe, Razorpay, PayGlocal, Cashfree, PayPal, PhonePe, PayU, Paytm, Square)
Downloads
339
Maintainers
Readme
multivendor-payments
Multi-provider payment clients with createPayments({ ... }) registry.
Providers: Stripe, Razorpay, PayGlocal, Cashfree, PayPal, PhonePe, PayU, Paytm, Square.
PhonePe / PayU / Paytm are INR-only in v1. Redirect/hosted checkout only (no card PAN on our servers).
Usage
import { createPayments } from 'multivendor-payments';
const payments = createPayments({
stripe: { secretKey, publishableKey, webhookSecret },
});
const stripe = payments.get('stripe');
await stripe.createPayment({ orderId: 1, amount: 100, currency: 'INR', idempotencyKey: '...' });
stripe.raw; // typed StripeClientFrontend must debounce/disable-on-submit. Creates without idempotencyKey are single-attempt only.
Build
pnpm build → tsc && tsc-alias
