
Pay from anywhere from any solana-vm based network!
SVM-Pay is a payment solution for SVM networks (Solana, Sonic SVM, Eclipse, s00n) that enables developers to easily integrate payment functionality into their applications. Inspired by Solana Pay, SVM-Pay extends the concept to work across all SVM networks with a one-click integration approach for developers.
- Cross-Network Compatibility: Support for Solana, Sonic SVM, Eclipse, and s00n networks
- Simple Integration: One-click integration for developers
- Comprehensive SDK: JavaScript/TypeScript SDK with React, Vue, and Angular components
- Mobile Support: iOS and Android SDK for mobile applications
- No Fees: SVM-Pay itself charges no fees (only standard network transaction fees apply)
- Secure: Built with security best practices for blockchain payments
- Flexible: Support for different payment scenarios (e-commerce, point-of-sale, subscriptions)
npm install svm-pay
import { SVMPay } from 'svm-pay';
// Initialize the SDK
const svmPay = new SVMPay({
defaultNetwork: 'solana', // 'solana', 'sonic', 'eclipse', or 'soon'
});
// Create a payment URL
const url = svmPay.createTransferUrl(
'YOUR_WALLET_ADDRESS',
'1.0', // Amount
{
label: 'Your Store',
message: 'Payment for Order #123',
references: ['order-123']
}
);
console.log(url);
// Output: solana:YOUR_WALLET_ADDRESS?amount=1.0&label=Your%20Store&message=Payment%20for%20Order%20%23123&reference=order-123
import { SVMPayProvider, PaymentButton } from 'svm-pay/react';
function App() {
return (
<SVMPayProvider>
<PaymentButton
recipient="YOUR_WALLET_ADDRESS"
amount="1.0"
onComplete={(status, signature) => {
console.log(`Payment ${status}`, signature);
}}
/>
</SVMPayProvider>
);
}
<template>
<svm-pay-button
recipient="YOUR_WALLET_ADDRESS"
amount="1.0"
@complete="handleComplete"
/>
</template>
<script>
export default {
methods: {
handleComplete(status, signature) {
console.log(`Payment ${status}`, signature);
}
}
}
</script>
@Component({
selector: 'app-root',
template: `
<svm-pay-button
recipient="YOUR_WALLET_ADDRESS"
amount="1.0"
(complete)="handleComplete($event)"
></svm-pay-button>
`
})
export class AppComponent {
handleComplete(event: {status: string, signature?: string}) {
console.log(`Payment ${event.status}`, event.signature);
}
}
SVM-Pay includes several demo applications to showcase its functionality:
- Web Payment Demo: A simple web application for accepting payments
- Point-of-Sale Demo: A point-of-sale application for in-person payments
- Subscription Payment Demo: A subscription service application
SVM-Pay is built with security in mind. For security recommendations and best practices, see the Security Recommendations document.
MIT
Contributions are welcome! Please see the Contributing Guidelines for more information.