#aminshoukat

1 messages · Page 1 of 1 (latest)

errant charmBOT
outer iris
#

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

static ingot
#

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.

outer iris
#

I see, that' an issue here. What is your connected account type?

static ingot
#

I am on test mode right now. It could be any for live. For now I have express

outer iris
#

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

static ingot
#

Can you let me know what are the differences between Standard and Express account?

outer iris
static ingot
#

and If I consider the pre calculate method. How can I get before customer pay which method customer paid?

outer iris
static ingot
#

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.

outer iris
#

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

static ingot
#

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,
]);

outer iris
#

Yep and you only need to specify the Stripe Account header like the Doc above, and get rid of the transfer_data block

static ingot
#

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. ?

outer iris
#

card_payments is the default capability so I don't think you would need to worry. You can examine in Test mode btw

static ingot
#

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.

outer iris
#

It's possible. I have just tried it

#

Create PaymentLink with a Stripe Account header

static ingot
#

$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' ?

outer iris
#

This is PaymentIntent. I thought you would like to have PaymentLink?

static ingot
#

yes I said it before.

outer iris
#
$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

static ingot
#

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.

outer iris
#

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

static ingot
#

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?

outer iris
#

No you only need the Stripe Account Header, just like above request

#

include this second array ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}'] on the Product and Price creation API

static ingot
#

oh Thanks Man. You are really good .
I'll surely try it .

#

Thanks
You can close ticket.