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 created state, 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 created transaction using its join code.The creator of the transaction can cancel a created transaction using its id. |
joined | A joined transaction 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 joined transaction. |
rejected | A rejected transaction is considered to be completed. | – | |
paid | A paid transaction requires a real tracking number for registered post before moving on to the next state. | tracked , cancelled_with_payment | The seller can track a paid transaction by submitting a tracking number for registered post. |
cancelled | A cancelled transaction is considered to be completed. | – | |
cancelled_with_payment | Transaction was cancelled after payment. | deposit_refunded | |
payment_refunded | A payment_refunded transaction is considered to be completed. | – | |
tracked | A tracked transaction is pending delivery of the registered post that was tracked. | delivered | The Trustap platform updates the state of a tracked transaction to delivered once delivery of the registered post has been confirmed. |
delivered | A delivered transaction 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 complained transaction 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_ended transaction is flagged for releasing funds immediately. | funds_released | Trustap will release the funds to the seller and will update the state to funds_released as soon as possible. |
funds_released | A funds_released transaction is considered to be completed. | – |