#shahzaib-haider_docs

1 messages ยท Page 1 of 1 (latest)

static stagBOT
#

๐Ÿ‘‹ 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/1435943037753626634

๐Ÿ“ 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.

arctic lance
fluid tusk
#

I already am using stripe connect, I wanted to confirm is that now I want to add new payment flow that will split customer's payment into different connected accounts, how can I achieve that need doc link plus clarification on that

arctic lance
#

great! that also depends on your business's needs around payments - you'll need to decide which Connect charge type to use, and then you can go ahead and follow the integration guidance

fluid tusk
#

Ok, Currently I am using direct charge, but If I want to implement new flow that need to split one payment between multiple connected account I need to use separate charge right?

#

In separate charge I have a question, can I also initiated a transfer request after creating payment intent that should be initiated when payment succeed (that would be ideal for me) or I have to want for payment intent to succeed and then create a transfer request

arctic lance
#

ah you mean to split between multiple connected accounts, gotcha

yes, Separate Charges and Transfers is the way to achieve that - it's important to not that this is different to a Direct Charge because the actual payment happens on your platform account (so your platform pays the fees, and is responsible for managing refunds/disputes)

#

can I also initiated a transfer request after creating payment intent that should be initiated when payment succeed

are you referring to card payments here, or a non-instant payment method like bank debits? (I just want to confirm what status the PaymentIntent will be in)

fluid tusk
#

both my application handles both card plus bank debits

arctic lance
#

ok! well in either case, you'll want to include the transfer_data details in the API request to create the PaymentIntent
https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#create-payment-intent

at this point, no transfer is initiated because the PaymentIntent's status will be requires_payment_method, so it needs to be confirmed to initiate the actual charge to the customer

after you confirm the PaymentIntent and submit it to Stripe, we'll initiate the charge on the customer's card/bank account:
https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#submit-payment

at this point, the transfer will be created automatically

#

so you have two steps for cards, three for bank debits:

  1. PaymentIntent created
  2. PaymentIntent confirmed (this is when Stripe creates the transfer)
    (3. PaymentIntent succeededs later, for bank debits)
fluid tusk
#

"at this point, the transfer will be created automatically" can you explain what you mean by that.
As what I will add in payment intent that will tell stripe to automatically transfer fund to mutlitple account.
Example: customer make $110 payment, I as platform want to cut stripe and my application fee let says stripe fee is $5 and my fee is $5. so remaining amount is $100 so I want to send 15% of that to connected account A meaning $15 and remaining to connected account B 100-15 = $85

#

Can you tell me step by step flow in which I can achieve above example output.

arctic lance
#

sorry, I misspoke above - the transfer won't be created automatically with this approach - you control when the transfer is created with an API call: https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#create-transfer

in your example, the flow would be as folllows:

  1. Create PaymentIntent for $110: https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#create-payment-intent
    https://docs.stripe.com/api/payment_intents/create

  2. Collect payment details and confirm the PaymentIntent on the front-end, to charge the customer:
    https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#collect-payment-details
    https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#submit-payment

At this point, for a card, the payment will either fail/succeed immediately. For bank debits, the PaymentIntent will be in a processing status. Stripe's fees will automatically be taken from your platform's balance. So in your example, your platform receives $105.

  1. After confirming the payment's status, create the Transfer(s) to the connected account(s):
    https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=elements#create-transfer
    https://docs.stripe.com/api/transfers/create

In step 3, you just need to set the amount of the Transfer(s) to be whatever you want the connected account(s) to receive. There is no 'fee' transaction for your platform's cut - you just keep the remaining amount (i.e. $110 - $5 (Stripe fee) - $15 - $85 = $5 remaining in your platform's balance).

fluid tusk
#

Ok, Thanks for in depth answer.

#

One last question, how stripe will know it's a separate charge payment intent.
And if I want transfer to successful only if it's related payment intent (in which I added unique transfer_group attribute) was successfull (I don't to mistakely charge platform)

static stagBOT
arctic lance
#

you could use the payment_intent.succeeded webhook to confirm the payment's success, before calling the Create Transfer API

fluid tusk
#

Ok, Thanks.

#

Now can you guide me about refunds, i an refund request how we can handle that in separate charge

#

As we already had sent fund to account A and acount B.

fallen token
#

๐Ÿ‘‹ Hi there! I'm taking over for my colleague. Let me take a look