Skip to content
Last updated

Transaction lifecycle

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 -i -X GET \
    -u '<API_KEY>:' \
    'https://api.test.trustap.com/v2/transactions/{transaction_id}'

Interactive status transition map

createdcreatedjoinedjoinedcancelledcancelledrefundedrefundedpaidpaidpayment_acceptedpayment_acceptedtrackedtrackeddelivereddeliveredseller_handover_confirmedseller_handover_confirmedbuyer_handover_confirmedbuyer_handover_confirmedcomplaint_submittedcomplaint_submittedcomplaint_period_endedcomplaint_period_endedfunds_releasedfunds_released
Caller
Buyer
Seller
Buyer and/or Seller
Trustap
Connection types
Next possible status
Possible previous status
Status DescriptionNext possible statusTransitions
created 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.joined, cancelledA Trustap user other than the creator can join a created transaction. 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, paidThe buyer can pay a deposit for, or cancel, a joined transaction.
A paid transaction is one where a buyer has paid for a transaction.payment_accepted, cancelled
cancelled A cancelled transaction is a transaction where one of the buyer or seller has decided not to continue the transaction. A cancelled transaction is considered to be completed in most transactions. If a transaction has been paid, then the transaction will from cancelled to refunded.refunded
payment_accepted A payment_accepted transaction waits for the seller to set the pricing for the transaction before progressing.tracked,buyer_handover_confirmed,buyer_handover_confirmed,cancelledAccept a deposit for, or cancel, a paid transaction.
tracked A tracked transaction has received a tracking tracking number from a seller.delivered
cancelled A cancelled transaction is one that has been cancelled after its deposit has been paid.refundedThe Trustap platform updates the state of a cancelled transaction to refunded once the deposit has been refunded to the buyer.
refunded A refunded transaction is considered to be completed.
delivered A delivered transaction is one that has been confirmed that have been delivered to a buyer.complained, complaint_period_ended
  • The buyer can complain about a buyer_handover_confirmed or seller_handover_confirmed transaction before the complaints period ends.
  • The seller can confirm the handover of the goods.
seller_handover_confirmed A seller_handover_confirmed transaction gives the seller an opportunity to verify the item they have received. Once the item has been received, the Trustap platform begins a "complaints period".complained, complaint_period_ended
  • The buyer can complain about a buyer_handover_confirmed or seller_handover_confirmed transaction before the complaints period ends.
  • If no such complaint occurs before the complaints period ends then the Trustap platform will release the funds for the transaction to the seller and will update the state to funds_released.
buyer_handover_confirmed A buyer_handover_confirmed transaction gives the buyer an opportunity to verify the item they have received. Once the item has been received, the Trustap platform begins a "complaints period".complained, complaint_period_ended
  • The buyer can complain about a buyer_handover_confirmed or seller_handover_confirmed transaction before the complaints period ends.
  • If no such complaint occurs before the complaints period ends then the Trustap platform will release the funds for the transaction to the seller and will update the state to funds_released.
complaint_submitted A complaint_submitted transaction is registered with Trustap for conflict resolution.funds_released, refundedAfter arbitration, Trustap will release the funds to the buyer and/or seller in a certain ratio and will update the state to funds_released.
funds_released A funds_released transaction is considered to be completed.
complaint_period_ended The time window to file a complaint has ended.funds_released_released