SDK guide
Build crypto payment flows with the MakePay NPM SDK
The MakePay NPM SDK is for JavaScript and TypeScript teams that want a typed server-side integration for payment links, settings, and webhooks.
Node.js backends often power SaaS dashboards, marketplaces, booking apps, and product checkout systems. The MakePay NPM SDK gives those teams a direct integration path without installing an ecommerce plugin.
Use it from trusted backend code, not from public browser code. API keys and webhook secrets belong on the server.
Where the SDK fits
Use the NPM SDK when your product owns the payment orchestration: creating links, attaching customer metadata, showing a hosted checkout URL, and reconciling webhooks.
For storefront platforms such as WooCommerce or Magento, the ready plugin is usually faster. For a custom SaaS checkout, the SDK is the cleaner fit.
TypeScript-friendly payment flows
The SDK gives TypeScript teams a typed layer around MakePay request payloads and responses. That helps keep payment-link creation consistent across API routes, queue workers, and admin tools.
Pair it with embedded checkout if your frontend wants a modal-style payment experience while the backend owns payment-link creation.
Webhook safety
Never trust a payment status sent to a public route without verifying the MakePay signature. The SDK should be used to verify the raw payload before updating an order.
Store transaction IDs and payment-link UIDs so webhook retries remain idempotent.
FAQ
Can the NPM SDK run in the browser?
No. Keep API keys and webhook secrets in server-side code. Browser checkout should use public payment links or the embed script.
Is TypeScript supported?
Yes. The NPM SDK is designed as a typed JavaScript and TypeScript library.