
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
relapay-sdk
Advanced tools
A production-ready npm package for integrating MomentPay payments in React applications. It provides TypeScript support, reusable hooks and components, and handles API interactions securely.
Install the package in your React project:
npm install relapay-sdk
Ensure peer dependencies are installed:
npm install react react-dom @mui/material @emotion/react @emotion/styled tailwindcss redux @reduxjs/toolkit react-redux react-toastify
Add environment variables to your project's .env file (copy from SDK's .env template):
REACT_APP_MOMENTPAY_TEST_BASE_URL=...
// Other credentials as in .env
For Toastify, add <ToastContainer /> in your app root.
For Redux (optional), create a payment slice and integrate with your store.
// In your component
import { usePayment } from 'relapay-sdk';
const MyPayment = () => {
const { initiate, loading, error, response } = usePayment();
const handlePay = () => {
initiate({
cashier_id: '123',
customer_details: { customer_name: 'John Doe', customer_id: 'cust123', payment_amount: 100 },
processing_id: 'proc123',
paymode: 'cards',
transaction_till: 'till1',
payment_fill: 'express_full',
// Other fields...
});
};
return (
<button onClick={handlePay} disabled={loading}>
{loading ? 'Processing...' : 'Pay'}
</button>
);
};
import { PaymentComponent } from 'relapay-sdk';
const requestData = { /* same as above */ };
<PaymentComponent requestData={requestData} buttonText="Initiate Payment" className="my-custom-class" />
initiatePayment(partialRequest: Omit<PaymentRequest, 'authentication' | 'checksum_hash' | 'merchant_id'>): Initiates payment, returns PaymentResponse.usePayment(): Hook returning initiate, loading, error, response.PaymentComponent(props: PaymentComponentProps): Reusable button component.See src/types/index.ts for full type definitions.
For a full example, check the example folder (TODO: Add if needed).
npm test to verify setup.As a solo developer project, contributions are welcome via pull requests.
MIT
FAQs
SDK for MomentPay integration in React projects
We found that relapay-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.