@mr-digital-solutions/mrpay-sdk
v2.0.1
Published
MRPay Hosted Checkout SDK for SATIM payments
Maintainers
Readme
MRPay SDK
Hosted Checkout SDK for SATIM payments via MRPay.
MRPay provides a secure hosted payment page. Your application creates a checkout session and redirects the customer to MRPay, which then handles SATIM payment processing.
Installation
npm install @mrpay/sdk
Basic Usage (Web)
import { MRSatimPay } from "@mrpay/sdk";
const mrpay = new MRSatimPay({
apiKey: "YOUR_API_KEY",
baseUrl: "https://api.mrpay.dz",
platform: "web"
});
await mrpay.payV2({
orderNumber: "ORDER_1001",
amount: 5000
});
React Native Usage
const mrpay = new MRSatimPay({
apiKey: "YOUR_API_KEY",
baseUrl: "https://api.mrpay.dz",
platform: "react-native"
});
await mrpay.payV2({
orderNumber: "ORDER_1001",
amount: 5000
});
Node.js Usage
const mrpay = new MRSatimPay({
apiKey: "YOUR_API_KEY",
baseUrl: "https://api.mrpay.dz",
platform: "node"
});
const { checkoutUrl } = await mrpay.payV2({
orderNumber: "ORDER_1001",
amount: 5000
});
// Redirect customer to checkoutUrl
API Reference
createCheckoutSession(params)
Creates an MRPay checkout session.
openCheckout(url)
Opens MRPay hosted checkout page.
payV2(params)
Convenience method that creates a checkout session and redirects automatically (web / React Native).
Minimum Amount
Minimum payment amount is 50 DZD.
Platform Support
Web
React Native
Node.js
Security
MRPay hosted checkout reduces PCI scope by handling payment processing and SATIM integration securely.
Migration
See MIGRATION.md for upgrading from SDK v1.
License
MIT © MR Digital Solutions