Official npm package: zarinpal-node-sdk on npm
A modern Node.js SDK for integrating with the ZarinPal payment gateway. Easily create payment requests, verify transactions, calculate fees, handle refunds, and more with a simple and robust API.
- Create and manage payment requests
- Calculate transaction fees before payment
- Verify and inquire transactions
- Refund and reverse payments
- TypeScript support
- Easy to use and extend
Install via npm:
npm install zarinpal-node-sdkFor more installation options and usage examples, see the official documentation:
ZarinPal Node.js SDK Documentation
zarinpal.payments.create(data)– Create a new payment requestzarinpal.payments.getRedirectUrl(authority)– Get the payment gateway redirect URLzarinpal.payments.feeCalculation(data)– Calculate the transaction feezarinpal.verifications.verify(data)– Verify a paymentzarinpal.inquiries.inquire(data)– Inquire about a transactionzarinpal.refunds.create(data)– Request a refundzarinpal.reversals.reverse(data)– Reverse a transactionzarinpal.unverified.list()– List unverified payments
Run the test suite using:
npm testContributions are welcome! Please open issues and submit pull requests for new features, bug fixes, or improvements.
MIT