#Muttakin Islam Hasib - Checkout + Connect

1 messages ยท Page 1 of 1 (latest)

flint willowBOT
narrow juniper
viral oracle
#

my checkout session implementation is ok?

narrow juniper
#

If you are actually getting to the point where the payment has succeeded and the funds are pending it sounds like it is working. Do you have specific concerns with it at the moment?

viral oracle
#

one thing,

i have a wedding application
example (wedding.com) -> the root company

we are providing monthly subscription system to our venue

there will be couple account who will create website with venue reference

on the couple website guest will purchase giftcard for their couple like $105

$100 will receive the couple to their stripe express account and it will automatically payout to their bank

and for the rest $5, their will be stripe fee and $1 will send to the venue's bank account and the rest will receive the root company, i mean company owner

how can i implement this?

#

the company owner will receive their payment directly to their main stripe dashboard account

narrow juniper
#

Or rather, in this doc we show an application_fee_amount which would be how much your platform keeps when the payment is made.

#

Is that doc helpful for you here?

#

Muttakin Islam Hasib - Checkout + Connect

viral oracle
#

how can i divide one transaction into two separate transfers?

example:

one checkout session will create for $100

and this $100 will transfer into two bank account, per account will receive $50

narrow juniper
#

In that doc we show a custom form but you can just use a checkout session and create transfers using its payment intent once the checkout session has completed.

#

Basically you would wait for the payment to complete and then make two API calls to create transfers for $50 to each account.

#

With this flow there isn't an explicit platform fee. You essentially charge a fee by not sending all of the funds away (so in this case you send $100 away and keep $5)

viral oracle
#

let me try to implement and i will back to you

#

for transfer, will i use webhooks ?

narrow juniper
viral oracle
#

and in this webhook, i will create paymentIntent and transfer with two account?

narrow juniper
viral oracle
#

wait i am showing you the code

#

this is the checkout session

#

and this one from webhooks

empty oxide
#

๐Ÿ‘‹

#

Stepping in

#

Are you using a test card that provides available balance?

viral oracle
#

can you please check our old conversation ?

empty oxide
#

Okay so you trying to send multiple transfers

#

If you want to transfer immediately after a payment is made then you need to use source_transaction

#

Otherwise you will hit errors as the funds won't be available

viral oracle
#

from where i will get the source_transaction: "{CHARGE_ID}", charge id ?

viral oracle
empty oxide
#

You get the Charge from the latest_charge property of the PaymentIntent

#

So you would need to either listen for Payment_intent.succeeded or retrieve your Checkout Session and expand the PaymentIntent

viral oracle
empty oxide
#

On the PaymentIntent?

viral oracle
#

yes

empty oxide
#

Can you show me your payload for your PaymentIntent?

viral oracle
#

getting this typescript error

empty oxide
#

Ah yeah it was recently added and isn't in our types

#

You need to override the type there

viral oracle
#

so the source_transaction will like this one ?

empty oxide
#

Yep

viral oracle
#

should i upgrade my stripe package?

empty oxide
#

Mostly depends