#waleed.bin.khalid
1 messages · Page 1 of 1 (latest)
What is the issue you're seeing?
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
That's what happens with destination charges
and I am unable to track stripe fee in different countries. I believe stripe fee will vary country to country
Platform pays the fees
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 ?
You need to be patient. We have a ton of users we help in here
Will be with you in a second
got it
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
Okay, can we implement connect account to pay ? despite of plateform
What do you mean?
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
That's called a direct charge, but that flow is only recommended if you're using Standard Connect Accounts: https://stripe.com/docs/connect/direct-charges
ok lemme check
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
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
yes, for paymentIntent do I need to attach payment method as well ?
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"
What were you doing before? You do need to collect a payment method to process a payment
I am using stripe element for card details and calling create token api
which returns the token
first calling charge api and then transfer to send amount to connected account
Oh. Any particular reason you use Charges and not Payment Intents? Is this just an old integration?
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
Yeah. Are you interested in using our current flow w/ payment intents or still want to use charges?
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
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
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
I am using standard account now
so its good
await stripe.charges.create({
amount: amount * 100,
currency: "usd",
customer: addedCard.stripeCustomerId
});
need customer ?
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
- 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 ?
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
okay and what for the payment Intent ?
What do you mean?
hi
Hi 👋
What do you mean when you say "what for the payment Intent ?"
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
Are you using separate charge and transfers? How are you creating the transfers? How are you creating the charges?
yeah separate charge and transfer
Can you share an API request ID for this? It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
What charge is this associated with?
with the plateform account
No, the Charge. Like ch_
You should not be doing a transfer if you are making destination charges
those are two different funds flows
ch_3O05cGH3CgfJQbH91bCGLoi4
sorry its a simple charge
const charge = await stripe.charges.create({
amount: amount * 100,
currency: "usd",
customer: addedCard.stripeCustomerId
});
like this
The request I am seeing is somewhat different: https://dashboard.stripe.com/logs/req_INlDrTC48yJoMo
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