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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/docs/checkout/sdk/discount-sdk",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Dintero Discount SDK

> Embed discounts from the Dintero Discount Service in your web pages with the @dintero/discounts-web-sdk frontend library and predefined components.

Use this SDK in your frontend application to embed one or more discounts from the Dintero Discount Service in your webpage.

### Installation

```node theme={null}
npm install @dintero/discounts-web-sdk
```

### Inline HTML JavaScript Example - Getting a list of discounts with API access

In this example the SDK will try to fetch data from the discount service.

Make sure to configure the plugin with an API client that only has grants giving access to the public:discounts scope.

```html theme={null}
<script type="text/javascript">
    const container = document.getElementById("checkout-container");
    discounts.embed({
        container: document.getElementById("deals-container"),
        api: {
            account: "P00000000",
            key: "public_api_key",
            secret: "abcdef01-2345-6789-abcd-ef0123456789",
        },
        theme: {
            fontSize: "14px",
            color: "rgba(0,0,0,1)",
            primary: "hotpink",
            secondary: "aqua",
            background: "#fff",
        },
    });
</script>
```

### Installation

For more detailed information about installation click [here](https://github.com/Dintero/Dintero.Discounts.Web.SDK)
