WiPay
WAPIsv2.0.0Transactions

Transaction Fees

Calculate fees for a transaction amount

Calculate the fee breakdown for a given transaction amount, currency, and fee structure. Returns detailed customer and merchant totals.

Use this endpoint to preview the exact fees before initiating a transaction.

Endpoint

GET /transactions/fees
AccessRequirement
AuthenticatedYes
Required Scopewapi-transactions-get-fees, or wapi-transactions-all
Rate Limit60 requests per minute

Request

Headers

HeaderValue
Acceptapplication/json
AuthorizationBearer <access_token>
X-WAPI-Keywapi_live_<kid>_<secret> or wapi_test_<kid>_<secret>

Send exactly one of Authorization or X-WAPI-Key.

Query Parameters

ParameterTypeRequiredDescription
fee_structurestringYesOne of "customer_pay", "merchant_absorb", or "split"
currencystringYesCurrency code: "TTD" or "USD"
amountnumericYesTransaction amount (e.g., 100.00)

Use the Transaction Meta endpoint to discover the supported currencies, fee structures, and amount limits for your account.

Responses

200 OK

{
  "message": "OK",
  "data": {
    "cus_calc_desc_1": "Fee = (3.50% of $100.00) + $1.70",
    "cus_calc_desc_2": "= $3.50 + $1.70",
    "cus_calc_desc_3": "= $5.20 TTD",
    "cus_calc_desc_4": "Customer Total = $100.00 + $5.20",
    "cus_calc_desc_5": "= $105.20 TTD",
    "cus_d_fee": 1.7,
    "cus_desc_local": "3.50% + $1.70 TTD",
    "cus_desc": "3.50% + $0.25 USD",
    "cus_p_fee": 3.5,
    "cus_pd_fee": 3.5,
    "cus_t_desc": "$105.20 TTD",
    "cus_t_fee": 5.2,
    "cus_t": 105.2,
    "fee_name": "Customer Pay",
    "mer_calc_desc_1": "Fee = (0.00% of $100.00) + $0.00",
    "mer_calc_desc_2": "= $0.00 + $0.00",
    "mer_calc_desc_3": "= $0.00 TTD",
    "mer_calc_desc_4": "Merchant Receives = $100.00 - $0.00",
    "mer_calc_desc_5": "= $100.00 TTD",
    "mer_d_fee": 0,
    "mer_desc_local": "No Fee!",
    "mer_desc": "No Fee!",
    "mer_p_fee": 0,
    "mer_pd_fee": 0,
    "mer_t_desc": "$100.00 TTD",
    "mer_t_fee": 0,
    "mer_t": 100,
    "org_t_desc": "$100.00 TTD",
    "org_t": 100,
    "type": "TTD"
  }
}

Fee Breakdown Fields

Customer Fees
FieldTypeDescription
cus_calc_desc_1cus_calc_desc_5stringStep-by-step fee calculation for the customer
cus_d_feenumberCustomer flat (dollar) fee component
cus_p_feenumberCustomer percentage fee rate
cus_pd_feenumberCustomer percentage fee amount (calculated)
cus_t_feenumberTotal fee charged to the customer
cus_tnumberCustomer total (amount + customer fee)
cus_t_descstringFormatted customer total with currency
cus_desc_localstringFee description in local currency
cus_descstringFee description in USD
Merchant Fees
FieldTypeDescription
mer_calc_desc_1mer_calc_desc_5stringStep-by-step fee calculation for the merchant
mer_d_feenumberMerchant flat (dollar) fee component
mer_p_feenumberMerchant percentage fee rate
mer_pd_feenumberMerchant percentage fee amount (calculated)
mer_t_feenumberTotal fee charged to the merchant
mer_tnumberAmount the merchant receives
mer_t_descstringFormatted merchant total with currency
mer_desc_localstringFee description in local currency
mer_descstringFee description in USD
General
FieldTypeDescription
fee_namestringDisplay name of the fee structure (e.g., "Customer Pay")
org_tnumberOriginal transaction amount
org_t_descstringFormatted original amount with currency
typestringCurrency code used for the calculation

400 Bad Request

Returned when a required query parameter is missing or invalid.

{
  "message": "The fee structure field is required. (and 2 more errors)"
}

401 Unauthorized

{
  "message": "Unauthorized"
}

403 Forbidden

{
  "message": "Invalid scope(s) provided."
}

Example

curl -X GET "https://ttsb.wipayfinancial.com/wapi/transactions/fees?fee_structure=customer_pay&currency=TTD&amount=100.00" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"