- This is a sample app demonstrating how to Programmatically Create Subscriptions with Bold Commerce.
- This is an example of using the BigCommerce OS Checkout to create the initial order.
- Demo Subscription Items
- Add an item to cart & proceed to checkout
- If you have a subscription item in cart it will ask you to first create an account during checkout.
- Proceed to payment and use test cart 4111 1111 1111 1111
- After the order is placed navigate to the Account Area > Manage Subscriptions to view your subscription.
- Node >= v14.
- NPM >= v6.
- configure your .env file based on the sample-env file.
- cd into the root directory
- npm install
- npm run dev - to test locally
- Add and start ngrok. Note: use port 8000 to match your Express server.
- npm install ngrok
- ngrok http 8000
- Register a webhook with BigCommerce using the ngrok domain in your destination & webhook header using your BigCommerce Auth Token for security.
- Add a BigCommerce Order Id in your .env
- npm run test
-
After the initial order is placed a BigCommerce Webhook is used to capture the order contents, Filter the Payments API & Create a Bold Subscription.
-
This example is using the Braintree Sandbox environment which can be updated to production within the .env file.
- Please see the sample-env for more details.
- Making API Calls with Braintree
- Platform Configuration
- Install Bold Checkout & Bold Subscriptions on BigCommerce.
- Use the same Braintree Credentials in both the Bold Checkout App & BigCommerce Payments area.
- In BigCommerce > Payments > Braintree > Enable Stored Credit Cards with Braintree
- In BigCommerce > Payments > Braintree > Disable Required CVV when using a stored credit card.
- In BigCommerce > Payments > Braintree > Enable PayPal & Enable Stored PayPal Account
- BigCommerce Checkout
- In BigCommerce > Advanced > Checkout > Checkout Type > Custom Checkout
- In BigCommerce > Advanced > Checkout > Script URL > Add the checkout source -Checkout Source
- In BigCommerce > Advanced > Checkout > Order > Disable customers to enter comments with their order.