#lipefsilva_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1426258665555365968
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I need a static payment link which is sent to thousands of customers to redirect to different urls based on the user id.
Ex.:
User 42 will be redirected to https://myurl/?id=42 after payment
User 57 will be redirected to https://myurl/?id=57 after payment and so on
I know that i can create dynamic payment links programatically, but this is an issue for me, we have a team which go through the payment links to send the orders
As I have a big user base, it would generate thousands of payment links
This isn't supported by Stripe. I'd recommend managing this by your own using Checkout Session (one-time hosted page): https://docs.stripe.com/payments/checkout/build-integration
Each customer will have its own hosted payment page to complete the payment.
I've tried that approach and got 2 issues:
- I have to get the address data to confirm the user has requested the item
- I have cases in which the customer will get a 100% discount, and apparently the checkout session doesn't support it
Payment Link uses Checkout Session under the hood. Does your current Payment Link support 100% discount while Checkout Session doesn't?
I have to get the address data to confirm the user has requested the item
I'm not too sure what you meant by this. How is it related to Stripe's integration?
@flat rose take a look here:
https://buy.stripe.com/8x214n1A8eHwdHtfwjfbq04
in the payment link I'm able to get the address during the payment
With a checkout session, I'd have to provide the address before, instead of asking the user input
This link i showed you also works with 100% discount
With a checkout session, I'd have to provide the address before, instead of asking the user input
You can collect the address on Checkout Session by settingshipping_address_collectionto the countries you wish to accept: https://docs.stripe.com/api/checkout/sessions/create?api-version=2025-09-30.clover&rds=1#create_checkout_session-shipping_address_collection-allowed_countries
This link i showed you also works with 100% discount
Do you have a promo code with 100% off promo code for me to try?
NEWSCOPE
please insert "test" in one of the fields
That's a good reference. Thank you
In my own testing! I can apply 100% off discount in Checkout Session and complete the order. Are you facing any challenge?
Do you have any code reference for that?
I tried creating a payment checkout session programatically, but would always get an error when used the coupon code, because the total value could not be $0
Question: is this specific to that api version? The one I current use is older
Could you share the Checkout Session ID (cs_123) that doesn't work, so that I can take a look?
Oh, I don't have them atm, since I was working on that a few weeks ago
I'll generate a new one
Working on it
Hi taking over here
No cost orders wasn't added until api version https://docs.stripe.com/upgrades#2023-08-16
So if you're on a version older than that, then that's why
Yes, mine's older than that
Yeah that'd do it then
You'd just need to switch to a newer version to take advantage of this functionality
Thank you, let me try that
@valid cobalt would there be a problem if I used the newer version in one service without changing others?
I don't know enough about your integration to say
You can also use a different api version on a per-request basis
So you could just do it for the create checkout session call and that's it if you like
and for the other parts i could use the current version?
JS
Gotcha yeah you could initialize a separate client passing in a newer api version just for the checkout session request: https://docs.stripe.com/api/versioning?lang=node
And leave the rest of your integration the same