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

# Granting Bonuses

> You can grant bonuses using the web app or API.

<Tabs>
  <Tab title="Web App">
    To grant bonues to customers via the Web App...

    <Steps>
      <Step title="Go to customer details page">
        Go to the [customers page](https://app.priceos.com/customers) and find and click on a customer.
      </Step>

      <Step title="Click grant bonus">
        Scroll down to the bonuses section and click the <b>Grant Bonus</b> button

        <img src="https://mintcdn.com/priceos/ajKnnXzH4aBvtSvO/images/bonus.png?fit=max&auto=format&n=ajKnnXzH4aBvtSvO&q=85&s=5e3bdd5e773067148bd0a2b900ced735" alt="Bonuses section in customer details page in PriceOS" width="710" height="313" data-path="images/bonus.png" />
      </Step>

      <Step title="Set options">
        Select a feature, input an amount, and optionally set a reason and expiration date

        <img src="https://mintcdn.com/priceos/ajKnnXzH4aBvtSvO/images/grantBonusDialog.png?fit=max&auto=format&n=ajKnnXzH4aBvtSvO&q=85&s=0ebce105a11105812e6686e7d98414ff" alt="Grant bonus dialog page in PriceOS" width="992" height="701" data-path="images/grantBonusDialog.png" />
      </Step>

      <Step title="Save">
        Click the <b>Grant Bonus</b> button
      </Step>
    </Steps>
  </Tab>

  <Tab title="API + SDK">
    You can use the [create bonus endpoint](/api-reference/endpoint/bonuses) to grant bonuses to a customer.

    <CodeGroup>
      ```ts TypeScript theme={null}
      const result = await priceos.bonuses.create({
        customerId: "customer_123",
        featureKey: "api_calls",
        amount: 100,
        expiresAt: Date.parse("2026-12-31T23:59:59.000Z"),
        reason: "promotion",
        metadata: {
          campaign: "winter_promo",
        },
      });
      ```

      ```bash cURL theme={null}
      curl -X POST "https://api.priceos.com/v1/bonuses" \
        -H "x-api-key: PRICEOS_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "customerId": "customer_123",
          "featureKey": "api_calls",
          "amount": 100,
          "expiresAt": 1798761599000,
          "reason": "promotion",
          "metadata": {
            "campaign": "winter_promo"
          }
        }'
      ```
    </CodeGroup>
  </Tab>
</Tabs>
