Documentation
Quick Start Guide
Welcome to the BillDesq Developer Documentation. BillDesq is designed to be developer-first, providing robust APIs and flexible SDKs to integrate global payments into your software in minutes.
1. Getting Started
To begin accepting payments, you'll need to create a BillDesq account to obtain your API keys. Once registered, navigate to the Developer settings in your Dashboard.
Installation
We provide official SDKs for Node.js, Python, Ruby, and PHP. To install the Node.js package, run:
2. Authentication
The BillDesq API uses API keys to authenticate requests. You can view and manage your API keys in the BillDesq Dashboard. Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_.
const BillDesq = require('@billdesq/sdk');
const billdesq = new BillDesq('sk_test_your_api_key_here');
3. Creating a Checkout Session
The easiest way to accept a payment is to create a Checkout Session and redirect your customer to our hosted, conversion-optimized checkout page.
payment_method_types: ['card', 'alipay'],
line_items: [{
price: 'price_1Mow...',
quantity: 1,
}],
mode: 'payment',
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
});
4. Next Steps
Once you have successfully processed your first test payment, explore our more advanced features:
- API Reference - Deep dive into all available endpoints.
- Webhooks - Learn how to listen for asynchronous events.