# Face-to-face transaction flow The following steps show a full face-to-face transaction from start to finish. We show two types of flow. * Multiple sellers to multiple buyers. * A single seller to multiple buyers. Before you begin this guide, follow our [setup guide](/docs/intro/auth). ▦ Multiple sellers to multiple buyers ### Step 1: Create a guest seller For an application where you have different buyers and sellers, for example in a marketplace eCommerce solution, create guest buyers and guest sellers. * Every transaction must have two users, a seller and a buyer. * Using the Trustap API, guest buyers and sellers can complete a transaction together. To receive a payout, the seller must later create a full Trustap account. Create a guest seller ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/guest_users' \ --header 'Content-Type: application/json' \ --user ':' \ --data-raw '{"email":"sarah.garcia@shopit.com","first_name":"Sarah","last_name":"Garcia","country_code":"ie","tos_acceptance":{"unix_timestamp":1737558834,"ip":"127.0.0.1"}}' ``` Response ```JSON { "created_at": "2025-01-24T15:43:20.310247061Z", "email": "sara.garcia@gmail.com", "id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9" } ``` ### Step 2: Create a guest buyer The buyer is the party that receives the goods and pays for the transaction. Guest buyers can pay for transactions and even create complaints. Create a guest buyer ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/guest_users' \ --header 'Content-Type: application/json' \ --user ':' \ --data-raw '{"email":"bert.gray@mail.com","first_name":"Bert","last_name":"Gray","country_code":"ie","tos_acceptance":{"unix_timestamp":1737558834,"ip":"127.0.0.1"}}' ``` Response ```JSON { "created_at": "2025-01-24T15:43:20.310247061Z", "email": "bert.gray@mail.com", "id": "1-615a70d4-b624-4243-95be-a8367b7953ea" } ``` ### Step 3: Get Trustap Fee (Charge) Before creating a transaction, retrieve the charge for the transaction. This returns the cost for using the Trustap service for this transaction. `price` is an integer, in which the last 2 digits are the decimal part of the price. For example, `price:1050` `currency:eur` = 10,50€. Get Trustap fee ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/p2p/charge?price=20000¤cy=gbp' \ --user ':' ``` Response ```json { "charge": 760, "charge_calculator_version": 3, "charge_seller": 0, "currency": "gbp", "price": 20000 } ``` ### Step 4: Create a transaction with a guest seller and guest buyer In the Trustap API, the transaction object includes details about the the buyer and seller, the type of transaction, and the status of the transaction. Create a transaction ```JSON curl --location 'https://dev.stage.trustap.com/api/v1/p2p/me/transactions/create_with_guest_user' \ --header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \ --header 'Content-Type: application/json' \ --user ':' \ --data '{ "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "creator_role": "seller", "currency": "gbp", "description": "Face-to-Face no deposit", "deposit_price": 20000, "deposit_charge": 1080, "charge_calculator_version": 3, "skip_remainder": true }' ``` Response ```json { { "id": 21134, "status": "joined", "currency": "gbp", "quantity": 1, "deposit_pricing": { "price": 20000, "charge": 760, "charge_seller": 0, "deposit_fee_multiplier": { "fee_multiplier": 1 } }, "description": "F2F no deposit", "created": "2025-01-24T17:08:28Z", "skip_remainder": true, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "joined": "2025-01-24T17:08:28Z", "deposit_payment_capture": null, "buyer_is_guest": true, "seller_is_guest": true } } ``` ### Step 5: Buyer transfers funds After a transaction is created, redirect the buyer to the payment page to pay for it. Trustap support two methods for payment. These funds will not be released to the seller until the buyer approves. #### Transfer using card With card transfer, direct the buyer using a URL a payment screen where the buyer can enter their card details for secure payment. During testing, it's helpful to simulate the full payment flow. We recommend using [test credit card numbers](https://docs.stripe.com/testing) to complete transactions without processing real payments. #### Transfer using bank transfer With a bank transfer, direct the buyer using a URL to a screen displaying bank transfer details. Card payment The payment URL that you send to the buyer depends on your type of integration. In the following examples, replace `` with the redirect URI you set [during your Trustap setup](/docs/intro/auth). This is the location where the buyer will be redirected to following payment. ##### Test environment - Guest buyer ``` https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?redirect_uri= ``` ##### Test environment - Full user buyer ``` https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?redirect_uri= ``` ##### Production environment - Guest buyer ``` https://actions.trustap.com/f2f/transactions/{transaction_id}/pay_deposit? ``` ##### Production environment - Full user buyer ``` https://actions.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit? ``` For example: ```cURL https://actions.stage.trustap.com/f2f/transactions/21380/pay_deposit?redirect_uri=https://www.example.com ``` The Trustap API also supports `state` when sending a buyer to the payment screen. Learn more about `state` in our [guide](/docs/guides/state). The payment screen looks like the following. Image with dimensions Bank transfer ```CURL 1. Get Trustap fee (charge) again including 'payment_method=bank_transfer' curl --location 'https://dev.stage.trustap.com/api/v1/charge?price=20000¤cy=gbp&payment_method=bank_transfer' \ --user ':' ``` ```CURL 2. Set deposit payment method to bank transfer curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/{transaction_id}/set_deposit_payment_method' \ --user ':' \ --header 'Content-Type: application/json' \ --data '{ "currency": "gbp", "deposit_charge": 2000, "deposit_charge_seller": 0, "deposit_price": 200000, "payment_method": "bank_transfer" }' ``` ```CURL 3. Get the bank details curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/{transaction_id}/bank_transfer_details' \ --user ':' ``` The response includes all the details needed for a buyer to complete the transaction over a bank transfer. Use the `hosted_instructions_url` to share instructions on how to use the bank details. ```JSON Bank details response { "amount": 0, "currency": "string", "financial_address": { "aba": { "account_number": "string", "bank_name": "string", "routing_number": "string" }, "iban": { "account_holder_name": "string", "bic": "string", "country": "string", "iban": "string" }, "sort_code": { "account_holder_name": "string", "account_number": "string", "sort_code": "string" }, "swift": { "account_number": "string", "bank_name": "string", "swift_code": "string" } }, "hosted_instructions_url": "string", "reference": "string" } ``` There is another option for displaying account details. To display an option for card payment or bank transfer follow these steps. 1. Set deposit payment method to bank transfer as above. 2. Follow the steps in card payment. When the buyer is directed to the card payment screen, they will see the option for card payment or bank transfer. ### Step 6: Seller accepts deposit Once the payment is made by the buyer, the seller can choose to accept the deposit. Seller accept deposit ```CURL curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/accept_deposit_with_guest_seller' \ --header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \ --user ':' ``` Response ```JSON { "id": 21380, "status": "remainder_skipped", "currency": "gbp", "quantity": 1, "deposit_pricing": { "price": 20000, "charge": 760, "charge_seller": 0, "deposit_fee_multiplier": { "fee_multiplier": 1 }, "charge_international_payment": 311 }, "description": "F2F no deposit", "created": "2025-01-31T17:26:01Z", "skip_remainder": true, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "joined": "2025-01-31T17:26:01Z", "deposit_payment_capture": null, "deposit_paid": "2025-01-31T17:38:55Z", "deposit_accepted": "2025-01-31T17:45:39Z", "remainder_skipped": "2025-01-31T17:45:39Z", "buyer_is_guest": true, "seller_is_guest": true } ``` ### Step 7: Seller confirms handover Once the physical handover of the item has taken place, the buyer must confirm the handover was complete before funds can be released to the seller. Both parties can confirm the handover for a face-to-face transaction. The complaints period begins (24h) when any of the users confirms the handover. Seller confirms handover ```CURL curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/confirm_handover_with_guest_user' \ --header 'Trustap-user: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \ --user ':' ``` Response ```JSON { "id": 21380, "status": "seller_handover_confirmed", "currency": "gbp", "quantity": 1, "deposit_pricing": { "price": 20000, "charge": 760, "charge_seller": 0, "deposit_fee_multiplier": { "fee_multiplier": 1 }, "charge_international_payment": 311 }, "description": "F2F no deposit", "created": "2025-01-31T17:26:01Z", "skip_remainder": true, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "joined": "2025-01-31T17:26:01Z", "deposit_payment_capture": null, "deposit_paid": "2025-01-31T17:38:55Z", "deposit_accepted": "2025-01-31T17:45:39Z", "remainder_skipped": "2025-01-31T17:45:39Z", "seller_handover_confirmed": "2025-01-31T17:47:18Z", "complaint_period_deadline": "2025-01-31T17:52:18Z", "buyer_is_guest": true, "seller_is_guest": true } ``` ### Step 8: Complaints period At this point, the buyer has the option to create a complaint if the were not satisfied with the transaction. The buyer will receive an email from Trustap with details on how to create a complaint. Submitting complaint will pause any payout until the issue is resolved. The Trustap support team mediate between both buyer and seller to resolve the complaint. The complaints period typically lasts 24 hours. Alternatively, you can enable your buyer to manually [create a complaint](/docs/guides/transactions/face-to-face/face-to-face-complaint). If a complaint is made, you will receive an email as well as a [webhook event](/docs/concepts/webhooks). If no complaint is made within the complaints period, funds are automatically released [following the seller claiming the payout](#step-9-seller-claims-payout). ### Step 9: Seller claims payout Before a seller can claim, they must create a full Trustap account from a guest to a full user account. See our [full user guide](/docs/guides/transactions/face-to-face/face-to-face-create-full-user) for details. Following handover, the seller can claim the payout. Claiming the payout means the seller requests to receive the money for the transaction. Seller claims payout ```CURL curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/claim_for_seller' \ --header 'Trustap-User: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \ --user ':' ``` Response ```JSON { } ``` ▣ Single seller to multiple buyers ### Step 1: Get your seller ID For an application where your seller does not change for each transaction, for example an eCommerce store, use an existing seller `id`. If you do not have an existing seller `id`, [create a full user](/docs/guides/transactions/face-to-face/face-to-face-create-full-user). Use this id for `seller_id`. You can identify full users from guest users by looking at their `id`. A guest user `id` will always begin with `1-`. For example `1-615a70d4-b624-4243-95be-a8367b7953ea`. Get user by email address ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/users?email=sam.ford@ecomm.com' \ --header 'Content-Type: application/json' \ --user ':' ``` Response ```JSON { "id": "b9c9e108-1edd-5d5e-8268-8873d7beb3e3" } ``` ### Step 2: Create a guest buyer The buyer is the party that receives the goods and pays for the transaction. Guest buyers can pay for transactions and even create complaints. Create a guest buyer ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/guest_users' \ --header 'Content-Type: application/json' \ --user ':' \ --data-raw '{"email":"bert.gray@mail.com","first_name":"Bert","last_name":"Gray","country_code":"ie","tos_acceptance":{"unix_timestamp":1737558834,"ip":"127.0.0.1"}}' ``` Response ```JSON { "created_at": "2025-01-24T15:43:20.310247061Z", "email": "bert.gray@mail.com", "id": "1-615a70d4-b624-4243-95be-a8367b7953ea" } ``` ### Step 3: Get Trustap Fee (Charge) Before creating a transaction, retrieve the charge for the transaction. This returns the cost for using the Trustap service for this transaction. `price` is an integer, in which the last 2 digits are the decimal part of the price. For example, `price:1050` `currency:eur` = 10,50€. Get Trustap fee ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/p2p/charge?price=20000¤cy=gbp' \ --user ':' ``` Response ```json { "charge": 760, "charge_calculator_version": 3, "charge_seller": 0, "currency": "gbp", "price": 20000 } ``` ### Step 4: Create a transaction with a seller and guest buyer In the Trustap API, the transaction object includes details about the the buyer and seller, the type of transaction, and the status of the transaction. Create a transaction ```JSON curl --location 'https://dev.stage.trustap.com/api/v1/p2p/me/transactions/create_with_guest_user' \ --header 'Trustap-User: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \ --header 'Content-Type: application/json' \ --user ':' \ --data '{ "seller_id": "b9c9e108-1edd-5d5e-8268-8873d7beb3e3", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "creator_role": "seller", "currency": "gbp", "description": "Face-to-Face no deposit", "deposit_price": 20000, "deposit_charge": 1080, "charge_calculator_version": 3, "skip_remainder": true }' ``` Response ```json { { "id": 21380, "status": "joined", "currency": "gbp", "quantity": 1, "deposit_pricing": { "price": 20000, "charge": 760, "charge_seller": 0, "deposit_fee_multiplier": { "fee_multiplier": 1 } }, "description": "F2F no deposit", "created": "2025-01-24T17:08:28Z", "skip_remainder": true, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "seller_id": "b9c9e108-1edd-5d5e-8268-8873d7beb3e3", "joined": "2025-01-24T17:08:28Z", "deposit_payment_capture": null, "buyer_is_guest": true, "seller_is_guest": true } } ``` ### Step 5: Buyer transfers funds After a transaction is created, redirect the buyer to the payment page to pay for it. Trustap support two methods for payment. These funds will not be released to the seller until the buyer approves. #### Transfer using card With card transfer, direct the buyer using a URL a payment screen where the buyer can enter their card details for secure payment. During testing, it's helpful to simulate the full payment flow. We recommend using [test credit card numbers](https://docs.stripe.com/testing) to complete transactions without processing real payments. #### Transfer using bank transfer With a bank transfer, direct the buyer using a URL to a screen displaying bank transfer details. Card payment The payment URL that you send to the buyer depends on your type of integration. In the following examples, replace `` with the redirect URI you set [during your Trustap setup](/docs/intro/auth). This is the location where the buyer will be redirected to following payment. ##### Test environment - Guest buyer ``` https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?redirect_uri= ``` ##### Test environment - Full user buyer ``` https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?redirect_uri= ``` ##### Production environment - Guest buyer ``` https://actions.trustap.com/f2f/transactions/{transaction_id}/pay_deposit? ``` ##### Production environment - Full user buyer ``` https://actions.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit? ``` For example: ```cURL https://actions.stage.trustap.com/f2f/transactions/21380/pay_deposit?redirect_uri=https://www.example.com ``` The Trustap API also supports `state` when sending a buyer to the payment screen. Learn more about `state` in our [guide](/docs/guides/state). The payment screen looks like the following. Image with dimensions Bank transfer ```CURL 1. Get Trustap fee (charge) again including 'payment_method=bank_transfer' curl --location 'https://dev.stage.trustap.com/api/v1/charge?price=20000¤cy=gbp&payment_method=bank_transfer' \ --user ':' ``` ```CURL 2. Set deposit payment method to bank transfer curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/{transaction_id}/set_deposit_payment_method' \ --user ':' \ --header 'Content-Type: application/json' \ --data '{ "currency": "gbp", "deposit_charge": 2000, "deposit_charge_seller": 0, "deposit_price": 200000, "payment_method": "bank_transfer" }' ``` ```CURL 3. Get the bank details curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/{transaction_id}/bank_transfer_details' \ --user ':' ``` The response includes all the details needed for a buyer to complete the transaction over a bank transfer. Use the `hosted_instructions_url` to share instructions on how to use the bank details. ```JSON Bank details response { "amount": 0, "currency": "string", "financial_address": { "aba": { "account_number": "string", "bank_name": "string", "routing_number": "string" }, "iban": { "account_holder_name": "string", "bic": "string", "country": "string", "iban": "string" }, "sort_code": { "account_holder_name": "string", "account_number": "string", "sort_code": "string" }, "swift": { "account_number": "string", "bank_name": "string", "swift_code": "string" } }, "hosted_instructions_url": "string", "reference": "string" } ``` There is another option for displaying account details. To display an option for card payment or bank transfer follow these steps. 1. Set deposit payment method to bank transfer as above. 2. Follow the steps in card payment. When the buyer is directed to the card payment screen, they will see the option for card payment or bank transfer. ### Step 6: Seller accepts deposit Once the payment is made by the buyer, the seller can choose to accept the deposit. Seller accept deposit ```CURL curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/accept_deposit' \ --header 'Trustap-User: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \ --user ':' ``` Response ```JSON { "id": 21380, "status": "remainder_skipped", "currency": "gbp", "quantity": 1, "deposit_pricing": { "price": 20000, "charge": 760, "charge_seller": 0, "deposit_fee_multiplier": { "fee_multiplier": 1 }, "charge_international_payment": 311 }, "description": "F2F no deposit", "created": "2025-01-31T17:26:01Z", "skip_remainder": true, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "seller_id": "b9c9e108-1edd-5d5e-8268-8873d7beb3e3", "joined": "2025-01-31T17:26:01Z", "deposit_payment_capture": null, "deposit_paid": "2025-01-31T17:38:55Z", "deposit_accepted": "2025-01-31T17:45:39Z", "remainder_skipped": "2025-01-31T17:45:39Z", "buyer_is_guest": true, "seller_is_guest": true } ``` ### Step 7: Seller confirms handover Once the physical handover of the item has taken place, the buyer must confirm the handover was complete before funds can be released to the seller. Both parties can confirm the handover for a face-to-face transaction. The complaints period begins (24h) when any of the users confirms the handover. Seller confirms handover ```CURL curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/confirm_handover' \ --header 'Trustap-user: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \ --user ':' ``` Response ```JSON { "id": 21380, "status": "seller_handover_confirmed", "currency": "gbp", "quantity": 1, "deposit_pricing": { "price": 20000, "charge": 760, "charge_seller": 0, "deposit_fee_multiplier": { "fee_multiplier": 1 }, "charge_international_payment": 311 }, "description": "F2F no deposit", "created": "2025-01-31T17:26:01Z", "skip_remainder": true, "is_deposit_payment_in_progress": false, "is_remainder_payment_in_progress": false, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "seller_id": "b9c9e108-1edd-5d5e-8268-8873d7beb3e3", "joined": "2025-01-31T17:26:01Z", "deposit_payment_capture": null, "deposit_paid": "2025-01-31T17:38:55Z", "deposit_accepted": "2025-01-31T17:45:39Z", "remainder_skipped": "2025-01-31T17:45:39Z", "seller_handover_confirmed": "2025-01-31T17:47:18Z", "complaint_period_deadline": "2025-01-31T17:52:18Z", "buyer_is_guest": true, "seller_is_guest": true } ``` ### Step 8: Complaints period At this point, the buyer has the option to create a complaint if the were not satisfied with the transaction. The buyer will receive an email from Trustap with details on how to create a complaint. Submitting complaint will pause any payout until the issue is resolved. The Trustap support team mediate between both buyer and seller to resolve the complaint. The complaints period typically lasts 24 hours. Alternatively, you can enable your buyer to manually [create a complaint](/docs/guides/transactions/face-to-face/face-to-face-complaint). If a complaint is made, you will receive an email as well as a [webhook event](/docs/concepts/webhooks). If no complaint is made within the complaints period, funds are automatically released [following the seller claiming the payout](#step-9-payout). ### Step 9: Payout Following the complaints period and successful resolution of any complaints, the seller receives the payout to their account. The seller automatically receives their payout only if they have completed their payout details in their Trustap profile.