List transactions
Fetch transactions with optional filters for company, user, card, date range, and type: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
UseauthorizedAfter, authorizedBefore, postedAfter, and postedBefore to scope results:
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:Get transaction details
Retrieve a single transaction by ID:Update a transaction
Add a memo to a transaction for internal tracking: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.