#niraj-p_docs
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/1336214032184512544
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! How are you collecting the payments?
Using checkout session.
Unfortunately, you cannot implement your use case with Checkout Session because the payment intent is created with the checkout session. And you can only know the chosen payment method after that.
The only alternative is to use deferred payment element (https://docs.stripe.com/payments/accept-a-payment-deferred). This allows you to get the chosen payment method and then create your payment intent after that as a destination or direct charge.
So please guide me how can i implement paypal in checkout session
And please guide me how can i charge the customer directly from the checkout session for the paypal method
You want to choose to create a payment with either direct charge or destination charge based on the payment method chosen correct?
This is not possible with checkout session.
If you want to just know how to use PayPal as a payment method on checkout, you can use this guide: https://docs.stripe.com/payments/paypal/accept-a-payment
Okay i got it
But how can i collect payments of paypal in checkout session
Like i create checkout session for my connected account and their customer make payments and those payments are reflected in their account
so how can i do it with the paypal?
I also want to attach customer for the connect account
You are doing direct charges for your connected accounts for other payment methods?
Yes
You cannot do the same with PayPal as only destination charges and separate charges and transfers are allowed (https://docs.stripe.com/payments/paypal#connect).
In this case if there are customers created on your connected account, they cannot be used for PayPal since you have to use destination charges and separate charges and transfers.
Okay thank you
I have one doubt
Customers can see paypal option in the stripe element even though when i attach a customer
So customer get confused like even though stripe doesn't allow to take payments from the customer then why we see the paypal option in the payment method when a customer is attached in checkout session
How are you creating your checkout? Do you have the checkout session id? Starts with cs_
What happens when they attempt to pay with PayPal?
Stripe throws this error
The Paypal payment method does not support Connect charges created on behalf of connected accounts, including Direct Charges and charges created with on_behalf_of.
Is there a reason you have it switched on since you are doing Direct charges and PayPal cannot be used?
I'm allowing customers in whatever payment method they want to do payments
But since you are doing direct charges, PayPal would not work anyway. Any reason why it's still switched on?
It is dependent on the connect accounts so they can switch on and off
In this case, I'd recommend writing to us (https://support.stripe.com/contact/email) for this and we can take it from there.
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.