An open API service indexing awesome lists of open source software.

https://github.com/bold-commerce/bold-subscriptions-js

This Javascript API makes it easy to add subscriptions to the cart and navigate to the Bold Subscriptions or Cashier checkout.
https://github.com/bold-commerce/bold-subscriptions-js

snyk-scan

Last synced: about 1 year ago
JSON representation

This Javascript API makes it easy to add subscriptions to the cart and navigate to the Bold Subscriptions or Cashier checkout.

Awesome Lists containing this project

README

          

# BoldSubscriptions.js

> :warning: This package is meant for Bold Subscriptions v1 which is no longer installable and has been replaced by Bold Subscriptions v2. See the [Bold Developer Portal](https://developer.boldcommerce.com/) for the latest developer documentation.

## About

Use these Javascript APIs to easily build custom subscription flows, add subscriptions to the cart and navigate to the Bold Subscriptions or Cashier checkout. The available methods are a fast alternative to and largely based off of our [Custom Subscription Flow](https://docs.boldapps.net/subscriptions/storefront#custom-subscription-flow) and [Widget API](https://docs.boldapps.net/subscriptions/storefront#widget-api) documentation. Included with these API methods are detailed exceptions and error messages to help you quickly and reliably develop custom subscription flows.

## Browser Support

![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
--- | --- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |

## Installing

Using npm:

```shell
$ npm install @boldcommerce/bold-subscriptions-js
```

Using yarn:

```shell
$ yarn add @boldcommerce/bold-subscriptions-js
```

Using CDN:

```html

```

## API Reference

To view our full documentation on the available methods head over to our [BoldSubscriptions.js API reference](https://docs.boldapps.net/subscriptions/storefront#boldsubscriptions-js).

### Example Node.js usage

```javascript
import { cart } from '@boldcommerce/bold-subscriptions-js';
cart.standard.addToCart({
'id': 1250183643165,
properties: {
'group_id': 1234,
'frequency_num': 1,
'frequency_type': 3,
'frequency_type_text': 'Every 1 Month(s)',
}
})
.then(() => alert('Successfully added!'));
```

### Example CDN usage

```html








Checkout

```

## Contributing

This project is read only. Please contact [Bold Commerce](https://boldcommerce.com/) with any changes or additions you would like to make.

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/bold-commerce/bold-subscriptions-js/blob/master/LICENSE.md) file for details.