Face-to-face transaction flow

The following steps show a full face-to-face transaction from start to finish.

Step 1: Create a guest seller

Every transaction must have two users, a seller and a buyer. The first step is to create a seller.

Using the Trustap API, guest buyers and sellers can complete a transaction together. To receive a payment, the buyer must later convert to a full Trustap account.

curl --location 'https://dev.stage.trustap.com/api/v1/guest_users' \
--header 'Content-Type: application/json' \
--user '<API_KEY>:' \
--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"}}'

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.

curl --location 'https://dev.stage.trustap.com/api/v1/guest_users' \
--header 'Content-Type: application/json' \
--user '<API_KEY>:' \
--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"}}'

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€.

curl --location 'https://dev.stage.trustap.com/api/v1/p2p/charge?price=20000&currency=eur' \
--user '<API_KEY>:' \
--data ''

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.

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 '<API_KEY>:' \
--data '{
"seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9",
"buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea",
"creator_role": "seller",
"currency": "eur",
"description": "Face-to-Face no deposit",
"deposit_price": 20000,
"deposit_charge": 1080,
"charge_calculator_version": 3,
"skip_remainder": true
}'

Step 5: Buyer transfers funds

After a transaction is created, the buyer should be redirected 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, the buyer is directed using a URL a payment screen where the buyer can enter their card details for secure payment.

Transfer using bank transfer

With a bank transfer, the buyer is directed using a URL to a screen displaying bank transfer details.

The payment URL that you send to the buyer depends on your type of integration.

In the following examples, replace <CALLBACK_PAYMENT> with the redirect URI you set in authentication. This is the location where the buyer will be redirected to following payment.

Test environmentProduction environment
Guest buyerhttps://actions.stage.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?redirect_uri=<CALLBACK_PAYMENT> https: //actions.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?<CALLBACK_PAYMENT>
Full user buyerhttps: //actions.stage.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?redirect_uri=<CALLBACK_PAYMENT> https://actions.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?<CALLBACK_PAYMENT>

For example:

https://actions.stage.trustap.com/f2f/transactions/21134/pay_deposit?redirect_uri=https://www.example.com

The payment screen looks like the following.


Step 6: Seller accepts deposit

Once the payment is made by the buyer, the seller can choose to accept the deposit.

curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/accept_deposit_with_guest_seller' \
--header 'Trustap-User: 1-7af97e79-3b99-483e-8e82-f64964e7431c' \
--user '<API_KEY>:'

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.

curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/confirm_handover_with_guest_user' \
--header 'Trustap-user: 1-7af97e79-3b99-483e-8e82-f64964e7431c' \
--user '<API_KEY>:'

Step 8: Seller claims payout

Before a seller can claim, they must convert their Trustap account from a guest to a full user account. See our full user guide for details.

Following handover, the seller can claim the payout. Claiming the payout means the seller requests to receive the money for the transaction.

curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/claim_for_seller' \
--header 'Trustap-User: 1-6c31999a-27ec-4322-9bb0-09d246bde227' \
--user '<API_KEY>:'