#kiwi_best-practices

1 messages ¡ Page 1 of 1 (latest)

solar steepleBOT
#

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

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

proud flint
#

Sample request id:
req_E79QmqNTcmLnLa

primal iron
#

What do you mean by 'requirement payment'?

#

Collect payment info even if there's nothing to pay?

proud flint
#

if you open a session, and make the cost free, it doesn't require the user to supply their payment details

#

exactly!

primal iron
#

Oh, wait. It's a payment mode session

proud flint
#

yeah, the flow is that we ask the customer to pay for a one time setup fee

#

we save their payment details, and then later start a subscription off_session

#

which is why we need them to supply their details

primal iron
proud flint
#

and the coupon would make the setup fee free, but we still need the details

#

this is the relevant part right:
"No-cost orders are now enabled for one-time payments in Checkout Sessions. The value of payment_method_collection has changed from always to if_required accordingly."

#

so are you suggesting that I can use the field with always, and that should make it required?

primal iron
#

The issue is you can't set payment_method_collection in mode: 'payment' sessions and the default is, in the API version you're using, if_required so we hide the field as there's nothing to pay

proud flint
#

so unfortunately this feature is unavailable for now, I will probably receive an error if I try to set it to always

primal iron
#

Yes

proud flint
#

alright, our workaround is currently to make them pay 1$ I suppose that is the best we can do for now. Thank you for your help!

primal iron
#

You'd need to use an API version that predates 2023-08-16 which isn't really recommnded

solar steepleBOT