# Transaction with postage fee

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.

## Add a postage fee to a transaction

### Create users

Follow our [users](/docs/guides/transactions/users) guide to create user objects for both seller and buyer.

### Calculate the 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 the charge for the transaction including the path parameter `amount_postage`.

Get charge
```CURL
curl -i -X GET \
-u '<API_KEY>:' \
'https://api.test.trustap.com/v2/fees?amount=20000&currency=gbp&amount_postage=500'
```

Get charge response
```json
{
    "charge": 325,
    "charge_calculator_version": 5,
    "charge_config": 1,
    "charge_postage_buyer": 500,
    "charge_seller": 0,
    "currency": "eur",
    "payment_method": "card",
    "price": 495
}
```

### Create transaction

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.

Create transaction
```curl
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"
}'
```

Create transaction response
```json
{
  "buyer": {
  	"id": "1-506ec116-f0b3-4ea8-bfd0-ea0e7b9d18aa",
  	"is_guest": true
  },
  "client_id": "5a3d7990-9f1c-4e11-8d67-3da5b160c50a",
  "contains_shipping": true,
  "deadlines": {
  	"complaints": null
  },
  "description": "Trustap socks",
  "events": {
  	"by_key": {
  		"created": "2026-06-18T08:47:05Z",
  		"joined": "2026-06-18T08:47:05Z"
  	},
  	"by_time": [
  		{
  			"at": "2026-06-18T08:47:05Z",
  			"code": "created"
  		},
  		{
  			"at": "2026-06-18T08:47:05Z",
  			"code": "joined"
  		}
  	]
  },
  "id": "tx_01kvcyk6dhf4crpbs5phe6vspa",
  "metadata": {},
  "payment_link": "https://actions.stage.trustap.com/transactions/tx_01kvcyk6dhf4crpbs5phe6vspa/pay",
  "pricing": {
  	"amount": 20000,
  	"amount_extra": 0,
  	"amount_postage": 500,
  	"currency": "eur",
  	"fees": {
  		"buyer": 1075,
  		"buyer_client": 0,
  		"seller": 0,
  		"seller_client": 0
  	},
  	"postage_bearer": "buyer"
  },
  "seller": {
  	"id": "8e5cbedc-e57b-42e5-a3bd-2f9ced81a2d0",
  	"is_guest": false
  },
  "status": "joined"
}
```

### Send buyer to payment screen

Direct your buyer to the [Trustap payment screen](/docs/guides/transactions/transaction-int-path-cc#buyer-transfers-funds).

Payment screen URL
```
https://actions.stage.trustap.com/transactions/tx_01kvcyk6dhf4crpbs5phe6vspa/pay?redirect_uri=https://www.example.com
```

Trustap payment screen
The Trustap payment screen includes a **Shipping** fee, that is collected in the total payment.

Trustap payment screen with postage_fee
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](/docs/concepts/pricing#platform-commission).