Embed crypto payment buttons and forms on any website
Let customers enter their own amount
<iframe src="https://protocol-banks.vercel.app/embed/pay?token=USDC" width="400" height="500" style="border: none; border-radius: 12px;" allow="payment" ></iframe>
npm install @protocolbanks/sdk
import { ProtocolBanks } from '@protocolbanks/sdk';
const pb = new ProtocolBanks({
apiKey: 'pk_your_api_key',
});
// Mount the payment widget
const widget = pb.embed({
container: '#payment-container',
to: '0x...',
token: 'USDC',
theme: 'light',
onSuccess: (result) => {
console.log('Payment successful:', result.txHash);
},
onError: (error) => {
console.error('Payment failed:', error);
},
});
// Later: cleanup
// widget.destroy();<!-- Protocol Banks Payment Button -->
<a href="https://protocol-banks.vercel.app/pay?to=0x...&amount=10&token=USDC"
target="_blank"
style="display:inline-flex;align-items:center;gap:8px;
padding:12px 24px;border-radius:8px;
background:#0066FF;color:white;
font-family:sans-serif;font-weight:600;
text-decoration:none;font-size:16px;">
Pay Now
</a>