The following steps show a full face-to-face transaction from start to finish with a credit card payment. In some cases, Trustap also support some local payment methods. For example, Swish, BLIK, iDEAL, Apple Pay, and Google Pay.
Before you begin this guide, follow our setup guide.
Follow our users guide to create user objects for both seller and buyer.
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:gbp = 10,50€.
curl --location 'https://dev.stage.trustap.com/api/v1/p2p/charge?price=20000¤cy=gbp' \
--user '<API_KEY>:'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": "gbp",
"description": "Ireland vs Croatia UEFA Nations League",
"deposit_price": 20000,
"deposit_charge": 820,
"charge_calculator_version": 3,
"skip_remainder": true,
"image_url": "https://docs.trustap.com/images/soccer-tickets.png"
}'After a transaction is created, redirect the buyer to the payment page to pay for it.
In the following examples, replace <CALLBACK_PAYMENT> with the redirect URI you set during your Trustap setup. This is the location where the buyer will be redirected to following payment.
| Use case | URL |
|---|---|
| Test environment - Guest buyer | https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?redirect_uri=<CALLBACK_PAYMENT> |
| Test environment - Full user buyer | https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?redirect_uri=<CALLBACK_PAYMENT> |
| Production environment - Guest buyer | https://actions.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?<CALLBACK_PAYMENT> |
| Production environment - Full user buyer | https://actions.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?<CALLBACK_PAYMENT> |
For example:
https://actions.stage.trustap.com/f2f/transactions/21380/pay_deposit?redirect_uri=https://www.example.comThe Trustap API also supports state when sending a buyer to the payment screen.
Learn more about state in our guide.
The payment screen looks like the following.

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-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \
--user '<API_KEY>:'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-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \
--user '<API_KEY>:'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. If a complaint is made, you will receive an email as well as a webhook event.
If no complaint is made within the complaints period, funds are automatically released following the seller claiming the payout.
- A seller must register for a full Trustap account before they can claim a transaction. See our full user guide for details.
- Using the seller full Trustap account user ID as
Trustap-User, claim the transaction. This links the transaction to their full Trustap account.
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 '<API_KEY>:'- Following confirmation of handover and a successful complaints period, the seller will receive the payout from the transaction to their account.