# Purchase link shortcode

The \[\[purchase\_link\]\] shortcode is used to display a purchase button for any download anywhere on your site. The button/link that is outputted will add the specified digital product to the shopping cart.

A default \[\[purchase\_link\]\] is available for every Download in the Download&#039;s settings, under Purchase Shortcode. You can copy/paste this link as is or update it with the optional parameters below.

![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cc8182153.png)The shortcode accepts a few optional parameters:

- *id* – the ID number of the download for the button
- *sku* – the assigned SKU value for the download (if enabled)
- *price* – whether to show the product price or not. 1 to show it, 0 to hide it.
- *text* – the text displayed on the button
- *style* – the style of the purchase link, either “button” or “text”
- *color*- the color of the button (when using the “button” style”: 
    - gray
    - blue
    - green
    - dark gray
    - yellow
- *class* – one or more custom CSS classes you want to be applied to the button
- *price\_id* - the variable price ID to create a purchase button for
- *direct* – If set to &quot;true&quot;, it will use &quot;[Buy Now](https://easydigitaldownloads.com/docs/buy-now-buttons/)&quot; mode, which bypasses the cart/checkout screen altogether. If set to &quot;false&quot;, it will add the product to the cart.

Example:

```
[purchase_link id=&quot;94&quot; text=&quot;Add to Cart&quot; style=&quot;button&quot;]
```

A purchase button for a specific price option:

```
`[purchase_link id=&quot;94&quot; text=&quot;Add to Cart&quot; style=&quot;button&quot; price_id=&quot;2&quot;]`
```

Direct Purchase Example:

```
`[purchase_link id=&quot;94&quot; text=&quot;Buy Now&quot; style=&quot;button&quot; direct=&quot;true&quot;]`
```