---
title: "Export Commission Statement (CSV)"
method: GET
path: "/v4/commissions/report/{statementId}/csv"
tags: ["Gateway Features", "Billing & Commission"]
---

# Export Commission Statement (CSV)

`GET /v4/commissions/report/{statementId}/csv`

## Request

- Base URL: `https://sandbox.nmi.com/api`
- URL: `https://sandbox.nmi.com/api/v4/commissions/report/{statementId}/csv`
- Auth: API key in header `Authorization`

> 📘 Commission statements
>
> This endpoint is available only if your partner account has access to the commission statements. Your API key must belong to a partner user with the commission permission. You can export only your own statements.

<details>
<summary>Usage</summary>

Load your commission into your own reporting or accounting tools. This endpoint downloads the commission report for a statement as a ZIP archive of CSV files. The report is available in any status.


| File                           | Contents                                                                   |
| ------------------------------ | -------------------------------------------------------------------------- |
| `merchant_payment.csv`         | Merchant invoice payments, one row per fee                                 |
| `merchant_payment_return.csv`  | Returned merchant invoice payments, one row per fee                        |
| `affiliate_payment.csv`        | Sub-partner invoice payments, one row per fee                              |
| `affiliate_payment_return.csv` | Returned sub-partner invoice payments, one row per fee                     |
| `third_party_commissions.csv`  | Revenue share, one row per entry                                           |
| `adjustment.csv`               | Manual adjustments                                                         |
| `starting_balance.csv`         | Starting balance                                                           |
| `payment.csv`                  | Commission payouts                                                         |
| `all_lines.csv`                | Every line item on the statement, one row each                             |
| `manifest.json`                | Statement identifiers, period, balances, and the record count of each file |


Every CSV file is always present in the archive. When there are no entries of a certain line item type, only the header is present in the file.

`manifest.json` contains `statement_id`, `status`, `customer_id`, `external_customer_id` (your gateway partner ID), `period_start` and `period_end` (`YYYY-MM-DD`), `opening_balance`, `balance`, `generated_at` (`YYYY-MM-DD`, UTC), and `files` (`name`, `record_count`).

Balances can change until the statement is `finalized`.

On success the response is the ZIP file. On an error the response is JSON.

</details>

## Path parameters

- `statementId` string, uuid, required

## Headers

- `Authorization` string, required

## Response `200`

A ZIP archive of CSV files for the statement.

## Other responses

- `401`: The API key is missing or not valid.
- `403`: The key cannot access this resource: it lacks the commission permission, the partner does not have access to the commission statements, or the statement belongs to another partner.
- `404`: The statement does not exist.
- `422`: The statement ID is not valid.
- `500`: The statement service could not complete the request.

---

[API](https://skmtc.dev/nmi/apis/payments-api.md) - [All operations](https://skmtc.dev/nmi/apis/payments-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nmi/apis/payments-api/revisions/c03727f27e27?raw)
