#TheKents
1 messages · Page 1 of 1 (latest)
Can you be more specific?
What are you using to accept payments? Checkout? Subscriptions? We need wayyyyy more details in order to answer that question
I created a coupon and it has a promotional code "KIITOS15", however when I use await stripe.promotionCodes.list({ code: codeParam, });
it doesn't redeem it, so how can I call to redeem it
I am using PaymentIntents
That API endpoint is just used to send a GET request to Stripe, in order to get the Promo Code object. You redeem it by applying it to a payment.
Here's a guide for how to redeem Coupons on one-time payments: https://stripe.com/docs/payments/checkout/discounts
Im using my own custom payment flow so I can't use checkout
Or atleast thats what support and docs say
If you don't use Checkout or Subscriptions, you can't use promo codes unfortunately. Checkout is highly configurable though, so I would be surprised if it didn't fit you'r use-case.
I need to add Finnish Posti Integration there, it is available on shopify etc. with checkout, but not unfortunately on custom flow
ofc i wanted to use Checkout since it would make everything so much easier but i asked support twice about it and they said i would need to use PaymentIntents instead
When you say "support", are you referring to Stripe support? Or Shopify support?
Stripe
Im not looking to use any ecommerence platforms since im developing the webstore myself
Ah, okay. That's odd. Did they say why you couldn't use Checkout?
As far as I can tell (unless you want to do something specific that you haven't mentioned to me yet) Checkout should work just fine for you.
the link i sent you, It says to Create a PaymentIntent, not a CheckoutSession
I don't remember specifically, but i asked about coupons and Posti integration. Once i mentioned React or web development/custom payment flow, I got directed to that link
Yeah, so don't use that one. Just use Checkout: https://stripe.com/docs/checkout/quickstart
And to make PaymentIntent, and that CheckoutSessions are for pre-built flow only
Are there docs to "Checkout" and not "CheckoutSession"
because in the link you sent me there is this again
here is Checkout Session mentioned again
You have to use a Checkout Session in order to use Checkout. I don't understand your question
and one other chat was in the stripe support chat in web, not in discord
"Also, there's no issue with using Checkout but Checkout sessions cannot be used with Stripe.js."
You cannot use Elements and Stripe.js with Checkout Session currently, no. Using Checkout involved redirecting your customer to Stripe-hosted Checkout UI with the url returned on the session.
My understanding is that Checkout Session is a prebuilt and hosted page by Stripe, which has all the elements needed for payment flow, so there is no need for Elements or Stripe.js.. the problem is that you cannot add other applications (eg. Posti) integration/API into Checkout/Checkout Session
you cannot add other applications integration/API into Checkout
What do you mean by this? What are you trying to do?
Checkout Session is a prebuilt and hosted page by Stripe, which has all the elements needed for payment flow, so there is no need for Elements or Stripe.js
That's correct -- you redirect to a pre-built hosted flow so that you do not need to build it yourself
I am trying to have a integration so user can select their delivery point, this is not available to integrate through Checkout/Checkout Sessions, but only thru Elements/Stripe.js/PaymentIntent
Is this correct?
You can add shipping option to Checkout as describe here:
https://stripe.com/docs/payments/checkout/shipping
But that is typically used for shipping costs / speeds, not locations
For the location, you might want to try using a dropdown custom field to present pickup locations:
https://stripe.com/docs/payments/checkout/custom-fields#dropdown
Yeah, Im only shipping inside of Finland currently, and need to be able to have my customers select parcel drop off point, for that I would need to use Posti Integration
I'm not familiar with Posti, but if you can get those locations ahead of time you may be able to present them (and the associated rates) using the functionality above. You won't be able to add a custom "Posti" or any other integration embedded in Checkout though, no.
Okay yeah, but also no option to use/redeem coupon codes either in custom payment flow using API
Well you can collect the code yourself and apply it to your payment amount, so that's possible
But you must calculate the discount and amount for the payment intent
But if i have a one time code, is it possible to use it aswell somehow
I will say this is feedback we've heard, and I can share your interest in this as well as we explore options
Again, you could implement this either by tracking codes in your own system or manually deactivating promo codes via Stripe if you prefer
Could you by any chance create a ticket or a feature request about this?
I have done that 🙂