Starship Rewards API Documentation
Complete B2B API documentation for the Starship Rewards platform
Starship Rewards API Documentation
Welcome to the Starship Rewards B2B API documentation. This comprehensive guide covers all aspects of integrating with the Starship Rewards platform for gift cards.
Quick Start
Get started with the Starship Rewards API in just a few steps:
- Set Up API Keys - Generate your API Key & Secret from the Client Portal
- Explore Products - Browse the product catalog
- Calculate Charges - Get pricing and fees for orders
- Place Orders - Create orders for vouchers
- Fetch Vouchers - Retrieve delivered vouchers from orders
- Set Up Webhooks - Receive real-time order status notifications
Product Ecosystem
The Starship Rewards API has different parts:
-
Gift Cards
Digital and physical gift cards from major retailers worldwide. Access thousands of brands across multiple categories with real-time availability and instant delivery options.
-
Payouts
Send money directly to beneficiaries via bank transfers, mobile money, and digital wallets. Perfect for disbursements, refunds, rewards, and incentive payments across multiple countries and currencies.
Base URL
All API endpoints are relative to the environment specific hosts:
Production:
{{host}}Sandbox:
https://api-playground.starshiprewards.comAuthentication
All API endpoints require your API Key and Secret in request headers:
X-API-Key: sk_live_your_api_key_here
X-API-Secret: your_api_secret_hereOptionally, enable HMAC request signing for tamper-proof requests. See the full Authentication guide for setup instructions and migration path.
Response Format
Successful Responses
For single resources:
{
"id": 1,
"name": "Resource Name",
"created_at": "2024-01-01T00:00:00Z"
}For collections, data is returned as an array with pagination in headers:
Response Headers
X-Page: 1
X-Per-Page: 50
X-Total-Count: 195
X-Total-Pages: 4
X-Page-Size: 50
X-Has-More: trueResponse Body
[
{
"id": 1,
"name": "Item 1"
},
{
"id": 2,
"name": "Item 2"
}
]Pagination Headers
| Header | Type | Description |
|---|---|---|
| X-Page | number | Current page number |
| X-Per-Page | number | Requested items per page |
| X-Total-Count | number | Total number of items |
| X-Total-Pages | number | Total number of pages |
| X-Page-Size | number | Actual items in current page |
| X-Has-More | boolean | Whether more pages exist |
Query Parameters
For paginated endpoints:
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number to retrieve |
| limit | number | 50 | Items per page (max: 10000) |
| search | string | - | Search filter (where applicable) |
| sort | object | {"field":"id","direction":"desc"} | Sort configuration |
Error Handling
The API uses standard HTTP status codes and returns error details in JSON format:
Error Response Format
{
"error": "validation_error",
"message": "Invalid request parameters",
"details": {
"field_name": ["Error message 1", "Error message 2"]
}
}Common Status Codes
| Status Code | Description |
|---|---|
| 200 OK | Request successful |
| 201 Created | Resource created successfully |
| 400 Bad Request | Invalid request parameters |
| 401 Unauthorized | Missing or invalid authentication |
| 403 Forbidden | Insufficient permissions |
| 404 Not Found | Resource not found |
| 429 Too Many Requests | Rate limit exceeded |
| 500 Internal Server Error | Server error |
Rate Limiting
- Rate Limit: 1000 requests per hour per API key
- Burst Limit: 100 requests per minute
- Rate limit information is included in response headers:
X-RateLimit-Limit: Maximum requests allowedX-RateLimit-Remaining: Requests remainingX-RateLimit-Reset: Unix timestamp when limit resets
Available Endpoints
Authentication
- All
/api/v1/*endpoints - Authenticated viaX-API-Key+X-API-Secretheaders - Optional
X-Signatureheader for HMAC-signed requests
Reference Data
GET /api/v1/countries- List all countriesGET /api/v1/countries/{id}- Get country detailsGET /api/v1/currencies- List all currenciesGET /api/v1/categories- List all categoriesGET /api/v1/categories/{id}- Get category detailsGET /api/v1/subcategories- List all subcategoriesGET /api/v1/subcategories/{id}- Get subcategory details
Products
GET /api/v1/products- List all productsGET /api/v1/products/{id}- Get product detailsPOST /api/v1/products/{id}/charges- Calculate charges for a productPOST /api/v1/products/{id}/discount- Get available discounts
Wallets
GET /api/v1/wallets- List client walletsGET /api/v1/wallets/{id}- Get wallet details
Transactions
GET /api/v1/transactions- List transactionsGET /api/v1/transactions/{id}- Get transaction details
Payouts
GET /api/v1/beneficiaries- List saved beneficiariesPOST /api/v1/beneficiaries- Create a new beneficiaryGET /api/v1/beneficiaries/{id}- Get beneficiary detailsDELETE /api/v1/beneficiaries/{id}- Delete a beneficiaryGET /api/v1/payouts- List payoutsPOST /api/v1/payouts- Create a new payoutGET /api/v1/payouts/{id}- Get payout detailsPOST /api/v1/payouts/{id}/cancel- Cancel a payout
Best Practices
- Secure Credentials: Store API keys and secrets in environment variables or a secrets manager
- Error Handling: Always handle rate limiting and network errors gracefully
- Pagination: Use pagination headers to navigate large result sets efficiently
- Caching: Cache reference data (countries, currencies) locally when possible
- Webhooks: Use webhooks instead of polling for order status updates
- HMAC Signing: Enable HMAC request signing for production integrations
Support
Need help with integration?
- Technical Documentation: Browse our comprehensive API Reference
- Code Examples: Check the examples in each endpoint documentation
- Support Team: Contact technical support for assistance
- Status Page: Monitor API status and incidents
Ready to get started? Begin with Authentication to set up your API access.