# Face-to-face 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. Face-to-face transaction status ```cURL curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/{transaction_id}' \ --user ':' ``` Response ```JSON { "buyer_handover_confirmed": "2019-12-25T16:00:00Z", "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "client_id": "34356456775676", "created": "2019-12-25T09:00:00Z", "currency": "eur", "deposit_accepted": "2019-12-25T12:00:00Z", "deposit_paid": "2019-12-25T11:00:00Z", "deposit_pricing": { "charge": 78, "price": 1234 }, "description": "Soccer ticket", "funds_released": "2019-12-25T17:00:00Z", "id": 1309, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "priced": "2019-12-25T13:00:00Z", "pricing": { "charge": 190, "price": 5000 }, "remainder_paid": "2019-12-25T14:00:00Z", "seller_handover_confirmed": "2019-12-25T15:00:00Z", "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "skip_remainder": false, "status": "funds_released" } ``` ## Interactive status transition map | Status | Description | Next possible status | Transitions | | --- | --- | --- | --- | | `created` | Face-to-face 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. Face-to-face transactions have a "join code" while in this state. | `joined`, `cancelled` | A Trustap user other than the creator can [join](/apis/openapi/f2f-transactions/joinp2ptransactionbyjoincode) or [reject](/apis/openapi/f2f-transactions/rejectp2ptransactionbyjoincode) 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 a deposit](/apis/openapi/f2f-payment/p2p.paydepositwithbalancefortransaction) for, or cancel, a `joined` transaction. | | `rejected` | A `rejected` transaction is considered to be completed. | – | | | `priced` | A `priced` transaction is one that has had pricing information set, and requires payment before moving on to the next state. | `remainder_paid`, `cancelled_with_deposit`, `remainder_skipped` | The buyer can [pay the remainder](/apis/openapi/f2f-payment/p2p.payremainderwithbalancefortransaction) of the transaction, or cancel, a `joined` transaction. | | `deposit_paid` | A `deposit_paid` transaction waits for the seller to accept the buyer's deposit before progressing. | `deposit_accepted`, `cancelled_with_deposit` | The seller can [accept a deposit](/apis/openapi/f2f-payment/acceptdepositforp2ptransaction) for, or cancel, a `deposit_paid` transaction. | | `cancelled` | A `priced` transaction is one that has had pricing information set, and requires payment before moving on to the next state. | – | The buyer can [pay the remainder](/apis/openapi/f2f-payment/p2p.payremainderwithbalancefortransaction) of the transaction, or cancel, a `joined` transaction. | | `deposit_accepted` | A `deposit_accepted` transaction waits for the seller to set the pricing for the transaction before progressing. | `priced`, `remainder_skipped`, `cancelled_with_deposit` | * The seller can [skip the remainder step](/apis/openapi/f2f-payment/skipremainderforp2ptransaction) after the deposit is accepted, instead of setting a price for the transaction. If the transaction was created with `"skip_remainder": true`, then this transition occurs automatically as soon as the deposit is accepted. * The seller can [set the pricing](/apis/openapi/f2f-multi-use-listings/setp2pmultiuselistingpricing) of the transaction, or cancel a `deposit_accepted` transaction. | | `remainder_skipped` | A `remainder_skipped` transaction is one that is pending handover confirmation, primarily from the seller. A complaint can also be submitted by the buyer at this point. | `buyer_handover_confirmed`, `seller_handover_confirmed`, `complained` | The buyer and seller can both [confirm the handover](/apis/openapi/f2f-handover/p2p.confirmhandover) of the goods. | | `remainder_paid` | A `remainder_paid` transaction is one that is pending handover confirmation, primarily from the seller. A complaint can also be submitted by the buyer at this point. | `buyer_handover_confirmed`, `seller_handover_confirmed`, `complained` | | | `cancelled_with_deposit` | A `cancelled_with_deposit` transaction is one that has been cancelled after its deposit has been paid. | `deposit_refunded` | The Trustap platform updates the state of a `cancelled_with_deposit` transaction to `deposit_refunded` once the deposit has been refunded to the buyer. | | `deposit_refunded` | A `deposit_refunded` transaction is considered to be completed. | – | | | `buyer_handover_confirmed` | A `buyer_handover_confirmed` transaction is one that is still pending the seller handover confirmation. | `complained`, `complaint_period_ended` | * The buyer can [complain](/apis/openapi/f2f-complaint/p2p.submitcomplaint) about a `buyer_handover_confirmed` or `seller_handover_confirmed` transaction before the complaints period ends. * The seller can [confirm the handover](/apis/openapi/f2f-handover/p2p.confirmhandover) of the goods. | | `seller_handover_confirmed` | A `seller_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`, `funds_released` | * The buyer can [complain](/apis/openapi/f2f-complaint/p2p.submitcomplaint) 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`. * The buyer can [confirm the handover](/apis/openapi/f2f-handover/p2p.confirmhandover) of the goods, if they haven't done so already. | | `complained` | A `complained` transaction is registered with Trustap for conflict resolution. | `funds_released` | 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`. | | `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` | |