Skip to main content
Use the SDK to build transaction views, reconciliation pipelines, or alerting systems. This guide covers listing, filtering, and updating transactions.

List transactions

Fetch transactions with optional filters for company, user, card, date range, and type:
In Go, Transactions.List returns *[]rainsdk.IssuingTransactionUnion. Use txn.AsAny() to switch over the concrete variant (IssuingTransactionSpend, IssuingTransactionCollateral, IssuingTransactionPayment, IssuingTransactionFee), or call accessors like txn.AsSpend() directly when you only care about one type. Rain has four transaction types: Each type has its own nested object (e.g., txn.spend, txn.collateral) with type-specific fields.

Filter by date range

Use authorizedAfter, authorizedBefore, postedAfter, and postedBefore to scope results:
In Go, date filters are param.Opt[time.Time] — parse strings with time.Parse and wrap with rainsdk.Time(...).

Paginate through results

For large result sets, use cursor-based pagination:
See Configuration — Pagination for more details.

Get transaction details

Retrieve a single transaction by ID:

Update a transaction

Add a memo to a transaction for internal tracking:
To attach a receipt, upload it through the receipt sub-resource:

React to transactions in real time

Use the SDK to pull data from the API. For real-time transaction events, configure webhooks in the Dashboard. Rain sends notifications for authorization requests, status changes, and settlements.
For real-time authorization decisions (approve/decline), see Authorizing Transactions. This requires a webhook endpoint, not the SDK.

What’s next

Viewing Transactions

Full guide to transaction data and reporting fields.

Transaction Lifecycle

How transactions flow from authorization to settlement.

Reporting Fields

Reference for all transaction export fields.