Skip to content

Instantly share code, notes, and snippets.

@SimonHoiberg
Created June 19, 2020 14:54
Show Gist options
  • Save SimonHoiberg/ef23011f41096dff8c7c9b0d6253fd5e to your computer and use it in GitHub Desktop.
Save SimonHoiberg/ef23011f41096dff8c7c9b0d6253fd5e to your computer and use it in GitHub Desktop.
class StripeManager {
...
public static async handleSubscription(subscriptionID: string, end: boolean) {
const request = await fetch('https://your-endpoint/stripe/handle-subscription', {
method: 'POST',
body: JSON.stringify({
subscriptionID,
end,
}),
});
return await request.json() as IStripeSubscription;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment