# Postage fee

The Trustap API supports shipping in two ways for online transactions.

1. Using [integrated shipping](/docs/guides/transactions/online/online-shipping) that automatically generates shipping labels and tracks parcels.
2. Support sellers to use their own shipping solutions and provide a mechanism to [add tracking details to a transaction](/docs/guides/transactions/online/online-int-path-cc#step-6-seller-adds-tracking-details).


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

Create [users for your transaction](/docs/guides/transactions/online/online-int-path-cc#step-1-create-a-guest-seller).

### Calculate the charge

Get the charge for the transaction including the path parameter `postage_fee`.

Get charge

```curl
    curl --location 'https://dev.stage.trustap.com/api/v1/charge?price=495&currency=eur&payment_method=card&postage_fee=500'\
    --header 'Content-Type: application/json' \
    --user '<API_KEY>:'
```

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 following parameters.

* Your postage fee as `postage_fee`. Amounts must be provided in a currency's smallest unit. For example, use `500` for €5.
* In your `features` use `use_custom_postage_fee`.


Create transaction

```curl
curl --location 'https://dev.stage.trustap.com/api/v1/me/transactions/create_with_guest_user' \
--header 'Content-Type: application/json' \
--user '<API_KEY>:' \
--header 'Trustap-User: 7982f8e1-883d-4805-9f18-bca9b67274d4' \
--data '{
    "seller_id":"7982f8e1-883d-4805-9f18-bca9b67274d4",
    "buyer_id":"1-2b05d786-2eb0-408a-813c-9df2236edb00",
    "creator_role":"seller",
    "currency":"eur",
    "description":"Blue t-shirt with owl decal",
    "price":495,
    "charge":100,
    "charge_calculator_version":5,
    "features":["use_custom_postage_fee"],
    "postage_fee":500
}'
```

Create transaction response

```json
{
  "buyer_id": "1-2b05d786-2eb0-408a-813c-9df2236edb00",
  "charge": 100,
  "charge_postage_buyer": 500,
  "charge_postage_client": 0,
  "charge_seller": 0,
  "client_id": "5a3d7990-9f1c-4e11-8d67-3da5b160c50a",
  "created": "2025-11-04T14:26:10Z",
  "currency": "eur",
  "description": "Blue t-shirt with owl decal",
  "id": 30854,
  "is_payment_in_progress": false,
  "joined": "2025-11-04T14:26:10Z",
  "price": 495,
  "quantity": 1,
  "seller_id": "7982f8e1-883d-4805-9f18-bca9b67274d4",
  "status": "joined"
}
```

### Send buyer to payment screen

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

Payment screen URL

```
https://actions.stage.trustap.com/online/transactions/30854/guest_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 [platform commission](/docs/concepts/pricing#platform-commission).