#zyondev_paymentsheet-setupintent

1 messages ยท Page 1 of 1 (latest)

knotty flameBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1245487762061135915

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

scenic moon
fossil depot
#

req_XWFBeKYQrs53nW

#

in Test Mode

#

To clear my task is to

  1. Save the payment method so users can use for future use
  2. Process the card for the current transaction
scenic moon
#

Do you need to explicitly set payment_method_type on the Setup Intent? If so, why?

fossil depot
#

no not specific reason i can think of

#

currenlty ["card"] is being passed in right?

scenic moon
#

I would just remove that from your creation request then so that Setup/Payment Intents can default to automatic payment methods

fossil depot
#

from Stripe Elements on a vue/html site, how do get the card data/payment method data to pass and save as the users payment methods in the future?

scenic moon
fossil depot
#

so looks like im getting the error when calling... const { error } = await this.stripe.confirmSetup({ elements: this.elements, clientSecret: this.clientSecret, confirmParams: { return_url: "https://example.com/order/123/complete", }, redirect: "if_required", });

scenic moon
#

Yeah, did you go back to the Setup Intent creation and remove payment_method_types?

knotty flameBOT
harsh rainBOT
fossil depot
#

so when calling stripe payment sheet... im calling with this...

const setupIntent = await stripe.setupIntents.create({ customer: customerId, });

#

thats how im getting the intent

#

and not passing 'payment_method_type'

grim karma
#

Can you share an exact SetupIntent id?

fossil depot
#

seti_1PLusjHZ6ociB84AaBmMbGwL_secret_QCJVT7KnWO7W9yVXNgHmkTdoFIoBqAk

grim karma
#

thanks give me a few minutes

fossil depot
#

ok

grim karma
#

zyondev_paymentsheet-setupintent

#

Okay so you are using an old API version from 2022 which always defaulted to card in the past. So you need to either

  1. Use a more recent API version in your server-side code (see https://docs.stripe.com/api/versioning)
  2. Explicitly pass automatic_payment_methods: { enabled: true }
fossil depot
#

i see

#

let me try with automatic_payment_methods: { enabled: true }

#

are there alot of other differences in 2024 version?

grim karma
#

not a lot no, but one fundamental one that is affecting you: in 2023 we made that automatic_payment_methods logic enabled by default. But if you use an older version you have to be explicit

fossil depot
#

im using apiVersion: "2020-08-27"

grim karma
#

you're on an old version of stripe-node too from a few years ago ๐Ÿ™‚

fossil depot
#

ok ill update

#

will my integration break when i upgrade to 15.8.0?

grim karma
#

I mean it depends. If you upgrade without reading any of the migration guides then yes it's likely. If you do take the time to read the migration guides and the changelog on the repo and make the relevant changes it will be fine!