Poool Subscribe SDK for Node.js 🚀
yarn add @poool/subscribe-node-sdk node-fetch query-string
import Subscribe from '@poool/subscribe-node-sdk';
const subs = Subscribe({
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
});
subs.offers.list().then(({ offers, total }) => console.log(offers, total));
https://poool.dev/docs/subscribe/server
You can use the sandbox mode to test your integration without any real payment.
Pass the sandbox: true
request option (last parameter) to any method of the SDK to use it:
subs.offers.list(1, 10, [], [], 'active', { sandbox: true })
customers.switchSubscriptionOffer(customerId, subscriptionId, offer, requestOptions)
becomescustomers.switchSubscriptionOffer(customerId, subscriptionId, offer, **{ priceId }**, requestOptions)
-> it now takes an additional parameter before request options to speficy offer options like price idsandbox: true|false
is now an option on every request (instead of only offers list) and has been removed fromoffers.list()
Please check the CONTRIBUTING.md doc for contribution guidelines.
Install dependencies:
yarn install
Run examples:
yarn serve
And test your code:
yarn test
This software is licensed under MIT.