The following steps show a full transaction from start to finish with a credit card payment including parcel tracking. Parcel tracking enables automated delivery confirmation after a parcel has been delivered to a buyer.
Trustap supports a large number of countires and carriers for parcel tracking. See our list of carriers for more details.
Before you begin this guide, follow our setup guide.
- 1
Create a sellers and buyers
Follow our users guide to create user objects for both seller and buyer.
- 2
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.
priceis an integer, in which the last 2 digits are the decimal part of the price. For example,price:1050currency:eur= €10.50.curl -i -X GET \ -u '<API_KEY>:' \ 'https://api.test.trustap.com/v2/fees?amount=20000¤cy=gbp' - 3
Create a transaction with a seller and buyer
In the Trustap API, the transaction object includes details about the buyer and seller, the type of transaction, and the status of the transaction.
curl -i -X POST \ -u '<API_KEY>:' \ https://api.test.trustap.com/v2/transactions \ -H 'Content-Type: application/json' \ -d '{ "amount": 20000, "amount_extra": 0, "buyer_id": "1-def29dfe-8626-48a2-8863-b6fdf2b96ff0", "currency": "gbp", "description": "Trustap socks", "fees_buyer": 640, "fees_config": 1, "fees_seller": 0, "image_url": "https://docs.trustap.com/images/trustap-socks.png", "payment_method": "card", "role": "seller", "contains_shipping": true, "seller_id": "1-3f546125-2ec2-4b14-87f6-54a14ae73e98" }' - 4
Buyer transfers funds
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 https://actions.stage.trustap.com/transactions/{transaction_id}/pay?redirect_uri=<CALLBACK_PAYMENT>Production environment https://actions.trustap.com/transactions/{transaction_id}/pay?<CALLBACK_PAYMENT>For example:
https://actions.stage.trustap.com/transactions/tx_01kq7pz74mffj9x5vsesqkve08/pay?redirect_uri=https://www.trustap.com/Alternatively, use
payment_linkfrom transaction object and append theredirect_uri.The Trustap API also supports
statewhen sending a buyer to the payment screen.Learn more about
statein our guide.The payment screen looks like the following.

- 5
Seller accepts payment
Once the payment is made by the buyer, the seller can choose to accept the deposit.
curl -i -X POST \ -u '<API_KEY>:' \ 'https://api.test.trustap.com/v2/transactions/tx_01kq7pz74mffj9x5vsesqkve08/accept_payment' \ -H 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' - 6
Seller adds tracking details
When the seller has arranged delivery, they add the tracking details to the transaction.
curl -i -X POST \ -u '<API_KEY>:' \ 'https://api.test.trustap.com/v2/transactions/tx_01kq7pz74mffj9x5vsesqkve08/track' \ -H 'Content-Type: application/json' \ -H 'Trustap-User: 1-3f546125-2ec2-4b14-87f6-54a14ae73e98' \ -d '{ "carrier": "ups", "tracking_code": "345345123" }'The complaints period begins (24h) when delivery is confirmed by the courier.
- 7
Complaints period
At this point, the buyer has the option to create a complaint if they 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.
- 8
Seller claims transaction
- 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.
Seller claims transactioncurl -i -X POST \ -u '<API_KEY>:' \ 'https://api.test.trustap.com/v2/transactions/{transaction_id}/claim' \ -H 'Content-Type: application/json' \ -H 'Trustap-User: ee461c3a-3971-45fa-b361-38694c78f69d' \ -d '{ "role": "seller", }'- Following confirmation of handover and a successful complaints period, the seller will receive the payout from the transaction to their account.