---
description: >-
  A transaction rule defines following for a particular sales channel : The due
  date for invoices and Applicable fees
---

# Transaction rules

## The `Transaction Rule` Object

{% tabs %}
{% tab title="Attributes" %}
| Attributes           | Type      | Description                                                                                                                                        |
| -------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transactionId`      | `string`  | Unique Id for any transaction rule                                                                                                                 |
| `ruleName`           | `string`  | Name of the transaction rule                                                                                                                       |
| `channelId`          | `string`  | Unique Key for a sales Channel associated with this transaction.                                                                                   |
| `channelName`        | `string`  | Name of the channel for which rule is created                                                                                                      |
| `portalId`           | `string`  | Id of portal (Ex. Amazon, Flipkart) for which transaction rule is created                                                                          |
| `feeName`            | `string`  | Fees for which the transaction rule is created                                                                                                     |
| `status`             | `boolean` | <p><code>Active</code> or <code>Inactive</code> status of a transaction rule, </p><p>Reconciliation is not done for rules with Inactive status</p> |
| `paymentSender`      | `string`  | The one who is responsible for the payment                                                                                                         |
| `paymentReceiver`    | `string`  | The one who receives the payment                                                                                                                   |
| `dueDays`            | `number`  | Number of days in which payment will be due                                                                                                        |
| `settlementType`     | `string`  | <p>Frequency at which payment will be received,</p><p>Refer<a href="#enum-settlementtype"><code>Enum: WEEKLY, MONTHLY, DAILY</code></a></p>        |
| `settlementDates`    | `string`  | Date of month at which payment is received  iff `settlementType` is MONTHLY                                                                        |
| `settlementWeekdays` | `string`  | <p>Day of week at which payment is received  iff</p><p><code>settlementType</code> is WEEKLY</p>                                                   |
| `createdAt`          | `string`  | The datetime, at which transaction rule is created                                                                                                 |
| `updatedAt`          | `string`  | The datetime, at which transaction rule is updated                                                                                                 |
{% endtab %}

{% tab title="Sample Object" %}
```
{
   "transactionId": "4",
   "channelId": "218",
   "portalId": "2",
   "ruleName": "TR1",
   "status": true,
   "createdAt": "2019-09-10T13:19:01.000Z",
   "updatedAt": "2019-09-10T13:19:01.000Z",
   "paymentSender": "0",
   "paymentReceiver": "0",
   "dueDays": 7,
   "settlementType": "weekly",
   "settlementDates": "",
   "settlementWeekdays": "Thursday",
   "feeId": [
    "1",
    "3",
    "5"
   ],
   "channelName": "Amazon_Velocity_Raymond",
   "feeName": "Commission Fee,Easy Ship Fee,Fixed Closing Fee MFN",
   "editable": true
  }
```


{% endtab %}
{% endtabs %}

### Enum: settlementType

| Attributes | Description                                  |
| ---------- | -------------------------------------------- |
| `DAILY`    | Payment will be received `DAILY`             |
| `WEEKLY`   | Payment will be received on `WEEKLY` basis.  |
| `MONTHLY`  | Payment will be received on `MONTHLY` basis. |
