#primalfreeze_api

1 messages ¡ Page 1 of 1 (latest)

trim loomBOT
#

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

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

rough flax
#

Do you have the URL?

rough flax
#

So this is a Checkout Session, which has expiration of 30 mins

#

What you want to share is a PaymentLink

hexed lily
#

Oh bugger. That makes sense. Presumably created in a somewhat similar way?

#

Docs will show me of course

rough flax
#

Yes, can create via Dashboard

hexed lily
#

I'll need to do it programatically so can't create via Dashboard

rough flax
hexed lily
#

Thanks, I'll give it a look

#

Presumably it's going to be a different webhook to catch too?

rough flax
#

Nope you should still receive checkout.session.completed

#

PaymentLink will generate Checkout Session

hexed lily
#

Ok perfect, thanks again

hexed lily
#

Can I add a discount/coupon for an arbitrrary value when I create a Payment link? I've spoken to my client and while she does have standard pricing, she can arbitrarily just give discounts. I.e. regular price is 2x 795 (total of 1590) but due to ongoing issues, she's charging them only 1k total.

rough flax
#

Um PaymentLink doesn't have a discounts parameter like Checkout, sorry... But it has allow_promotion_codes

#

You can give your customer a promotion code beforehand

hexed lily
#

And it can be either a flat discount or a % off by the look of things?

rough flax
#

Could be either of those, yes. Promotion Code is belongs to a Coupon, which has those 2 options