# Get Commissions

This endpoint returns commission rates for various transaction types, currencies, and customers, allowing partners to view their commission structures and overrides.

**Endpoint**

`GET/v2/billing/commission`

**Link**

{% embed url="<https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Billing_GetCommissions>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `GET`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/billing/commission`

#### **Query Parameters**

**Currency & Transaction Filters**

| Parameter             | Type     | Description                           | Required | Example    |
| --------------------- | -------- | ------------------------------------- | -------- | ---------- |
| **`currencyIsoFrom`** | `string` | **Source currency ISO code**.         | No       | `USD`      |
| **`currencyIsoTo`**   | `string` | **Target currency ISO code**.         | No       | `EUR`      |
| **`operationType`**   | `string` | **Type of operation** (see values).   | No       | `TRANSFER` |
| **`paymentType`**     | `string` | **Payment method type** (see values). | No       | `SWIFT`    |

**Customer Filters**

| Parameter              | Type      | Description                | Required | Example       |
| ---------------------- | --------- | -------------------------- | -------- | ------------- |
| **`customerCuid`**     | `string`  | **Customer identifier**.   | No       | `cust_abc123` |
| **`customerName`**     | `string`  | **Customer name**.         | No       | `Acme Corp`   |
| **`withAllCustomers`** | `boolean` | **Include all customers**. | No       | `true`        |

**Date Range Filters**

| Parameter           | Type     | Description                           | Required | Example                |
| ------------------- | -------- | ------------------------------------- | -------- | ---------------------- |
| **`fromCreatedAt`** | `string` | **Start creation date** (ISO format). | No       | `2024-01-01T00:00:00Z` |
| **`toCreatedAt`**   | `string` | **End creation date** (ISO format).   | No       | `2024-03-31T23:59:59Z` |
| **`fromUpdatedAt`** | `string` | **Start update date** (ISO format).   | No       | `2024-01-01T00:00:00Z` |
| **`toUpdatedAt`**   | `string` | **End update date** (ISO format).     | No       | `2024-03-31T23:59:59Z` |

**Operation Type Values**

* `NOTSET` - No specific type
* `DEPOSIT` - Deposit operations
* `TRANSFER` - Transfer operations
* `WITHDRAW` - Withdrawal operations
* `COMMISSION` - Commission operations
* `EXCHANGE` - Currency exchange
* `CORRECTING` - Correction operations

**Payment Type Values**

* `PAYMENT_TYPE_NOT_SET` - No specific payment type
* `EMPTY` - Empty payment type
* `ACH` - Automated Clearing House
* `FEDWIRE` - Fedwire transfers
* `SWIFT` - SWIFT transfers
* `CRYPTO` - Cryptocurrency
* `EFT` - Electronic Funds Transfer
* `SEPA_CT` - SEPA Credit Transfer
* `IMPS` - Immediate Payment Service

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns an array of commission configurations matching the filter criteria.

#### **Response Fields**

**Commission Object (`items[]`)**

| Field                 | Type     | Description                        | Example                |
| --------------------- | -------- | ---------------------------------- | ---------------------- |
| **`currencyIsoFrom`** | `string` | **Source currency ISO code**.      | `USD`                  |
| **`currencyIsoTo`**   | `string` | **Target currency ISO code**.      | `EUR`                  |
| **`operationType`**   | `string` | **Operation type**.                | `TRANSFER`             |
| **`paymentType`**     | `string` | **Payment method type**.           | `SWIFT`                |
| **`createdAt`**       | `string` | **Commission creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updatedAt`**       | `string` | **Last update timestamp**.         | `2024-03-20T14:22:00Z` |
| **`customerCuid`**    | `string` | **Customer identifier**.           | `cust_abc123`          |
| **`customerName`**    | `string` | **Customer name**.                 | `Acme Corporation`     |

**Commission Structure (`commission`)**

| Field         | Type     | Description                            | Example |
| ------------- | -------- | -------------------------------------- | ------- |
| **`partner`** | `object` | **Partner-specific commission rates**. |         |
| → `percent`   | `number` | **Percentage commission rate**.        | `0.5`   |
| → `fixed`     | `number` | **Fixed commission amount**.           | `2.5`   |
| **`default`** | `object` | **Default system commission rates**.   |         |
| → `percent`   | `number` | **Percentage commission rate**.        | `1.0`   |
| → `fixed`     | `number` | **Fixed commission amount**.           | `5.0`   |

**Example Response:**

```json
{
  "items": [
    {
      "currencyIsoFrom": "USD",
      "currencyIsoTo": "EUR",
      "operationType": "TRANSFER",
      "paymentType": "SWIFT",
      "commission": {
        "partner": {
          "percent": 0.5,
          "fixed": 2.5
        },
        "default": {
          "percent": 1.0,
          "fixed": 5.0
        }
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-03-20T14:22:00Z",
      "customerCuid": "cust_abc123",
      "customerName": "Acme Corporation"
    },
    {
      "currencyIsoFrom": "EUR",
      "currencyIsoTo": "GBP",
      "operationType": "EXCHANGE",
      "paymentType": "SEPA_CT",
      "commission": {
        "partner": {
          "percent": 0.3,
          "fixed": 1.5
        },
        "default": {
          "percent": 0.8,
          "fixed": 3.0
        }
      },
      "createdAt": "2024-02-01T09:15:00Z",
      "updatedAt": "2024-02-01T09:15:00Z",
      "customerCuid": null,
      "customerName": null
    }
  ]
}
```

***

### **Examples**

#### **Basic Commission Query (cURL)**

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/billing/commission' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

#### **Filter by Currency and Operation**

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/billing/commission?currencyIsoFrom=USD&currencyIsoTo=EUR&operationType=TRANSFER' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

#### **Filter by Customer and Date Range**

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/billing/commission?customerCuid=cust_abc123&fromCreatedAt=2024-01-01T00:00:00Z&toCreatedAt=2024-03-31T23:59:59Z' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
2. **Invalid Date Format**:

   ```json
   { "error": "Invalid date format for fromCreatedAt" }
   ```
3. **Invalid Operation Type**:

   ```json
   { "error": "Invalid operation type: INVALID_TYPE" }
   ```

***

### **Notes**

#### **Commission Hierarchy**

* **Partner rates**: Custom rates specific to your partner account
* **Default rates**: Base rates that apply when no partner rates exist
* **Customer-specific overrides**: Rates that apply to specific customers

#### **Filtering Logic**

* Multiple filters are combined with AND logic
* Omitted filters return all matching records
* Date ranges are inclusive
* Currency filters can be used for conversion rate commissions

#### **Best Practices**

* Cache commission data to reduce API calls
* Use specific filters to narrow down results
* Monitor `updatedAt` for changes in commission structures
* Handle null customer fields for general commission rates

**Common Use Cases**:

* Displaying commission rates in partner dashboards
* Calculating expected earnings from transactions
* Auditing commission structures and changes
* Customer-specific rate negotiations

**Rate Calculation Example**:\
For a $1000 transfer with 0.5% + $2.50 commission:

```javascript
amount = 1000
commission = (amount * 0.005) + 2.50 = $7.50
```

**Data Freshness**:

* Commission rates may change based on market conditions
* Always use the latest rates for accurate calculations
* Consider implementing rate change notifications

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTczNTM5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.XjFwaZNQo1LGgvylorJLRZqXyJP11bx2HNtIGbbClf0
currencyCodeFrom: EUR
currencyCodeTo: string
customerId: Dnewcvn-euuI-vG0FZCRDjLXS
customerName: Test Eugen Test Eugen
fromCreatedAt:

```

Response sample

```postman_json
{
  "items": [
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "EMPTY",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "ACH",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "FEDWIRE",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "SWIFT",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "CRYPTO",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "EFT",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "SEPA_CT",
      "commission": {
        "partner": {
          "percent": 0.1,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "IMPS",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.delos.financial/commissions/get-commissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
