From zero to accepting Bitcoin in under 10 minutes.
Sign up for a free SatsRail merchant account. No bank approval, no credit checks.
Create Account →From your merchant dashboard, go to API Keys to find your keys:
sk_live_
or
sk_test_
(keep this server-side, never expose to clients)
pk_live_
or
pk_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.
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.
curl -X POST https://satsrail.com/api/v1/orders \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"amount_usd": 50.00,
"description": "Order #1234"
}'
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);
import satsrail
sr = satsrail.Client("sk_test_...")
order = sr.orders.create(
amount_usd=50.00,
description="Order #1234"
)
print(order.lightning_invoice)
require "satsrail"
SatsRail.api_key = "sk_test_..."
order = SatsRail::Order.create(
amount_usd: 50.00,
description: "Order #1234"
)
puts order.lightning_invoice
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 →When you're ready for production, swap your test keys for live keys:
sk_test_
with
sk_live_
pk_test_
with
pk_live_
That's it. Same code, real payments.