#karan_code
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/1400341473613844562
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- karan_code, 1 day ago, 23 messages
hi there, give me awhile to look into this
based on your history with us, my colleague recommended using capture_method to place a hold on the card by setting this parameter value to "manual": https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
When you say you're not sure of how exactly to use it, is there anything specific you're not sure of?
Yeah I did that. but I don't know how to get stripe fee before capturing the payment. is it possible to know the stripe fee before payment capture?
I basically need to add stripe fee into my application fee. this way the vendor ( connected account ) has to pay the stripe fee.
stripe fee is different for different region and different card. so I cannot just add a static value in my application_fee, so i need a way to accuratly get the stripe fee before I split the payment.
Have you create an example payment for testing? If yes, could you share with me the Payment Intent ID?
Payment intent id for manual payment ?
pi_3RqnyI6Tq4npA7R41aPBKLLz
the above is a payment intent id whose payment is not captured yet.
yup i understand, it looks like you are creating the payment from a checkout session
I want to first clarify that Stripe fees for a charge will only return if the charge is successful: https://support.stripe.com/questions/see-the-stripe-fee-applied-to-a-specific-charge
To know the Stripe fee beforehand, you'll need to calculate it yourself
how can I do that ?
Okay let's take a step back. You are creating Destination Charges, right?
If you are creating Destination Charge, you are probably going to set an application_fee like you've said. Are you using the Platform Pricing Tool to help you with this: https://docs.stripe.com/connect/platform-pricing-tools ?
Are this the correct charges atrribute ?
Yes that's the page we set our pricing
Yes
Essentially, if you're looking to pass Stripe fee to the connected account when creating Destination Charge, the application_fee amount you pass needs to account for that.
Yes
And yes, you can use our pricing page (the screenshot you shared) to understand the Stripe fees to be charged in various scenarios, to help yourself calculate the final amount you want to pass into application_fee
so what will be the checkout flow now ?
- I will use manual payment ( hold on card ) to first get the customer card details and country.
- then using the card details and country I have to calculate the stripe fee
- using the paymentIntent i will add the stripe fee in the application fee
is this how the flow will be?
No, you need to change the payment flow, give me some time to type it out
- Collect the payment method first, and then inspect the payment method <-- at this step, you should be able to find out the card's country
- With the known card details, calculate how much you will need to pass into your
application_fee - Create the payment with
application_fee
The final payment amount that customer authorize needs to already consider application_fee. You can't increase the final amount after the customer already authorize to pay $X.
Collecting payment method first, and then creating a payment later is a flow we support: https://docs.stripe.com/payments/accept-a-payment-deferred
Give me some time to test whether you can update the application_fee after the customer authorize the payment in Checkout
Sure.
Thanks for waiting! So you can update the application_fee on an authorized but not captured PaymentIntent
So using the flow you described
- I will use manual payment ( hold on card ) to first get the customer card details and country.
- then using the card details and country I have to calculate the stripe fee
- using the paymentIntent i will add the stripe fee in the application fee <-- yes, at this step, you need to obtain the Checkout Session's PaymentIntent and then update the application fee of the PaymentIntent https://docs.stripe.com/api/payment_intents/object#payment_intent_object-application_fee_amount
The final amount the customer will pay will not change. Only the amount for application_fee can be changed, and you can pass an amount up to the total amount of the charge
You can ignore what I said about collecting the payment method first because Stripe Checkout doesn't allow for this setup.