Skip to content

Get the Trustap fee for a face-to-face transaction

Request

This returns the Trustap fee, in the currency's smallest unit, for a transaction involving goods with the supplied price. See the Stripe documentation for more details.

Security
OAuth2 or APIKey
Query
currencystringrequired

The currency that the price is specified in.

priceinteger, (int64)required

The price of the goods being sold in this transaction, in the currency's smallest unit. For example, if a trading card is being sold for $12.34 (with currency as usd), then the request for the charge for this transaction would be /p2p/charge?price=1234&currency=usd.

price_extrainteger, (int64)

Represents an additional charge to be paid by the buyer added to the transaction total. Use this field to include costs like processing fees, local taxes, or shipping surcharges. Must be an integer provided in the smallest unit of the currency (for example, 500 for $5.00 USD). Defaults to 0 if not provided.

price_postageinteger, (int64)

Represents the postage/shipping cost to be paid by the buyer. Must be an integer provided in the smallest unit of the currency (for example, 500 for $5.00 USD).

fee_multipliernumber, (double)

The fee_multiplier parameter is used to apply a higher percentage fee based on the total price of the transaction. The percentage fee is calculated multiplying the percentage fee by the fee_multiplier.

quantityinteger, (int64)

Deprecated.

payment_methodstring

The payment method that will be used to pay for the transaction. This is necessary because different payment methods may result in different fees.

The default value is card.

charge_configinteger, (int64)

The charge config for which the charge amount is computed.

Default:1
GET
/api/v1/p2p/charge
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/p2p/charge?currency=string&price=0&price_extra=0&price_postage=0&fee_multiplier=0.1&quantity=0&payment_method=string&charge_config=1' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
chargeinteger, (int64)required

The Trustap fee that the buyer will pay, in the currency's smallest unit, for a queried amount. See the Stripe documentation for more details.

Example:78
charge_buyer_clientinteger, (int64)required

The portion of the buyer's fee that is attributed to the client, in the currency's smallest unit.

Example:0
charge_calculator_versioninteger, (int64)required

The version of the Trustap charge calculator that was used to calculate this charge.

This property is present for error-handling purposes. The Trustap API allows apps and users to query how much Trustap will charge for a transaction before creating a transaction. Trustap then requires the queried charge to be provided when creating a transaction or listing. At this point the charge is calculated again and checked against the provided charge, to ensure that the charge calculated for the new resource is the same as the one shown to the user. In the unlikely event that the Trustap charge calculator used to calculate the charge has been updated, then the charge_calculator_version property will be used to return an incorrect_calc_version to the API client, which will indicate that the /charge endpoint should be queried again to get the newest charge value.

Example:5
charge_configinteger, (int64)
Default:1
Example:1
charge_sellerinteger, (int64)required

The Trustap fee that the seller will pay, in the currency's smallest unit, for a queried amount. See the Stripe documentation for more details.

Example:0
charge_seller_clientinteger, (int64)required

The portion of the seller's fee that is attributed to the client, in the currency's smallest unit.

Example:0
currencystringrequired
Example:"eur"
payment_methodstring
Example:"card"
priceinteger, (int64)required
Example:1234
price_extrainteger, (int64)

Represents an additional charge to be paid by the buyer added to the transaction total. Use this field to include costs like processing fees, local taxes, or shipping surcharges. Must be an integer provided in the smallest unit of the currency (for example, 500 for $5.00 USD). Defaults to 0 if not provided.

Example:0
price_postageinteger, (int64)

Represents the postage/shipping cost to be paid by the buyer. Must be an integer provided in the smallest unit of the currency (for example, 500 for $5.00 USD).

Response
{ "charge": 78, "charge_buyer_client": 0, "charge_calculator_version": 5, "charge_config": 1, "charge_seller": 0, "charge_seller_client": 0, "currency": "eur", "payment_method": "card", "price": 1234, "price_extra": 0 }