Welcome to the SpankPay SDK!
Get paid with crypto!
Overview
1. Include the SpankPay JavaScript
<script src="https://pay.spankchain.com/spankpay.js"></script>2. Add a Pay with SpankPay button
const { SpankPay } = require('spankpay')
SpankPay.showPurchase({
key: 'test_quickstart_key',
amount: '69.69',
currency: 'USD',
acceptCurrencies: ['BOOTY', 'ETH', 'BTC', 'DOGE'],
callback: 'https://pay.spankchain.com/api/quickstart/callback',
onPayment: function(payment) {
console.log(`Payment ${payment.status}`, payment)
},
})3. Generate an API key and write a Webhook endpoint
Integrating SpankPay
1. Include the SpankPay JavaScript
2. Create a Purchase
3. Implement a Webhook Callback URL
4. Testing Your Integration
Testing API Keys
Testing Webhooks
Last updated
Was this helpful?