> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wepayout.co/llms.txt
> Use this file to discover all available pages before exploring further.

# About Markup

> Understanding markup solution

Allows merchants to generate additional revenue by applying a flexible, custom markup to their submerchants' transactions, with WePayments' fees charged separately for different payment methods and transaction types.

***

## Configuration Levels (Scopes)

Merchants can configure markup at three different levels of priority:

### Global (Merchant Level)

The merchant defines a markup that will be applied to **all charges from all submerchants**.

### By Submerchant

The merchant can define specific markups for **each individual submerchant**.

### Inline in Request (By Charge or Payment)

When creating a charge or payment, the merchant can send a specific `markup` object.

**Priority Rule:** The inline markup configuration takes priority over all other markup settings.

<Note>
  **If there is no specific configuration → the global markup is applied when merchant has the markup feature enabled.**
</Note>

***

## Markup Types

### Fixed

The same fixed markup value is applied to all charges/payments, regardless of the transaction amount.

### Percentage

The markup value is calculated as a percentage of the charge/payment amount.

This type includes delimiter fields to define a valid range for the final markup amount:

* `min_charge_value`: The minimum markup amount to be charged.

* `max_charge_value`: The maximum markup amount to be charged.

#### Percentage Calculation Logic

1. The system calculates the raw percentage value (transaction\_amount \* percentage).

2. If the calculated value is **less** than min\_charge\_value, the min\_charge\_value is applied.

3. Else if the calculated value is **greater** than max\_charge\_value, the max\_charge\_value is applied.

4. Otherwise, the exact calculated value is applied.

Examples (BRL):

| Transaction | Markup % | Min Value | Max Value | Calculation | Applied  | Reason                                       |
| ----------- | -------- | --------- | --------- | ----------- | -------- | -------------------------------------------- |
| R\$ 10.00   | 0.3%     | R\$ 0.05  | R\$ 0.15  | R\$ 0.03    | R\$ 0.05 | Uses min\_charge\_value (0.03 \< 0.05)       |
| R\$ 10.00   | 1.7%     | R\$ 0.05  | R\$ 0.15  | R\$ 0.17    | R\$ 0.15 | Uses max\_charge\_value (0.17 > 0.15)        |
| R\$ 10.00   | 1.2%     | R\$ 0.05  | R\$ 0.15  | R\$ 0.12    | R\$ 0.12 | Uses calculated value (0.05 \< 0.12 \< 0.15) |

## Related Resources

<CardGroup cols={2}>
  <Card title="Creating Markup via API" icon="code" href="/markup/creating-markup-api">
    Guide for configuring markup using the API
  </Card>

  <Card title="Create Merchant Markup" icon="plus" href="/api-reference/markup/account/create-merchant-markup">
    Create new markup configurations
  </Card>

  <Card title="List Merchant Markups" icon="list" href="/api-reference/markup/account/list-merchant-markups">
    View all markup configurations
  </Card>

  <Card title="Create Payin with Inline Markup" icon="file" href="/api-reference/markup/payin/create-payin-with-inline-markup">
    Use inline markup when creating payin charges
  </Card>
</CardGroup>
