<!-- ZenPays documentation · https://docs.zenpayz.com/docs/reference/objects/commission -->

# The Commission object

Represents a commission charged on a transaction. Commissions are fees collected by ZenPays for processing payments, payouts, or refunds.

## Fields

<ParamTable
  label="Field"
  rows={[
    { name: "id", type: "string", required: true, desc: "Unique identifier for the commission record" },
    { name: "merchantId", type: "string", required: true, desc: "ID of the merchant who was charged" },
    { name: "transactionId", type: "string", required: true, desc: "ID of the transaction that generated the commission" },
    { name: "amount", type: "number", required: true, desc: "Commission amount in the smallest currency unit" },
    { name: "rate", type: "number", required: true, desc: "Commission rate applied (as a decimal, e.g., 0.029 for 2.9%)" },
    { name: "currency", type: "string", required: true, desc: "Three-letter ISO currency code" },
    { name: "type", type: "'payment' | 'payout' | 'refund'", required: true, desc: "Type of transaction the commission was charged on" },
    { name: "createdAt", type: "string", required: true, desc: "ISO 8601 timestamp when the commission was charged" },
  ]}
/>

## Example

```json
{
  "id": "obj_1a2b3c",
  "merchantId": "merchant_1a2b3c",
  "transactionId": "transaction_1a2b3c",
  "amount": 5000,
  "rate": 1,
  "currency": "USD",
  "type": "payment",
  "createdAt": "2026-01-15T09:30:00Z"
}
```
