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
The Ruby SDK is available today. Node.js and Python SDKs are on the roadmap.
# Ruby
gem install satsrail
Working in another language? Use the REST API directly with curl, fetch, requests, or whatever HTTP client your stack provides.
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"
}'
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.