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

This returns the Trustap fee, in the currency's smallest unit,
for a transaction involving goods with the supplied price. See
[the Stripe
documentation](https://stripe.com/docs/currencies#zero-decimal)
for more details.

Endpoint: GET /api/v1/p2p/charge
Version: 0.1.0
Security: OAuth2, APIKey

## Query parameters:

  - `currency` (string, required)
    The currency that the price is specified in.

  - `price` (integer, 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_extra` (integer)
    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.

  - `fee_multiplier` (number)
    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.

  - `quantity` (integer)
    Deprecated.

  - `payment_method` (string)
    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_config` (integer)
    The charge config for which the charge amount is computed.

## Response 200 fields (application/json):

  - `charge` (integer, required)
    The Trustap fee that the buyer will pay, in the currency's
smallest unit, for a queried amount. See [the Stripe
documentation](https://stripe.com/docs/currencies#zero-decimal)
for more details.
    Example: 78

  - `charge_buyer_client` (integer, required)
    The portion of the buyer's fee that is attributed to the client,
in the currency's smallest unit.

  - `charge_calculator_version` (integer, 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_config` (integer)
    Example: 1

  - `charge_seller` (integer, required)
    The Trustap fee that the seller will pay, in the
currency's smallest unit, for a queried amount. See [the
Stripe
documentation](https://stripe.com/docs/currencies#zero-decimal)
for more details.

  - `charge_seller_client` (integer, required)
    The portion of the seller's fee that is attributed to the client,
in the currency's smallest unit.

  - `currency` (string, required)
    Example: "eur"

  - `payment_method` (string)
    Example: "card"

  - `price` (integer, required)
    Example: 1234

  - `price_extra` (integer)
    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.

## Response 400 fields (application/json):

  - `code` (string, required)
    Example: "negative_price"

  - `error` (string, required)
    A contextual description of the error that occurred. When
handling errors the code field should be used to determine
the type of error that occurred, as the text in the error
field may change unexpectedly.
    Example: "`price` cannot be negative"


