Transactions

Transactions are created for funds that come into or flow out of your Speed account balance. This makes it easy to manage payments and reconcile your business transactions regularly. Overall, it provides insight into the payouts and payments of your business.

Types of transactions

The attribute type in the response body of the transaction object indicates the type of the balance. Let’s learn more about the different types of transactions.

Currently, there are following types of transactions:

TypeCredit / DebitRemarks
PaymentCreditPayment is when you receive funds from your merchant.
PayoutDebitPayout is when funds move from your Speed account to your chosen crypto wallet.
FeesDebitFees are when the transaction fees are debited from your account because of the on-chain fund transfer.
Swap outDebitThe amount that needs to be converted is known as the Swap Out amount when you swap your balance amount from BTC to USDC or vice-versa.
Swap inCreditThe converted amount is the Swap in amount when users swap their balance from BTC to USDC or vice-versa.
Transfer outDebitTransaction has this type when the amount is sent from your account.
Transfer inCreditTransaction has this type when the amount is received by your account.
Affiliate fee inCreditTransaction has this type when your account, as an affiliate partner, receives a commission amount.
Affiliate fee outDebitTransaction has this type when you have an affiliate partner enabled account and have paid a commission amount.
WithdrawDebitTransaction has this type when the user successfully withdraws their accumulated funds via payout, withdraw link or cashback.
Withdraw ReversalCreditTransaction has this type when the withdrawal processing fails. after deducting amount from the user’s account balance. The amount for this transaction would be same as respective failed withdraws’ amount.
Network Fees ReversalCreditTransaction has this type when the withdrawal processing fails after deducting network fee from user’s account balance. The amount for this transaction would be same as network fee deducted for a withdraw.

Retrieve transactions via web application

Log in to your account and follow the steps below to retrieve a list of all the transactions.

  1. On the left sidebar, click Transactions.
  2. This will take you to the transaction page, where you can see all the transactions moving through your Speed account.

Retrieve transactions via API

The /balance_transaction endpoint can be used to retrieve information about the transactions like target_currency (currently only SATS), source, type, and so on. You can use the pagination parameters: starting_after, limit, and ending_before to get the desired list of transactions if the has_more attribute is true.

Response

{
  "object": "list",
  "has_more": false,
  "data": [
   {
            "id": "txn_l8bew06lQiivPCGE",
            "object": "balance_transaction",
            "amount": 866.0000000000000000,
            "fee": 0.0000000000000000,
            "net": 866.0000000000000000,
            "target_currency": "SATS",
            "type": "Payment",
            "transaction_type": "credit",
            "source": "pi_l8bevp7cidnRAs8G",
            "created": 1663751840493
   },
  ]
}

Attributes

Your response contains the following attributes:

has_more boolean
If there are more transactions than returned in the response, it has the value true; otherwise, it has the value false.


id string
Unique identifier for the object.


object string
This indicates to which entity this response belongs.


amount BigDecimal
The total amount of this transaction.


fee BigDecimal
This specifies Speed fee applied during this transaction.


net BigDecimal
The net amount received/paid in this transaction after the deduction of fees.


target_currency string
The cryptocurrency in which the amount/fees/net is expressed. As of now, Speed only supports SATS.


type string
Categorizes the transactions based on activities like payment, payout, transfer or others.


transaction_type string
Categorizes the transactions based on whether funds are credited or debited.


source string
Contains the ID of the related resource that initiated the transaction.


created timestamp
Time at which the transaction object was created.


How do transactions affect the balance?

If a debit or credit transaction is currently processing in an account and another transaction is requested simultaneously, the new transaction will not be processed until the current transaction is completed. This means that such a newer transaction would fail and prompt you with an error. Also, If the ongoing transaction fails for any reason, the withdrawal will be reversed, and the transaction amount along with network fees will be restored to the account balance.

Balances

One record of the available balance in of your account is first displayed here by default, and it is in BTC. If you swap this available balance, there can be 2 cases:

  1. You can swap the full BTC amount into USDC.
  2. You can swap some BTC amount into USDC. There will be two records in available balance, each for BTC and USDC.

There will be two records in available balance, each for BTC and USDC. You can perform similar SWAP from USDC to BTC.

For the available balance in BTC or USDC, you can also carry out operations like Payout and Transfer.