Transactions guide
What this resource is for
Transactions are the central record of qualifying activity. They include gift card purchases, affiliate purchases, cashback activity, commission adjustments and status changes.
When to use it
- Show a customer their activity and earnings.
- Reconcile your records with Spendstream.
- Recover from missed webhooks.
- Mark a transaction as paid when your account uses that workflow.
Important implementation notes
- Store the Spendstream transaction identifier against your own records.
- Update your local record when
TRANSACTION_UPDATEDarrives. Deduplicate on the transaction identifier plus status, because webhooks carry no event identifier. - No retry or backoff exists for webhooks today. Run a periodic reconciliation with
getTransactionsList. - Results are paginated at 50 per page. Follow the next link.
- Despite its name,
getTransactionsByIdreturns a summary for a user, not a single transaction. UsegetTransactionsListfor individual records.
Bash
curl -G "https://staging-api.spendstream.io/v2/getTransactionsList" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "User-Agent: YourApp/1.0" \
--data-urlencode "UID=YOUR_CUSTOMER_ID"
Common mistakes
- Relying only on webhooks with no reconciliation.
- Treating the first status as final for affiliate transactions.
- Expecting
getTransactionsByIdto return one transaction.
Related resources
- Users
- Cashback
- Gift Cards
- Balances
Endpoint reference
The v2 endpoints for this resource are getTransactionsList, getTransactionsById and markAsPaid. Exact parameters, schemas and responses are in the API reference.
Was this section helpful?
On this page
- Transactions guide