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| Access | Requirement |
|---|---|
| Authenticated | Yes |
| Required Scope | wapi-transactions-get-fees, or wapi-transactions-all |
| Rate Limit | 60 requests per minute |
Request
Headers
| Header | Value |
|---|---|
Accept | application/json |
Authorization | Bearer <access_token> |
X-WAPI-Key | wapi_live_<kid>_<secret> or wapi_test_<kid>_<secret> |
Send exactly one of Authorization or X-WAPI-Key.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fee_structure | string | Yes | One of "customer_pay", "merchant_absorb", or "split" |
currency | string | Yes | Currency code: "TTD" or "USD" |
amount | numeric | Yes | Transaction 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
| Field | Type | Description |
|---|---|---|
cus_calc_desc_1 – cus_calc_desc_5 | string | Step-by-step fee calculation for the customer |
cus_d_fee | number | Customer flat (dollar) fee component |
cus_p_fee | number | Customer percentage fee rate |
cus_pd_fee | number | Customer percentage fee amount (calculated) |
cus_t_fee | number | Total fee charged to the customer |
cus_t | number | Customer total (amount + customer fee) |
cus_t_desc | string | Formatted customer total with currency |
cus_desc_local | string | Fee description in local currency |
cus_desc | string | Fee description in USD |
Merchant Fees
| Field | Type | Description |
|---|---|---|
mer_calc_desc_1 – mer_calc_desc_5 | string | Step-by-step fee calculation for the merchant |
mer_d_fee | number | Merchant flat (dollar) fee component |
mer_p_fee | number | Merchant percentage fee rate |
mer_pd_fee | number | Merchant percentage fee amount (calculated) |
mer_t_fee | number | Total fee charged to the merchant |
mer_t | number | Amount the merchant receives |
mer_t_desc | string | Formatted merchant total with currency |
mer_desc_local | string | Fee description in local currency |
mer_desc | string | Fee description in USD |
General
| Field | Type | Description |
|---|---|---|
fee_name | string | Display name of the fee structure (e.g., "Customer Pay") |
org_t | number | Original transaction amount |
org_t_desc | string | Formatted original amount with currency |
type | string | Currency 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¤cy=TTD&amount=100.00" \
-H "Accept: application/json" \
-H "Authorization: Bearer <access_token>"