#Sadness ;'(-payment-element
1 messages ยท Page 1 of 1 (latest)
Hi ๐ the process for creating a Payment Method still requires the use of a client secret, but it's from a Setup Intent rather than a Payment Intent. This guide walks through that:
https://stripe.com/docs/payments/save-and-reuse
https://stripe.com/docs/api/payment_methods/create Only type is required and publishable key
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That section also mentions that we don't recommend interacting with it directly, but rather use a Payment Intent or Setup Intent.
yeah i know
but i have very uncommon flow
Can you elaborate?
I need to send additonal data on payment confirmation.
so the best way is to create the payment method on frontend to be PCI compliant and then send payment method id to backend with required data
What type of additional data?
We have a function in our client-side library for creating a payment method:
https://stripe.com/docs/js/payment_methods/create_payment_method
JSON object with some user related information.
Ah gotcha. I'd recommend taking a look at that Stripe.js function and see if it looks like what you want.