#Davaogoods-Connect

1 messages · Page 1 of 1 (latest)

real niche
arctic finch
#

Thank you I will check this out

#

does this apply to both standard and express connect accounts?

#

and does this redirect to the stripe payment page once created?

real niche
#

yes, you can use Separate Charges and Transfers (SCT) for both Standard and Express connect. SCT in essence means a charge on your platform, and then subsequently creating transfers to those connected accounts.

The guide i previously mentioned uses a custom checkout flow (i.e. you build your own checkout page) to illustrate the example. If you want a low code solution, you can make use of Stripe Checkout (which will redirect the customer to the Stripe hosted payment page) - https://stripe.com/docs/checkout/quickstart. You will still need to implement your own logic to transfer funds to the different connected accounts though

arctic finch
#

got it thank you

#

do you have sample php code that illustrates the checkout with SCT I can take a look?

#

I only have these at the moment

#

I need to know where to put in the payment intent from SCT on your previos mentioned

#

since there are two objects needs to be included

real niche
#

you should remove the stripe_account header in your code

#

the Checkout Session (and hence payment) will then occur on your platform account

#

i'd suggest you include metadata also for which accounts you need to transfer the money to after payment is made

arctic finch
#

from my code

#

where do i put this?

real niche
#

you don't need the portion to create a PaymentIntent anymore

#

lets take this step by step

#

have you created the Checkout Session yet?

arctic finch
#

ok lets do step by step

#

this is my main payment for / checkout session

#

literally this goes fine. but I need to send it to multiple sellers like 2 products different sellers in 1 cart

#

so this would not work since its a direct payment to 1 seller

real niche
#

the last line that you have ['stripe_account' =>....] -> remove this

arctic finch
#

removed

real niche
#

okay, so now when you create the Checkout Session, can you share the id? It'll look like cs_test_...

arctic finch
#

ok hold on

#

cs_test_a1uOf4ms616QwxUmxZ35GNnZ7JhlnTpm99klSMMbecKW48vh5y4ciBBkAc

real niche
#

taking a look just to make sure everything is correct

#

alright, great, now make payment for that Checkout Session

#

open it in a browser and make payment with a test card - you can use 4242 4242 4242 4242

#

after you make payment let me know

arctic finch
#

hold on

#

did you mean the checkout session I gave you to proceed?

real niche
#

yeah

arctic finch
#

done

real niche
#

this is the checkout.session.completed event that will be generated

arctic finch
#

okay.. and?

real niche
#

now in the payment_intend.succeeded event - you'll see a Charge id : ch_3LfdzcKhLpImRHOf0tR7xt7e

arctic finch
#

yea I see it

real niche
#

when you create the transfer -

curl https://api.stripe.com/v1/transfers \
  -u sk_test_...: \
  -d amount=100 \
  -d currency=usd \
  -d destination=acct_... \
  -d transfer_group=ORDER_95 \
  -d source_transaction=ch_...
#

you should pass in the charge id to the source_transaction

#

that's how you transfer to connected accounts

#

now backtracking a bit

#

the next question you'll likely have is how do i know which connected accounts i need to transfer to then

arctic finch
#

yea and so how?

real niche
#

so when you receive the payment_intend.succeeded event - that metadata that you passed in when creating the Checkout Session will also be reflected in this event

arctic finch
#

just to clarify

real niche
#

so you'll have to read and process the metadata then create the transfers accordingly

arctic finch
#

when doing payment charges to multiple sellers

#

the platform receives the payment

#

and is the one that transfers those payment to the sellers?

real niche
#

yes that's right. This is how it works when you want to transfer to multiple connected accounts

arctic finch
#

but if its direct payment, the way I did before is the one that will be implemented

real niche
#

yep

arctic finch
#

I see.. got it

#

I will review our conversation since I already have a webhook created

#

thank you so much

#

you rock man!

real niche
#

feel free to reach out again if you're having issues. Connect can be very confusing

arctic finch
#

will do

arctic finch
#

Hi

#

Can I have this code in PHP?

real niche
arctic finch
#

thanks

#

does transfer_group contain any value as refference?

real niche
#

it's up to you to decide what you want to set in transfer_group - you can think of transfer_group as a label/tag on these transactions

#

you don't need to pass transfer_group if you don't want to