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

# Export Commission Statement (XLSX)

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

## Request

- Base URL: `https://sandbox.nmi.com/api`
- URL: `https://sandbox.nmi.com/api/v4/commissions/report/{statementId}/xlsx`
- 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>

Review or reconcile your commission in a spreadsheet. This endpoint downloads the commission report for a statement as an Excel (`.xlsx`) workbook. The report is available in any status. Sheets, in order:

- `Summary`: Statement ID, Status, Customer ID, External Customer ID (your numeric partner ID), Period Start, Period End, Opening Balance, Balance, Generated At. Dates are `YYYY-MM-DD`. Generated At is the UTC date.
- `Affiliate Payment`, `Merchant Payment`, `Merchant Payment Return`, `Affiliate Payment Return`: one row per fee. A payment with no fee breakdown is one row. Return sheets omit Your Cost and Resale Price.
- `Third Party Commissions`: one row per revenue share entry.
- `Adjustment`, `Starting Balance`, `Payment`.
- `All Lines`: one row per line item on the statement.

Balances can change until the statement is `finalized`.

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

</details>

## Path parameters

- `statementId` string, uuid, required

## Headers

- `Authorization` string, required

## Response `200`

The statement as an Excel workbook.

## 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)
