#waleed.bin.khalid

1 messages · Page 1 of 1 (latest)

tribal lanceBOT
fast oar
#

What is the issue you're seeing?

spare nebula
#

I have connected accounts and need to get money from users via cards and send to the connect account

#

problem is I am using destination charge and stripe is charging plateform

fast oar
#

That's what happens with destination charges

spare nebula
#

and I am unable to track stripe fee in different countries. I believe stripe fee will vary country to country

fast oar
#

Platform pays the fees

spare nebula
#

yes, exactly

#

what I was doing before like make a charge of $1

#

and transfer (amount - stripe fee)

#

2.9% + $0.30 this is how I am calculating stripe fee

#

it will not work for all countries ???

#

right ?

#

are you there ?

fast oar
#

You need to be patient. We have a ton of users we help in here

#

Will be with you in a second

spare nebula
#

got it

fast oar
#

So we're not that familiar with fees/pricing in here and how they're calculated

#

Is the above not working?

#

With destination charges platform pays the fee always, so that flow should work

#

But I'm not familiar with how to accurately calculate the fee

spare nebula
#

Okay, can we implement connect account to pay ? despite of plateform

fast oar
#

What do you mean?

spare nebula
#

right now our plateform is paying stripe fee. I want to send amount direct to connected account and connect account should pay that stripe fee not plateform

fast oar
spare nebula
#

ok lemme check

spare nebula
#

ok can you please tell me one thing

#

const paymentIntent = await stripe.paymentIntents.create(
{
amount: 1000,
currency: 'usd',
automatic_payment_methods: {
enabled: true,
},
application_fee_amount: 123,
},
{
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
}
);

this is the api format to create pyamentIntent for direct charge

#

but how do I can confirm that payment intent to make payment transfered

fast oar
#

There is no transfer

#

Direct charges are created directly on the connect account

#

You'd just confirm them like normal (except witih stripe account header)

#

Again, this flow is only recommended for standard accounts though

spare nebula
#

yes, for paymentIntent do I need to attach payment method as well ?

fast oar
#

Yeah

#

How else would you receive payment without payment method?

spare nebula
#

i wonder this is the payment intent api what I have send above. How to add pyament method in it. Because its giving me error "pyament method is required"

fast oar
#

What were you doing before? You do need to collect a payment method to process a payment

spare nebula
#

I am using stripe element for card details and calling create token api

#

which returns the token

fast oar
#

Oh that's a legacy flow

#

How do you create the payment intent?

#

Or do you use Charges

spare nebula
#

first calling charge api and then transfer to send amount to connected account

fast oar
#

Oh. Any particular reason you use Charges and not Payment Intents? Is this just an old integration?

spare nebula
#

I believe developer did not aware of it

#

we have 3 payment methods apple pay, google pay and credit cards

#

for wallets we are using payment intents but not for cards

#

can you guide me the steps what I need to follow for credit card payments

fast oar
#

Yeah. Are you interested in using our current flow w/ payment intents or still want to use charges?

spare nebula
#

if it will work with charge it will be quick because old flow is working with charges as this is the end of project.

But if I need to change implementation for payment intents I can also do that. Just guide me which is good

fast oar
#

It's up to you

#

Continuing to use Charges is possible

#

Which do you want?

spare nebula
#

I think I need both implementations because card payment is using charge and google pay apple pay is using payment intents

#

lets just go through the charge one first

fast oar
#

Just create charges as normal except pass stripe account header

#

And you no longer need transfer_data

#

So share your existing charge creation code in here and we can modify it

#

But, again, I can only reocmmend this flow with Standard Accounts

#

It can cause problems if you have express and custom accounts. Just want to make sure you realize this

spare nebula
#

I am using standard account now

#

so its good

#

await stripe.charges.create({
amount: amount * 100,
currency: "usd",
customer: addedCard.stripeCustomerId
});

#

need customer ?

fast oar
#

The flow would be different

#

You'd need to also create customers on the connect account for this to work

#

Not the platform

#

But all you'd do to do that is add the stripe account header to the request:

  {
    stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
  }```
#

And no need to transfer funds anymore

#

That creates charges directly on the connect account

#

You'd need to pass that header when creating customer, creating token, etc too

spare nebula
#
  • so now on frontend I am creating token using that header.
  • create customer using email, source and that header
  • create charge using that header without transfer_data object

M I correct ?

fast oar
#

Yeah read the direct charge doc to understand what you're doing though

#

The key thing is all associated objects need to exist on the connect account with this flow

#

You do that by passing the stripe account header

spare nebula
#

okay and what for the payment Intent ?

fast oar
#

What do you mean?

tribal lanceBOT
spare nebula
#

hi

mossy elk
#

Hi 👋

What do you mean when you say "what for the payment Intent ?"

spare nebula
#

let me ask you quick thing. I am using express accounts

#

I do a charge of $1 and create transfer of $0.67. But it says me your stripe balance is insufficient

mossy elk
#

Are you using separate charge and transfers? How are you creating the transfers? How are you creating the charges?

spare nebula
#

yeah separate charge and transfer

mossy elk
spare nebula
#

req_VQDq5kft4lwJAg

#

here it is

mossy elk
#

What charge is this associated with?

spare nebula
#

with the plateform account

mossy elk
#

No, the Charge. Like ch_

spare nebula
#

its a destination charge

#

okay 1 sec

mossy elk
#

You should not be doing a transfer if you are making destination charges

#

those are two different funds flows

spare nebula
#

ch_3O05cGH3CgfJQbH91bCGLoi4

#

sorry its a simple charge

#

const charge = await stripe.charges.create({
amount: amount * 100,
currency: "usd",
customer: addedCard.stripeCustomerId
});

#

like this

mossy elk
#

It is an destination charge.

#

So the $0.67 is transfered automatically

#

Then when you attempt transfer another $0.67 it is more than you collected and your balance is insufficient