# Charge configuration Charge configuration defines how Trustap fees are applied to payments (buyer flat and percentage fees) and payouts (seller flat and percentage fees). Using the Trustap API, you can define multiple charge configurations to control the following. * Who pays the transaction processing fees (buyer, seller, or both) * The payment method (card or bank transfer) * The fee structure (flat fee, percentage, or a combination) * When different configurations apply The Trustap API supports multiple charge configurations that, once set up, can be dynamically applied to your transactions. ## Setup your charge configurations Trustap configures and manages your charge configurations for you. You can set multiple configurations. Contact your Trustap integration specialist with the following details. | Field name | Type | Description | Example | | --- | --- | --- | --- | | Config ID | int | The ID of the charge configuration. This is the ID you’ll use as `charge_config` when referring to this config | `1` | | Currency | string | The currency of your transactions. The Trustap API can use this to automatically select a [charge_config](#scenario-4-different-fees-for-different-currencies) | `eur` | | Buyer flat fee | int | A fixed fee (in your currency’s smallest unit) charged to the buyer | `50` | | Buyer percentage fee | int | The percentage fee charged to the buyer, expressed as a decimal | `2` | | Seller flat fee | int | A fixed fee (in your currency’s smallest unit) charged to the seller | `30` | | Seller percentage fee | int | The percentage fee charged to the seller, expressed as a decimal | `3` | | Charge config threshold | int | The threshold amount used to determine when this charge configuration applies. For example, if you want the configuration to only be applied to transactions with a value above £100. Default value is 0. The Trustap API can use this to automatically select a [charge_config](#scenario-1-different-payment-methods-for-high-value-items) | `10000` | | Payment Method | string | The method of payment for your transactions. Can be `card` or `bank_transfer`. The Trustap API can use this to automatically select a [charge_config](#scenario-5-different-fees-for-different-payment-methods) | `bank_transfer` | For multiple charge configurations, send a full set of details for each configuration. ## Charge configuration scenarios ### Scenario 1: Different payment methods for high-value items If you want to use different fee structures depending on the payment method and transaction value, you can define separate charge configurations with different thresholds. | Config ID | Currency | Buyer flat fee | Buyer percentage fee | Seller flat fee | Seller percentage fee | Charge config threshold | Payment method | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | eur | 0 | 2 | 0 | 1 | 0 | card | | 1 | eur | 0 | 1 | 0 | 0.5 | 10000 | bank_transfer | Explanation: * The Trustap API checks the value of the transaction against the charge config threshold and automatically selects the correct charge config. * Card payments apply standard fees for all transactions below €100. * Bank transfers apply reduced fees for transactions above €100 ### Scenario 2: Lower charges for gold, silver, bronze memberships | Config ID | Currency | Buyer flat fee | Buyer percentage fee | Seller flat fee | Seller percentage fee | Charge config threshold | Payment method | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | eur | 0 | 3 | 0 | 2 | 0 | card | | 2 | eur | 0 | 2 | 0 | 1.5 | 0 | card | | 3 | eur | 0 | 1 | 0 | 1 | 0 | card | Explanation: * Each membership tier has its own configuration. * Use the correct Config ID when creating a transaction based on the user’s membership level. ### Scenario 3: Seller pays fees for small value transactions | Config ID | Currency | Buyer flat fee | Buyer percentage fee | Seller flat fee | Seller percentage fee | Charge config threshold | Payment method | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | eur | 0 | 0 | 0 | 3 | 0 | card | | 1 | eur | 0 | 1.5 | 0 | 1.5 | 5000 | card | Explanation: * The Trustap API checks the value of the transaction against the charge config threshold and automatically selects the correct charge config. * For low-value transactions (below €50), sellers cover all fees. * For higher-value transactions, both buyer and seller share the cost. ### Scenario 4: Different fees for different currencies | Config ID | Currency | Buyer flat fee | Buyer percentage fee | Seller flat fee | Seller percentage fee | Charge config threshold | Payment method | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | eur | 0 | 3 | 0 | 3 | 0 | card | | 1 | gbp | 0 | 1.5 | 0 | 1.5 | 0 | card | Explanation: * The Trustap API checks the currency of the transaction and automatically selects the correct charge config. * Euro transactions have a higher charge than British pound. ### Scenario 5: Different fees for different payment methods | Config ID | Currency | Buyer flat fee | Buyer percentage fee | Seller flat fee | Seller percentage fee | Charge config threshold | Payment method | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | eur | 0 | 2 | 0 | 0 | 0 | bank_transfer | | 1 | gbp | 0 | 6 | 0 | 0 | 0 | card | Explanation: * The Trustap API checks the payment method of the transaction and automatically selects the correct charge config. * Transactions with a bank transfer have a lower charge than card payments. ## Using charge configuration See our [pricing guide](/docs/concepts/pricing) for more information on how pricing works with the Trustap API. Online transaction You use your charge config at two points in the transaction flow. You must use the same `payment_method` and `currency` as you set in your charge configuration. If you do not set a charge config, the Trustap API uses a default value of 1. 1. When calculating your [transaction charge](/apis/openapi/online-payment/basic.getcharge) using `charge_config`. ```CURL Get charge curl --location 'https://dev.stage.trustap.com/api/v1/charge?price=20000¤cy=eur&payment_method=bank_transfer&charge_config=3' \ --user ':' ``` 1. When you [create your transaction](/apis/openapi/online-transactions/basic.createtransactionwithguestuser) using `charge_config`. ```CURL Create an online transaction curl --location 'https://dev.stage.trustap.com/api/v1/me/transactions/create_with_guest_user' \ --header 'Trustap-User: 1-af6c21b1-6252-449e-b340-90391667221b' \ --header 'Content-Type: application/json' \ --user ':' \ --data '{ "seller_id":"1-af6c21b1-6252-449e-b340-90391667221b", "buyer_id":"1-0b444755-e112-4286-8edf-3ca634e37f63", "creator_role": "seller", "currency": "eur", "description": "Face-to-Face no deposit", "price": 20000, "charge": 40, "charge_calculator_version": 5, "charge_config":3, "skip_remainder": true, "payment_method": "bank_transfer" }' ``` Face-to-face transaction You use your charge config at two points in the transaction flow. It's essential that you use the same `Payment method` and `currency` as you set in your charge configuration. If you do not set a charge config, the Trustap API uses a default value of 1. 1. When calculating your [transaction charge](/apis/openapi/f2f-payment/p2p.getcharge) using `charge_config`. ```CURL Get charge curl --location 'https://dev.stage.trustap.com/api/v1/p2p/charge?price=20000¤cy=eur&Payment method=bank_transfer&charge_config=3' \ --user ':' ``` 1. When you [create your transaction](/apis/openapi/f2f-transactions/p2p.createtransactionwithguestuser) using `deposit_charge_config`. ```CURL Create a face-to-face transaction curl --location 'https://dev.stage.trustap.com/api/v1/p2p/me/transactions/create_with_guest_user' \ --header 'Trustap-User: 1-af6c21b1-6252-449e-b340-90391667221b' \ --header 'Content-Type: application/json' \ --user ':' \ --data '{ "seller_id":"1-af6c21b1-6252-449e-b340-90391667221b", "buyer_id":"1-0b444755-e112-4286-8edf-3ca634e37f63", "creator_role": "seller", "currency": "eur", "description": "Face-to-Face no deposit", "deposit_price": 20000, "deposit_charge": 80, "charge_calculator_version": 3, "deposit_charge_config":3, "skip_remainder": true, "deposit_payment_method": "bank_transfer" }' ``` ## View charges You can view charges in two places. 1. Trustap payment screen showing the buyer fee as **Buyer Protection Fee**. Trustap payment screen showing buyer payment fee 1. Trustap seller transaction page as **Buyer Fees** and **Seller Fees.** Trustap payment screen showing buyer and seller fees