Quickstart Guide
From zero to accepting Bitcoin in under 10 minutes.
Create Your Account
Sign up for a free SatsRail merchant account. No bank approval, no credit checks.
Create Account →Get Your API Keys
From your merchant dashboard, go to API Keys to find your keys:
-
Secret key
— starts with
sk_live_orsk_test_(keep this server-side, never expose to clients) -
Publishable key
— starts with
pk_live_orpk_test_(safe for client-side, can only create checkout sessions)
sk_test_
keys during development. They create isolated test data that never touches real payment providers.
Install an SDK
Pick your language:
# Node.js
npm install satsrail
# Python
pip install satsrail
# Ruby
gem install satsrail
Or skip the SDK and use the REST API directly with curl.
Create Your First Order
curl
curl -X POST https://satsrail.com/api/v1/m/orders \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount_usd": 50.00,
"description": "Order #1234"
}'
Node.js
import SatsRail from 'satsrail';
const sr = new SatsRail('sk_test_...');
const order = await sr.orders.create({
amount_usd: 50.00,
description: 'Order #1234'
});
console.log(order.lightning_invoice);
Python
import satsrail
sr = satsrail.Client("sk_test_...")
order = sr.orders.create(
amount_usd=50.00,
description="Order #1234"
)
print(order.lightning_invoice)
Ruby
require "satsrail"
SatsRail.api_key = "sk_test_..."
order = SatsRail::Order.create(
amount_usd: 50.00,
description: "Order #1234"
)
puts order.lightning_invoice
Listen for Webhooks
Set up a webhook endpoint to get notified when payments complete, orders update, and more. SatsRail signs every webhook with HMAC-SHA256 so you can verify authenticity.
Webhook Guide →Go Live
When you're ready for production, swap your test keys for live keys:
-
Replace
sk_test_withsk_live_ -
Replace
pk_test_withpk_live_
That's it. Same code, real payments.