Skip to content

Instantly share code, notes, and snippets.

@SimonHoiberg
Created June 19, 2020 14:56
Show Gist options
  • Save SimonHoiberg/7988de5f913362e2e3361b4f5b42e810 to your computer and use it in GitHub Desktop.
Save SimonHoiberg/7988de5f913362e2e3361b4f5b42e810 to your computer and use it in GitHub Desktop.
class StripeManager {
...
public static async retryInvoice(customerID: string, paymentMethodID: string, invoiceID: string) {
const request = await fetch('https://your-endpoint/stripe/retry-invoice', {
method: 'POST',
body: JSON.stringify({
customerID,
paymentMethodID,
invoiceID,
}),
});
await request.json();
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment