Skip to content

Instantly share code, notes, and snippets.

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