const url = 'https://api.sureshake.com/v2/billing/checkout';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
planId: 'individual_starter',
billingCycle: 'monthly',
entityId: '156e622c-6cdf-4c27-9bc9-2f2db69919f5',
successUrl: 'http://example.com',
cancelUrl: 'http://example.com'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));