Transactions and Payments

A transaction is an abstraction that we inherited from Stellar that represents a command(or operation) to modify the state of the blockchain. Transactions are used to create accounts, send payments, emit assets, authorize actions in another account, and everything related to the account and financial data in the blockchain.

Transactions are made up of a list of operations. Each operation is an individual command that mutates the ledger.

Here are the possible operation types:

Transaction TypeDescription
create_accountInternal operation to create a Wallet in the blockchain network
change_trustInternal operation to handle trust lines between Wallets in the blockchain network
paymentOperation to emit, destroy or transfer an amount in a specific asset to a destination account.

Payments

Any operation over Assets of the platform are done with Payments. A payment has always a single source Wallet, but can have any number of different recipients (up to 100).

Here are the possible payment types:

Payment TypeDescription
transferA transfer is a peer-to-peer(P2P) transaction between two users from the the system.
* Can be a credit of a debit depending on the source wallet.
depositA deposit is a credit that came from a external bank. The source user is always the Bit Capital Issuer.
withdrawA withdrawal is a debit that references a user sending money to a external bank. The destination user is always the Bit Capital Issuer.
boletoA debit that is a boleto that was paid inside the system.
service_feeA service fee is a fee charged from a user based on the billing service. It can be either a credit or a debit depending on the source wallet.
authorized_cardThis is the type of transaction that references a debit from a card transaction approved using external authorizer.
authorized_card_reversalThis is the type of transaction that references a credit from a card transaction reversal approved using external authorizer.
transaction_reversalA transaction reversal is the default payment type for refund operations, everytime a transaction is refunded it'll be created a transaction_reversal with the additionalData referencing the original transaction.
cardA debit from a card transaction that came from the internal authorizer.
manual_adjustmentA manual adjustment is a type of operation used by the Bit Capital team internally if it some user for some reason needs a manual adjustment in their balance, can either be a credit of a debit.
phone_creditA debit referred to a phone credit recharge.

Transaction States

Every transaction follows a set of states from it's creating to it's execution of error. It's really important to understand the difference between this states to avoid confusing to the users.

473
Transaction StateDescription
pendingThe transaction was created, but the money is not locked yet.
authorizedThe system already locked the amount of money for the transaction and requested to the custody provider, but it did not receive the confirmation of execution yet.
acceptedThe system received the acceptance from the counter-part and it's starting the settlement process.
executedThe system received the confirmation of the execution of the transaction in the custody provider and registered it on the blockchain.
From this point forward this transaction can't be reversed and to refund the user it'll need to be created a transaction_reversal
notifiedThe transaction was executed successfully, registered in the blockchain and notified via postbacks to the mediator.
reversedThe transaction was reversed and the amount returned to the user.
If the transaction is in this state it'll not be accounted for in the balance as a debit.
failedThe transaction failed to be executed for some reason.
If the transaction is in this state it'll not be accounted for in the balance as a debit.

User defined data

When requesting a new transaction, you can add some custom user defined data to it using the extra property. All data must be JSON and only numbers and strings are accepted values.