comecerodocs

Retrieve a payment fee summary

GET
/payments/{payment_id}/fee_summary

Returns the fees on a payment added up, fixed and percentage apart, per currency. Secret and trusted tokens that may read fees only; any other token gets 401.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

payment_id*string

The id of the payment.

Query Parameters

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The fee summary.

application/json
  1. response

The fees charged on a payment, added up. Each currency's sums are kept apart in totals; the top-level amounts are those of the first currency.

object*"fee_summary"

The object type. Always fee_summary.

Value in"fee_summary"
url*|

The full URL of the summary. Null when the payment has no fees yet.

Formaturi
fixed_amount*number

The sum of fixed fees, in currency.

percentage_amount*number

The sum of percentage fees, in currency.

total*number

All fees, in currency.

currency*|

The currency of the top-level amounts. Null when there are no fees.

totals*array<>

The sums for each currency, the top-level currency first.

formatted?

The amounts as display strings. Only present with formatted=true.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/payments/string/fee_summary'
Example Response
{  "object": "fee_summary",  "url": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/fee_summary",  "fixed_amount": 0.3,  "percentage_amount": 6.23,  "total": 6.53,  "currency": "USD",  "totals": [    {      "currency": "USD",      "fixed_amount": 0.3,      "percentage_amount": 6.23,      "total": 6.53    }  ]}