#defekt7x_api

1 messages ยท Page 1 of 1 (latest)

deep bluffBOT
#

๐Ÿ‘‹ 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/1366796586029420575

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

zenith cliff
#

Unfortunately payment intents don't support the promo codes or coupons API, so we don't have an official way to increment the count here. I think you will have to keep your own count

slender tiger
#

Ok I just didn't know if I was approaching this the right way. Is Payment Intents still the recommended approach for apps creating a custom checkout flow for one-time payments?

zenith cliff
slender tiger
#

Thanks. I'll have to figure out if doing a refactor to this is worth the effort. I did initially start with a Stripe-hosted checkout page but ran into some limitations so I decided to go the custom route. I wonder if trying the embedded approach would help or cause more issues.

#

Anyway, thanks for your help!

zenith cliff
#

Makes sense, let us know if you run into anything else. Fingers crossed for minimal new issues ๐Ÿคž

slender tiger
#

real quick: chatGPT is saying I can attach a promotion code to a customer before creating the payment Intent and it should be linked properly once they make a successful payment

await stripe.customers.update(customerId, {
  discount: {
    promotion_code: promoCode.id,
  },
});

is this one way to work around the issue?

#

ok I think it's hallucinating

#

"Object literal may only specify known properties, and 'discount' does not exist in type 'CustomerUpdateParams'."

deep bluffBOT
slender tiger
#

job security for another day

zenith cliff