# Payment Method Level Model

This model represents common validation parameters that will be sent to the processor for Level 2 or 3 validation once enabled in the Partner's site or sent in the transaction's creation process.

### Examples

Level 2 example object sent in the Transactions/Init request body

```json
{
  //...
  "level": {
    "value": 2,
    "transactionId": "10",
    "tax": {
      "amount": "0.01"
    }
  }
}
```

Level 3 example object sent in the Transactions/Init request body

```json
{
  //...
  "level": {
    "value": 3,
    "transactionId": "10",
    "invoiceCode": "INV001",
    "productsCode": "1010",
    "shipping": {
      "zipCode": "90000",
      "amount": "1.02",
      "dutyAmount": "0.01"
    },
    "tax": {
      "amount": "0.01",
      "details": [
        {
          "type": "test",
          "amount": "0.01",
          "rate": "1.00",
          "category": "VAT"
        }
      ]
    },
    "discount": {
      "amount": "0.01"
    },
    "customer": {
      "govtVatId": "Customer VAT"
    }
  }
}
```

<table><thead><tr><th width="271.75390625">Field</th><th width="127.33203125">Type</th><th width="120.140625">Level</th><th>Constraint</th></tr></thead><tbody><tr><td>value</td><td>enum</td><td>2 | 3</td><td>value 2 or 3</td></tr><tr><td>transactionId</td><td>string</td><td>2 | 3</td><td></td></tr><tr><td>invoiceCode</td><td>string</td><td>3</td><td></td></tr><tr><td>productsCode</td><td>string</td><td>3</td><td></td></tr><tr><td>shipping</td><td>object</td><td>3</td><td></td></tr><tr><td>shipping.zipCode</td><td>string</td><td>3</td><td>valid zip/postal code</td></tr><tr><td>shipping.amount</td><td>string</td><td>3</td><td>decimal, e.g. "1.02"</td></tr><tr><td>shipping.dutyAmount</td><td>string</td><td>3</td><td>decimal, e.g. "1.02"</td></tr><tr><td>tax</td><td>object</td><td>2 | 3</td><td></td></tr><tr><td>tax.amount</td><td>string</td><td>2 | 3</td><td>decimal, e.g. "1.02"</td></tr><tr><td>tax.details</td><td>array</td><td>3</td><td></td></tr><tr><td>tax.details[n]</td><td>object</td><td>3</td><td></td></tr><tr><td>tax.details[n].type</td><td>string</td><td>3</td><td></td></tr><tr><td>tax.details[n].amount</td><td>string</td><td>3</td><td>decimal, e.g. "1.02"</td></tr><tr><td>tax.details[n].rate</td><td>string</td><td>3</td><td>decimal, e.g. "1.02"</td></tr><tr><td>tax.details[n].category</td><td>string</td><td>3</td><td></td></tr><tr><td>discount</td><td>object</td><td>3</td><td></td></tr><tr><td>discount.amount</td><td>string</td><td>3</td><td>decimal, e.g. "1.02"</td></tr><tr><td>customer</td><td>object</td><td>3</td><td></td></tr><tr><td>customer.govtVatId</td><td>string</td><td>3</td><td></td></tr></tbody></table>

***

### Payment method constraints

#### Coastal Pay

<table><thead><tr><th width="273.6484375">Field</th><th width="128.35546875">Type</th><th width="120.2734375">Level</th><th>Constraint</th></tr></thead><tbody><tr><td>tax.details[n].category</td><td>enum</td><td>3</td><td><p>values: </p><pre class="language-json"><code class="lang-json">[
    "SERVICE",
    "DUTY",
    "VAT",
    "ALTERNATE",
    "NATIONAL TAXEXEMPT"
]
</code></pre></td></tr><tr><td>tax.details[n].rate</td><td>range</td><td>3</td><td>min: "0", max: "100"</td></tr></tbody></table>

Required [product-model](https://docs.sensepass.com/sensepay/transaction-api/models/product-model "mention") with the (minimum) following keys for Level 3: "posIdentifier", "name", "measurementUnit", "quantity", "amount", "itemNumber".
