Guides
Getting Started
Get up and running with the Bitcoin Rewards API in under 5 minutes. This guide covers authentication and your first API call.
Get your API key
Create an API key in your Affiliate Dashboard. Your key will look like:
sk_live_fn52fHoH3E7qOY8x_aBcDeFgHiJkLmNoPqRsTuVwXyZ
The full key is shown only once, when you create it, so copy it somewhere safe. If you lose it, regenerate it from the dashboard. Keep it secret: use it from a server, never in browser code.
Test your key
Verify your API key is working with the test endpoint:
curl https://affiliates.bitcoinrewards.app/api/key-test \-H "Authorization: Bearer sk_live_YOUR_KEY_HERE"
Success response:
{"success": true,"message": "API key is valid","key": {"id": 42,"name": "My Production Key","affiliateId": "123456","readOnly": true}}
Fetch your businesses
Get all businesses you're affiliated with, including display-ready data:
curl https://affiliates.bitcoinrewards.app/api/get-business-rewards \-H "Authorization: Bearer sk_live_YOUR_KEY_HERE"
The response includes everything you need:
[{"name": "Amazon","slug": "amazon","logoUrl": "https://example.com/amazon-logo.png","website": "https://amazon.com","isCurrentlyOfferingRewards": true,"rewards": {"headlinePercent": 5,"basePercent": 3,"maxPercent": 8,"hasVipTiers": true,"hasReferralBonus": true},"referralUrl": "https://amazon.com?ref=ABC123&utm_source=oshi&...","handoffUrl": "https://oshi.link/ABC123","affiliateSignupUrl": "https://oshi.link/a/abc123def456"}]
See the API Reference for the complete response schema including products, images, and all reward fields.
Key response fields
| Field | Description |
|---|---|
referralUrl | Pre-built URL with tracking params. Redirect users here to earn commission. |
rewards.headlinePercent | Main percentage to display. See Rewards Display Guide. |
affiliateSignupUrl | Merchant-specific affiliate signup page. Share to invite others to become affiliates. |
isCurrentlyOfferingRewards | Whether the business is active. Only display if true. |
Next steps
- Rewards Display Guide — How to display rewards with accurate messaging
- Full API Reference — Complete documentation with all fields and error codes
- AI-friendly docs — Plain text format for LLMs and AI coding assistants
- OpenAPI spec — Machine-readable JSON specification