#syoxiss.

1 messages · Page 1 of 1 (latest)

zenith terraceBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

covert osprey
#

The reason I need this is I'm doing a direct charge to one of the vendor connect accounts within our system. However, we need to deduct the platform fees after stripe fees, but we can't do that because we don't know the feees beforehand

#

Another option was to transfer it out after the transaction, but that fails because the funds need to be cleared into the vendor connected account before we can transfer it out

#

So we want to do platform fees calculated after stripe fees

inland venture
#

Hi there, you can get it from payment_intent->latest_charge->balance_transaction->fee_details

covert osprey
#

But it needs to have a successful payment right?

inland venture
#

Yes

#

Also for direct charges, the connected account is responsible for stripe fee

covert osprey
#

But I need to charge 10% after stripe fees at the time of the charge(platform fees) not before

inland venture
#

Sure, you can do that through application_fee

covert osprey
#

but I can't take out that specific amount because I don't know how much the stripe fees at the time of transaction. Is there a different way to go about this?

inland venture
#

Why do you need to know the stripe fee? the connected account is responsible for stripe fee for direct charges.

covert osprey
#

Our agreements with our vendor is that we take 10% after stripe fees

zenith terraceBOT
harsh sedge
#

There's no easy way to go about this.

You can consider using the authorize and capture payment flow : https://stripe.com/docs/payments/place-a-hold-on-a-payment-method. You would :
 Include  capture_method=manual [0] when creating the PaymentIntent. After the payment is authorized, you can inspect the PaymentMethod to know the card country after the payment is authorized : https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-country and determine if it's a domestic or international card transaction (compare to the connected account country pricing), Then call the Capture API and change/set the application fee amount : https://stripe.com/docs/api/payment_intents/capture#capture_payment_intent-application_fee_amount

Alternatively, you can use the Deferred Intent flow which allows you to create a create a PaymentMethod to send to your server for additional validation or business logic prior to confirmation : https://stripe.com/docs/payments/build-a-two-step-confirmation

Separate payment authorization and capture to create a charge now, but capture funds later.

Add an optional review page or run validations after a user enters their payment details.

#

ultimately, you're going to need to save the Stripe fee for each country somewhere in your own local server to be able to make those calculations

covert osprey
#

Does stripe have an API I can use to get teh fees beforehand?

harsh sedge
#

no, we don't unfortunately

covert osprey
#

Usually we create the paymentIntent in the back-end and allow our front-end to attach the payment method there and confirm the payment

#

Is there nothing similar to the source_transaction parameter for connected accounts to allow us to transfer out funds after the charge has been made?

harsh sedge
#

Right now you're creating Direct Charges, the payment itself is created on the connected account. Those options i previously listed are the only viable ones for Direct Charges.

I think an alternative will be to consider Separate Charges and Transfers, you'll create a PaymentIntent with on_behalf_of (the payment would be on your platform account), then create a Transfer to the connected account

covert osprey
#

Oh so if go the the transfer route, that means that I wil have to wait for the funds to be cleared?

harsh sedge
#

what do you mean by wait for the funds to be cleared?