#krustyflakes-paymentelement

1 messages ยท Page 1 of 1 (latest)

gentle dust
#

Hello! What issues are you having?

plain harbor
#

Hello, I already turned on a few payment options using the dashboard, my understanding is that if those are enabled once i get my secret and instantiate the PaymentSheet the "choose a payment method" should be automatically populated

#

i'm trying to figure out is this is a correct assumption and if theres anything else our backend or client should do for them to be presented

gentle dust
plain harbor
#

i was just seeing that example

#

intent = Stripe::PaymentIntent.create({
amount: 1099,
currency: 'usd',
automatic_payment_methods: {
enabled: true,
},
})

#

in the migration guide, ok so we need to add this automatic_payment_methods

gentle dust
#

Yup, you'd need to add that if you want to have the payment method types pulled from your dashboard settings

plain harbor
#

I just spoke to our BE engineer I shared with them the need to use automatic_payment_methods and they said they can't see this property, im guessing we are running an older version?

gentle dust
#

It should be available on all API versions, but are you maybe using a strongly typed language? If you're using an older version of one of server-side libraries that would explain it

plain harbor
#

And this is something recent

gentle dust
#

Yeah, this is something that was added in the past few months - if you give me more details on which library you're using I can point to when it was added

plain harbor
#

thank you

#

i think im clear now of what needs to be updated and what the client should expect moving forward

gentle dust
#

๐Ÿ‘ great!

plain harbor
#

if we weren't able to update just now

#

is there a workaround we could do so that native engineers could start testing the integration?

gentle dust
#

Hmmm... you could generate some one-off Payment Intents using curl or the CLI just to be used to see how the Payment Element will display them

plain harbor
#

is there a guide on how to do that?

#

so that i could try it myself

gentle dust
#

There isn't really an end-to-end guide - you can see an example of how to format the curl request here (https://stripe.com/docs/api/payment_intents/create?lang=curl, you'll need to pass in some additional parameters since the example is just doing the basics), and then you'd use that client secret in your client-side code instead of having your backend generate a new PI

plain harbor
#

thank you

gentle dust
#

I'm gonna head out soon, but if you have any other questions @solemn arch can help!