#some1ataplace_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- some1ataplace_api, 1 hour ago, 23 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257783819004678284
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
You can't pass amount_percent to PaymentIntent for one-time payments
You can set an amount to payment_intent_data.transfer_data.amount instead
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_data
Gotcha, so this will allow me to give connect users a percentage of the payment that is made?
Yes but like I mentioned, you can't set % for one-time payments. So you'd need to calculate the amount manually and set that to transfer_data.amount
Okay makes sense thank you
NP! Happy to help ๐
In this case, is there a way to get the percentage from a promo code?
I don't think that's possible unless you're prefilling the promo code when you create the checkout session
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-discounts
You could retrieve the Promotion code and check the discount percentage prior to creating the checkout session, not after