Skip to content

Instantly share code, notes, and snippets.

@kevcjones-archived
Created November 1, 2020 10:15
Show Gist options
  • Save kevcjones-archived/467721a4752c3cf87c0df440901dc277 to your computer and use it in GitHub Desktop.
Save kevcjones-archived/467721a4752c3cf87c0df440901dc277 to your computer and use it in GitHub Desktop.
Typescript Stripe Payment Intent Creation
// Create a PaymentIntent with the order amount and currency.
const params: Stripe.PaymentIntentCreateParams = {
amount,
currency: 'gbp',
// eslint-disable-next-line
payment_method_types: ['card'],
// eslint-disable-next-line
statement_descriptor: 'Custom descriptor',
};
// Create the payment intent
const paymentIntent: Stripe.PaymentIntent = await stripe.paymentIntents.create(params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment