Every transaction has a lifecycle where it moves from one state to another. Depending on the state, users can perform different actions. Usually, there is one action which moves the transaction further and one action for cancelling the transaction. If the transaction is cancelled and there is payment, the buyer gets refunded automatically (usually within 1 hour).
The status of a transaction is stored in the transaction object.
  curl --location 'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}' \
  --user '<API_KEY>:'Caller
Buyer
Seller
Buyer and/or Seller
Trustap
Connection types
Next possible status
Possible previous status
| Status | Description | Next Possible Statuses | Transitions | 
|---|---|---|---|
| created | Online transactions start off in the createdstate, and will have either a "seller" or a "buyer" user (the user who created the transaction) linked to it. Online transactions have a "join code" while in this state. | joined,cancelled,rejected | A Trustap user other than the creator can join or reject a createdtransaction using its join code.The creator of the transaction can cancel a createdtransaction using its id. | 
| joined | A joinedtransaction is one that has both a seller and a buyer user linked to it, and requires payment before moving on to the next state. | cancelled,deposit_paid | The buyer can pay for a joinedtransaction. | 
| rejected | A rejectedtransaction is considered to be completed. | – | |
| paid | A paidtransaction requires a real tracking number for registered post before moving on to the next state. | tracked,cancelled_with_payment | The seller can track a paidtransaction by submitting a tracking number for registered post. | 
| cancelled | A cancelledtransaction is considered to be completed. | – | |
| cancelled_with_payment | Transaction was cancelled after payment. | deposit_refunded | |
| payment_refunded | A payment_refundedtransaction is considered to be completed. | – | |
| tracked | A trackedtransaction is pending delivery of the registered post that was tracked. | delivered | The Trustap platform updates the state of a trackedtransaction todeliveredonce delivery of the registered post has been confirmed. | 
| delivered | A deliveredtransaction gives the buyer an opportunity to verify the item they have received. Once the item has been delivered, the Trustap platform begins a "complaints period". | funds_released,complained,complaint_period_ended | 
 | 
| complained | A complainedtransaction is registered with Trustap for conflict resolution. | funds_released,deposit_refunded | After arbitration, Trustap will release the funds to the buyer and/or seller in a certain ratio and will update the state to funds_released. | 
| complaint_period_ended | A complaint_period_endedtransaction is flagged for releasing funds immediately. | funds_released | Trustap will release the funds to the seller and will update the state to funds_releasedas soon as possible. | 
| funds_released | A funds_releasedtransaction is considered to be completed. | – |