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.
- Host: GitHub
- URL: https://github.com/bold-commerce/bold-subscriptions-js
- Owner: bold-commerce
- License: mit
- Created: 2019-07-30T20:23:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T05:49:52.000Z (over 3 years ago)
- Last Synced: 2025-05-08T21:44:16.715Z (about 1 year ago)
- Topics: snyk-scan
- Language: JavaScript
- Homepage:
- Size: 1.6 MB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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
 |  |  |  |  |  |
--- | --- | --- | --- | --- | --- |
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.