Created
June 19, 2020 14:54
-
-
Save SimonHoiberg/65f721c70056478daecc0bede07f99ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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