Created
November 1, 2020 10:15
-
-
Save kevcjones-archived/467721a4752c3cf87c0df440901dc277 to your computer and use it in GitHub Desktop.
Typescript Stripe Payment Intent Creation
This file contains 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
// 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