Skip to content
Last updated

Postage fee

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

  1. Using integrated 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.

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

  1. 1

    Create users

  2. 2

    Calculate the charge

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

        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>:'
  3. 3

    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.
    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":"Online no deposit",
        "price":495,
        "charge":100,
        "charge_calculator_version":5,
        "features":["use_custom_postage_fee"],
        "postage_fee":500
    }'
  4. 4

    Send buyer to payment screen

    Direct your buyer to the Trustap payment screen.

    https://actions.stage.trustap.com/online/transactions/30854/guest_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.