#Hitesh
1 messages · Page 1 of 1 (latest)
Hi there, I don't quite understand, can you elaborate?
Need to add credit card charges with checkout session then how can we add this credit card charges
Are you asking how to reuse the payment method used in a checkout session?
no
how to charge credit card charges to customer with stripe checkout session
like how can we pass this credit card charges amount when we create payment link
Let me clarify, so you want to preset the payment_method when creating a checkout session?
yes
No there's no param to set a payment_method during a checkout session creation.
However, if you set a customer, In payment mode, the customer’s most recent card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. In subscription mode, the customer’s default payment method will be used if it’s a card, and otherwise the most recent card will be used.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer refer to the API reference for more details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i am trying to add credit card charges in the Stripe Checkout Session create method.
can you please tell me how can i add that charges
what does that mean exactly, could you elaborate on what exactly you want to see? "credit card charges" is very vague.
yes
Is there anyway way to collect credit card charge it (without failling) with checkout session create payment url
sorry but again that's super unclear. Checkout supports credit card payments, yes, of course
did you try something specifically and run into a problem or error?
no you are not getting me correctly
As we transfer the platform fee to the connected account same way can we add credit card charges also and transfer to connected account ?
with checkout session
As we transfer the platform fee to the connected account same way can we need to add credit card charges also and transfer to connected account ?
with checkout session
yes but first need to add credit card charges .how can i add that 2% charges with checkout session
ok when you say "credit card charges" what you actually meant was "the Stripe credit card processing fee, which I want to pass to my customer to pay"
yes
you just have to increase the amount of the Price object you are passing to the CheckoutSession or pass an extra line_item (https://stripe.com/docs/api/checkout/sessions/create?lang=curl#create_checkout_session-line_items) for the amount that you want to charge extra. Have a look at https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers to see how you might calculate the fee so that you know what to add
but the Stripe credit card processing fee must be transfer to coonected account
well the way it works is you charge the customer $X amount. You control how much the connected account(using payment_intent_data[transfer_data] ) as any amount up to an including $X. You can calculate the right amounts for the proportions or split that you want and pass them to the API, you mostly control all of this.
can it be possible to transfer Stripe credit card processing fee to connected account and not the platform fee
I don't know what you mean really. The "platform fee" (do you mean the 'application fee' from the Connect docs?) is not 'transferred to a connected account', it's an amount of the payment that you keep. Like instead of the connected account getting $100, they get $96 and you get $4 as a fee.
can it be possible to transfer Stripe credit card processing fee to connected account and not the 'application fee'
sorry but you are very difficult to understand
if you don't want to take an application fee on the payment, you do not have to, it's not required.
Want to charge customer with Stripe credit card processing fee and application fee with stripe checkout session . But need to tansfre Stripe credit card processing fee to the connected account and keep application fee
I suggest trying some things and writing some code and if you have specific questions about some code, let us know.
ok
I have two thing's
1)Stripe credit card processing fee =10
2)application fee=4
here need to transfer Stripe credit card processing fee to the connected account and keep the aplication fee
payment_intent_data: {
application_fee_amount: Number(platformFees),
transfer_data: {
amount: 10,
destination: ${findCommonSettings.stripeConnectAccountId},
},
},
so here need to pass 10 to the connected account and keep 4
then how can i set this in payment_intent_data
seems that code already does that I think
when you ran that code, does it seem to do what you want?
no i want to add Stripe credit card processing fee and transfer that a,ount to aonnected account
I know, you keep saying that
did you try running that code you posted above, and seeing what it did and what you see in your Stripe dashboard? that's the best thing to do.
it's not as per expectation
beacuse in the code you can see that Stripe credit card processing fee is not added
then you need to show me exactly what you did see(like a screenshot of the dashboard, and the PaymentIntent ID pi_xxxx) and clearly explain exactly what you wanted to see instead.