Documentation
Explore our guides and examples to integrate ZenPay cryptocurrency payments into your website or application.
1. Install the SDK
npm install @zenpay/js
2. Initialize ZenPay
import { ZenPay } from '@zenpay/js';
// Initialize with your API keys
const zenpay = new ZenPay('pk_test_ZenPay123456789DEMO');
3. Create a payment
// Create a Payment Intent
const paymentIntent = await zenpay.paymentIntents.create({
amount: 2000, // Amount in cents
currency: 'usd',
payment_method_types: ['bitcoin', 'ethereum'],
description: 'Order #12345'
});
// Redirect to the checkout page
window.location.href = paymentIntent.checkout_url;
Test credentials
pk_test_ZenPay123456789DEMO
sk_test_ZenPay987654321DEMO
Test crypto addresses
BTC
tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx
ETH
0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826