Starship Rewards API

Transactions API

Query wallet transaction history and retrieve detailed transaction information

Transactions API

The Transactions API gives you your wallets' transaction history: every credit and debit, with currency-conversion details where they apply.

Overview

The Transactions API consists of two endpoints:

  • List Transactions - Retrieve paginated transaction history with filtering options
  • Get Transaction by ID - Get a single transaction

Both endpoints only ever return your own client's transactions.

All dates are UTC. created_at is returned in UTC (2025-01-15T10:30:00Z), and a date-only from_date / to_date filter is interpreted as a UTC calendar day.

List Transactions

Retrieve a paginated list of transactions, newest first by default.

Endpoint

GET /api/v1/transactions

Authentication: API Key + Secret required

Query Parameters

These are the only filters the endpoint accepts. Any other query parameter is ignored.

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Items per page (min: 1, max: 10,000). page_size is accepted as an alias.
transaction_typestring-CREDIT or DEBIT (case-insensitive). type is accepted as an alias. Any other value returns 400.
statusstring-Exact match on status, case-insensitive: PENDING, COMPLETED or FAILED. A value that matches no status returns an empty list.
wallet_idinteger-Only transactions on this wallet. Must be a positive integer, otherwise 400.
currency_idinteger-Only transactions in this currency. Must be a positive integer, otherwise 400.
searchstring-Case-insensitive substring match on remarks
from_datestring-Earliest created_at, inclusive. YYYY-MM-DD (start of that day, UTC) or an RFC 3339 timestamp. Any other format returns 400.
to_datestring-Latest created_at, inclusive. YYYY-MM-DD covers that whole UTC day; an RFC 3339 timestamp is used as given. Any other format returns 400.
sortJSON object{"field":"id","direction":"DESC"}Sort configuration (see below).
sort_by / sort_dirstring-Non-JSON alternative to sort, e.g. sort_by=created_at&sort_dir=ASC. sort_order is accepted for sort_dir.

RFC 3339 timestamps may carry any offset (2025-01-15T10:00:00+05:30); the offset is honoured.

Sort Object Format

{
  "field": "id",
  "direction": "DESC"
}

Use id, amount or created_at as field; direction is ASC or DESC. Malformed sort JSON or a direction other than ASC/DESC returns 400.

Response

Success Response (200 OK)

Headers:

X-Page: 1
X-Per-Page: 50
X-Total-Count: 150
X-Total-Pages: 3
X-Page-Size: 50
X-Has-More: true

Response Body:

[
  {
    "id": 1003,
    "wallet_id": 102,
    "currency_id": 2,
    "amount": 100.00,
    "transaction_type": "CREDIT",
    "status": "COMPLETED",
    "source_currency": "USD",
    "destination_currency": "EUR",
    "forex_rate": 0.92,
    "conversion_charges": 2.50,
    "remarks": "Forex conversion from USD wallet",
    "created_at": "2025-01-15T12:00:00Z"
  },
  {
    "id": 1002,
    "wallet_id": 101,
    "currency_id": 1,
    "amount": 25.00,
    "transaction_type": "DEBIT",
    "status": "COMPLETED",
    "remarks": "Order #12345 - Amazon Gift Card",
    "created_at": "2025-01-15T11:45:00Z"
  },
  {
    "id": 1001,
    "wallet_id": 101,
    "currency_id": 1,
    "amount": 500.00,
    "transaction_type": "CREDIT",
    "status": "COMPLETED",
    "remarks": "Wallet funding via bank transfer",
    "created_at": "2025-01-15T10:30:00Z"
  }
]

Response Fields

FieldTypeDescription
idnumberUnique transaction identifier
wallet_idnumberAssociated wallet ID
currency_idnumberCurrency ID for the transaction
amountnumberTransaction amount. Always a positive magnitude; transaction_type gives the direction.
transaction_typestringCREDIT (funds into the wallet) or DEBIT (funds out of the wallet)
statusstringPENDING, COMPLETED or FAILED
source_currencystringSource currency code for a conversion. Omitted when not set.
destination_currencystringDestination currency code for a conversion. Omitted when not set.
forex_ratenumberExchange rate applied. Omitted when not set.
conversion_chargesnumberCharges for the currency conversion. Omitted when not set.
remarksstringFree-text description of the transaction
created_atstringTransaction time, RFC 3339 in UTC

Transaction Types

TypeEffect on walletSign of amount
CREDITFunds addedPositive
DEBITFunds removedPositive — subtract it yourself

To compute a net movement, add CREDIT amounts and subtract DEBIT amounts. Do not infer direction from the sign of amount.

Transaction Status

StatusDescription
PENDINGTransaction initiated, awaiting processing
COMPLETEDTransaction successfully completed
FAILEDTransaction failed

Pagination Headers

HeaderDescription
X-PageCurrent page number
X-Per-PageItems per page
X-Total-CountTotal number of matching transactions
X-Total-PagesTotal number of pages
X-Page-SizeNumber of items on this page
X-Has-MoreWhether more pages are available

Error Responses

400 Bad Request — a filter value was rejected. message names the parameter:

{
  "error": {
    "name": "BadRequestError",
    "code": "BAD_REQUEST",
    "message": "transaction_type must be CREDIT or DEBIT",
    "messages": {}
  }
}
Causemessage
transaction_type / type not CREDIT or DEBITtransaction_type must be CREDIT or DEBIT
wallet_id not a positive integerwallet_id must be a positive integer
currency_id not a positive integercurrency_id must be a positive integer
from_date not YYYY-MM-DD or RFC 3339from_date: must be YYYY-MM-DD or RFC 3339
to_date not YYYY-MM-DD or RFC 3339to_date: must be YYYY-MM-DD or RFC 3339
bad page, limit or sortInvalid query parameters

500 Internal Server Error — the message is generic and messages.request_id carries a reference for support.

Examples

# First page of transactions, default pagination
curl -sS "$HOST/api/v1/transactions" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Secret: $API_SECRET"

# Debits on one wallet during January 2025 (UTC days, both ends inclusive)
curl -sS "$HOST/api/v1/transactions?wallet_id=101&transaction_type=DEBIT&from_date=2025-01-01&to_date=2025-01-31" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Secret: $API_SECRET"

# Completed transactions in one currency, 20 per page
curl -sS "$HOST/api/v1/transactions?currency_id=1&status=COMPLETED&limit=20&page=1" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Secret: $API_SECRET"

# Remarks mentioning an order, oldest first
curl -sS "$HOST/api/v1/transactions?search=Order%20%2312345&sort_by=created_at&sort_dir=ASC" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Secret: $API_SECRET"

Get Transaction by ID

Retrieve a single transaction.

Endpoint

GET /api/v1/transactions/:id

Authentication: API Key + Secret required

Path Parameters

ParameterTypeRequiredDescription
idnumberYesUnique transaction identifier

Response

Success Response (200 OK)

{
  "id": 1003,
  "wallet_id": 102,
  "currency_id": 2,
  "amount": 100.00,
  "transaction_type": "CREDIT",
  "status": "COMPLETED",
  "source_currency": "USD",
  "destination_currency": "EUR",
  "forex_rate": 0.92,
  "conversion_charges": 2.50,
  "remarks": "Forex conversion from USD wallet",
  "created_at": "2025-01-15T12:00:00Z"
}

Response Fields

Same as the List Transactions response fields.

Error Responses

400 Bad Request — id is not a non-negative integer:

{
  "error": {
    "name": "BadRequestError",
    "code": "BAD_REQUEST",
    "message": "Invalid transaction ID",
    "messages": {}
  }
}

404 Not Found — no transaction with that id belongs to you:

{
  "error": {
    "name": "NotFoundError",
    "code": "NOT_FOUND",
    "message": "Transaction not found",
    "messages": {}
  }
}

Examples

curl -sS "$HOST/api/v1/transactions/1003" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Secret: $API_SECRET"

Implementation Notes

Amounts and direction

  • amount is always a positive magnitude, for credits and debits alike.
  • transaction_type is the only indicator of direction: CREDIT adds to the wallet, DEBIT removes from it.

Reconciliation

Pull a day with from_date=YYYY-MM-DD&to_date=YYYY-MM-DD (the same date twice covers that full UTC day) and page until X-Has-More is false. Remember that the day boundary is UTC midnight, not your local midnight.

Rate Limiting

The Transactions API has no dedicated allowance. Both endpoints draw on the general client-API budget (default 1,000 requests per hour per API key), shared with every other /api/v1/* endpoint. See Rate Limits.

Next Steps

Integration Support

For immediate assistance with transaction operations:

  • API Status: Check system status at status.starship.com
  • Technical Support: Contact support@starshiprewards.com
  • Emergency Support: Use priority support channel for critical issues