#sorieng_code

1 messages ¡ Page 1 of 1 (latest)

lavish quiverBOT
#

👋 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/1315679925222768640

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

thin oak
#

Can you share a sub_xxx or in_xxx ID or something where this is an issue?

#

Or the API request ID that throws the error(s)?

west elm
#

this is the subscriptionId: sub_1QU5rjRsJoxeHGedU8L9XdOc

thin oak
#

Not sure how this works with portal as, AFAIK, it doesn't support those PMs

thin oak
west elm
#

this is what i'm seeing

thin oak
#

In the response headers for that request there'll be a req_xxx ID. Can you share it please

west elm
#

req_7tbWmntUTY91jS

thin oak
#

Thanks, looking!

#

OK, looks like an issue with the portal not supporting these PMs. Going to flag internally, give me a moment

#

Appreciate the patience, we're investigating

west elm
#

thanks! not sure how the process is so is it usually that we can wait for the fix soon or does it take some time (as in days/weeks)? if latter, was hoping to ask questions to handle the upgrade process using server side SDK as a workaround.

thin oak
#

It'll be an expedited fix, but I can't give a solid timeline. Certainly not weeks

How can I help with the workaround in the meantime?

west elm
#

I see. When I tried using stripe.paymentIntents.create to handle the upgrade payment on the server, I am currently getting this error: The PaymentMethod provided (kr_card) is not allowed for this PaymentIntent. Please attach a PaymentMethod of one of the following types: card

request-id of a try: req_foSrzf1AvDWOxX
example code that I tried:

await stripe.paymentIntents.create({
    amount: getPriceInStripeFormat(priceDiff, currency),
    currency,
    description: order.name,
    automatic_payment_methods: { enabled: true, allow_redirects: 'never' },
    customer,
    payment_method: latestMethod.id,
    setup_future_usage: 'off_session',
  });
await stripe.paymentIntents.confirm(paymentIntent.id);
thin oak
thin oak
#

My recommendation, when you're passing the payment_method parameter like that, is to omit automatic_payment_methods compltely and explicitly pass payment_method_types: ['kr_card']

west elm
#

got it

  1. if we update the subscription, does it automatically process the payment with the price diff? if so does it not require additional user action?
  2. what we want is to process the upgrade/payment without user having to enter the payment method again. if it requires redirect does it mean that it is not possible?
thin oak
#

No they shouldn't be redirected a 2nd time. It's just a detail on how the PM filtering works