Transactions
The lifecycle of a money movement — buy, sell, swap, withdraw, deposit.
A transaction represents any movement of value through Blacksheep.
Types
| Type | Direction | API |
|---|---|---|
deposit | External → Blacksheep balance | (incoming, no API call) |
withdraw | Blacksheep balance → external account | transaction.submitWithdraw |
buy | Fiat → crypto | transaction.initiateSwap |
sell | Crypto → fiat | transaction.initiateSwap |
swap | Currency A → currency B (both held) | transaction.initiateSwap |
The type filter on transaction.getMany accepts all, buy, sell, withdraw, or deposit.
Lifecycle
Transactions progress through the following states:
PENDING— accepted and queuedCOMPLETED— settledFAILED— could not be completed (insufficient funds, rejected by counterparty, etc.)CANCELLED— cancelled before settlement
Listen for state transitions via Webhooks — polling transaction.get works but is wasteful.
Retries
Mutating endpoints do not accept a client idempotency key — the request schema is strict and rejects unknown fields. A retried initiateSwap / submitWithdraw is a new transaction, so guard against duplicates on your side (e.g. don't resend until the first call returns a transaction id or errors). Each successful mutation returns its new transaction id; reconcile against that.
Reading transactions
transaction.get— fetch a single transaction byidtransaction.getMany— list, filterable bytype,search, andrecipient_id, with an optionallimit(max 100). Returns{ transactions, totals? }.