@blingspay/react
v0.1.3
Published
Drop-in crypto checkout component for crypto — powered by blingsPay
Downloads
273
Maintainers
Readme
@blingspay/react
Drop-in crypto checkout for Solana. Accept SOL, USDC, and USDT in minutes.
Installation
npm install @blingspay/reactQuick Start
import { CryptoCheckout } from "@blingspay/react";
export default function CheckoutPage() {
return (
<CryptoCheckout
apiKey="pk_live_your_key_here"
amount={9.99}
currency="USDC"
onSuccess={(receipt) => {
console.log("Paid!", receipt.txSignature);
}}
/>
);
}Props
| Prop | Type | Default | Description |
| ------------- | --------------------------- | ------------------ | ----------------------------------------------------- |
| apiKey | string | required | Your publishable API key from the blingspay dashboard |
| amount | number | required | Amount to charge |
| currency | "SOL" \| "USDC" \| "USDT" | "SOL" | Token to accept |
| buttonLabel | string | "Pay X CURRENCY" | Custom button label |
| onSuccess | (receipt) => void | — | Called when payment confirms on-chain |
| onError | (error) => void | — | Called when payment fails |
| theme | "dark" \| "light" | "dark" | Visual theme |
| className | string | — | Extra class on root element |
Receipt Object
interface blingspayReceipt {
txSignature: string; // Solana transaction signature
amount: number; // Amount paid
currency: string; // Token used
timestamp: number; // Unix timestamp of confirmation
merchantVault: string; // Your vault PDA address
}Requirements
- React 17+
- A blingspay account — sign up at blingspay.io
License
MIT
