#aminshoukat
1 messages · Page 1 of 1 (latest)
The only way is pre calculate and adjust the application_fee_amount to cover that fee
with Destination Charge you (platform) is the Merchant Of Record and normally bears the Stripe processing fee
But I only want to get commission from every payment. seller should be responsible for stripe fee.
and If there is no way except Pre Calculate then how can I calculate fee? I allow all payment methods for payment like card,transfer etc. All have different rates I think from Stripe.
I see, that' an issue here. What is your connected account type?
I am on test mode right now. It could be any for live. For now I have express
So the best is still pull out the fee structure of each payment methods with Stripe, then pre-calculate it on the fly. Sorry that we don't have a convenience calculate-for-you parameter. Another alternative is using the Direct Charge flow with Standard Accounts then the Standard Account will bear the Stripe fee automatically. But it has other concerns since Standard Account is way more different and full-fledged than a lightweight Express Account
Can you let me know what are the differences between Standard and Express account?
Here is a good summary https://stripe.com/docs/connect/accounts
and If I consider the pre calculate method. How can I get before customer pay which method customer paid?
Right, that's good question. There is a Defer flow here when you can collect the payment methods before creating the PaymentIntent: https://stripe.com/docs/payments/accept-a-payment-deferred?type=payment
Let me check it.
But I am not using Payment Intent. I have to use Payment link. no checkouts form. no js.
I am planning to use standard account .
Can you let me know how direct charge works? Any Payment connect account will get will pay me the application fee?
and I don't have to pre calculate fee there. that would be good.
Ah I see. PaymentLink basically creates a Checkout Session under the hood. But right we don't have an effective solution for now unfortunately. Probably you can pre-charge a fixed amount and refund the excess to your CAs. Agree it's not very clean
Here is Direct Charge and by default it takes processing fee from CAs
Its also using PaymentIntent.
WOuld it work for payment links?
I didn't get how it will work?
this is my code for payment link generation.
What to modify there?
$payments_link_response = $stripe->paymentLinks->create([
'line_items' => [
[
'price' => $price_response->id,
'quantity' => 1,
],
],
'transfer_data' => [
'destination' => '{ID}',
],
'application_fee_amount' => 30,
]);
Yep and you only need to specify the Stripe Account header like the Doc above, and get rid of the transfer_data block
PaymentIntent Should be one time code?
Direct charges are supported only for connected accounts with the card_payments capability.
It is written in the article you shared.
So If customer paid via different method like direct transfer, Apple pay etc. It won't work. ?
card_payments is the default capability so I don't think you would need to worry. You can examine in Test mode btw
I think its not for payment links men.
I am gonna go to bed. If you can answer me quickly and we can close this ticket.
$payment_intent = \Stripe\PaymentIntent::create([
'amount' => 1000,
'currency' => 'usd',
'automatic_payment_methods' => ['enabled' => true],
'application_fee_amount' => 123,
], ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']);
What should I put for 'amount' ?
This is PaymentIntent. I thought you would like to have PaymentLink?
yes I said it before.
$payments_link_response = $stripe->paymentLinks->create([
'line_items' => [
[
'price' => $price_response->id,
'quantity' => 1,
],
],
'application_fee_amount' => 30,
],['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']);
something like this
This is the same code I have and I provided earlier.
let me try it. Its little bit different.
Its returning error " No such price: 'price_1MtiCrGd7PD0bQ5j3SWOUqZb' ".
If I remove the second array -> ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']
It works as it was.
The price would need to belongs to the Connected Account
Using a Stripe Account header meaning you are looking to objects on the Connected Account
means I have to create product on connected account first then get that price?
I was creating product on platform account.
$product_response = $stripe->products->create([
'name' => $stripe_product_name,
'description' => "This is the product description, Here we can add anything like booking ID: $booking_id, or something else dynamically.",
]);
This is the code I am creating product.
For creating product and prices in connected account I would need API key. How can I get that from platfrom account?