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:
- Obtain API Credentials - Get your API username and password from the dashboard
- Authenticate - Exchange credentials for access tokens
- Explore Products - Browse the product catalog
- Calculate Charges - Get pricing and fees for orders
- Check Product Availability - Verify product stock before ordering
- Place Orders - Create orders for vouchers
- Fetch Vouchers - Retrieve delivered vouchers from orders
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
Most API endpoints require a Bearer token in the Authorization header:
Authorization: Bearer your_access_tokenPublic endpoints (no authentication required):
POST /auth/login- Exchange credentials for tokensPOST /auth/refresh- Refresh access tokensGET /status- Health check endpoint
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
POST /auth/login- Authenticate with credentialsPOST /auth/refresh- Refresh access tokenPOST /auth/logout- Revoke all tokens
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
- Token Management: Implement automatic token refresh before expiration
- 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
- Security: Never expose API credentials in client-side code
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.