The Trustap API enables sellers to use their own shipping solutions and provide a mechanism to add tracking details to a transaction. To support sellers using their own shipping solution, the Trustap API includes a postage_fee parameter. Use this to add a pre-calculated postage cost to a transaction, which is then collected at the Trustap payment screen.
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:eur = €10.50.
Get the charge for the transaction including the path parameter amount_postage.
curl -i -X GET \
-u '<API_KEY>:' \
'https://api.test.trustap.com/v2/fees?amount=20000¤cy=gbp&amount_postage=500'In your transaction, include the postage fee as amount_postage. Amounts must be provided in a currency's smallest unit. For example, use 500 for €5.
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-506ec116-f0b3-4ea8-bfd0-ea0e7b9d18aa",
"currency": "eur",
"description": "Trustap socks",
"fees_buyer": 1075,
"fees_config": 1,
"fees_seller": 0,
"amount_postage": 500,
"image_url": "https://docs.trustap.com/images/trustap-socks.png",
"payment_method": "card",
"role": "seller",
"contains_shipping": true,
"seller_id": "8e5cbedc-e57b-42e5-a3bd-2f9ced81a2d0"
}'Direct your buyer to the Trustap payment screen.
https://actions.stage.trustap.com/transactions/tx_01kvcyk6dhf4crpbs5phe6vspa/pay?redirect_uri=https://www.example.com
The collected postage fees are held in the Trustap vault and paid out to the platform at agreed intervals, in a similar manner to partner commission.