#kakos_api

1 messages ยท Page 1 of 1 (latest)

hot pathBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1336035102387601471

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

hybrid flint
#

I am requested that the client always pays the fee that stripe can take so the amount it will be always 1 euro or slighlty above 1 euro for the application..

#

I am having hard time doing this. because I can not see where in any api call the amount stripe took on the application fee

#

can you please guide me?

royal lake
#

Hi ๐Ÿ‘‹

What funds flow are you using with Stripe Connect? Direct charges, Destination Charges, Separate Charge & Transfers?

hybrid flint
#

Stripe Connect, Express Accounts

royal lake
#

What charge type are you using?

hybrid flint
#

charge type you mean? sorry

#

I am using the session checkout

#

if that is what are you referencing

royal lake
#

Sorry but you are not answering my question

#

Can you share the ID of a Checkout Session you recently created?

hybrid flint
#

of course!

#

1 sec

#

cs_test_a1Sr0EkYg79CyopsA7tWQP9tizSwwWJe6RvPR8xsYGyJUFltnnn7r0vyCA

royal lake
#

Thank you! Taking a look now

hybrid flint
#

thank you and sorry for not answering your question I am a bit confused!

royal lake
#

Okay, for your reference, you are using Destination Charges. This is where the charge is created on your platform account and then the amount is transfered to your Connect Account, then your application fee is taken from the Connected Account.

hybrid flint
#

ohh I see thank you!!

royal lake
#

You can see the Stripe fee of $0.59 is takne out of the Charge object that occurs on the Platform. (Using the example transaction in the docs)

hybrid flint
royal lake
#

Yup, that's it

hybrid flint
#

so its the balance tranasction correct?

royal lake
#

It's one of the balance transactions. But where you want to look to see this is, Checkout Session -> Payment Intent -> Charge -> Balance Transaction

hybrid flint
#

okay so I will expand with in expand

#

to get the balance

#

with .retrieve

#

(using javascript)

royal lake
#

Okay, stepping back to your original question, it looks like you want to apply enough to your application fee to cover the stripe fee, is that correct?

hybrid flint
#

yes, the client request that min should always be 1 euro and they were very strict about it

#

they said its okay if they get even beyond 1 euro but not less

royal lake
#

Okay lets forget the minimum for a minute

hybrid flint
#

even though I can not know the card type before hand.. I tried using location to caclulate the fee

#

okayss

royal lake
#

Unfortunately, I don't think we will be able to determine ahead of time what the fees from different card networks or other payment methods will be.

#

The balance transactions are only generated after the session has been completed

hybrid flint
#

as its impossible to know before hand

#

its an estimation, not accurate of course

royal lake
#

Okay, yes that should allow you to cover the difference. So you would just update the payment_intent_data.application_fee_amount using that calculations

hybrid flint
#

so something like this?

   if (feeAllocation === ReservationFeeAllocation.client) {
      // ๐ŸŸข Client Pays the โ‚ฌ1 Fee
      totalAmount = Math.ceil(((amount + platformFeeBeforeStripe) / (1 - stripeFeePercentage)) * 100) / 100;
      stripePaymentData = {
        application_fee_amount: Math.ceil(platformFeeBeforeStripe * 100), // Platform fee taken from total amount
        transfer_data: { destination: accountId }, // Full amount goes to the venue
      };
    } else if (feeAllocation === ReservationFeeAllocation.venue) {
      // ๐Ÿ”ต Venue Pays the โ‚ฌ1 Fee
      totalAmount = Math.ceil((amount / (1 - stripeFeePercentage)) * 100) / 100; // Client pays only the reservation amount
      stripePaymentData = {
        transfer_data: {
          destination: accountId,
          amount: Math.ceil((amount - platformFeeBeforeStripe) * 100), // Venue receives amount - โ‚ฌ1 fee
        },
      };
    } else {
      logCritical(`Venue Missing Fee Allocation ${venueName}`, { method: "checkOutForPrePaid" });
      throw new Error("Something went wrong please try again later.");
    }
#

thats what I came up with not sure.
there is 2 options B2B pays the fee or B2C pays the fee

#

so I tried to dynamiclly set the Payment

royal lake
#

That's something you would need to test yourself to ensure it returns the correct application_fee_amount each time.

hybrid flint
#

hmmm I see thank you so much!!

#

sorry again for not being able to answer your first question!

royal lake
#

No worries! Stripe has a lot of very specific terms that are not obvious right away. Once I had the creation request I could see everything I needed.

hybrid flint
#

hehe thank you!!, The thread will be open for me to revist as I test to read again the replies it wont be lost correct?

#

because I think I will need it with all this info hehe ๐Ÿ˜„

royal lake
#

We close our threads after a period of inactivity but you can always find it to re-read the content. If you have a new question you can just ask it in the main thread.

#

Using our intake form

hybrid flint
#

I see thank you so much again!!

royal lake
#

Happy to help ๐Ÿ™‚ It's why we're here.

hybrid flint
#

hello again just want to clarify

the stripe fee is always on me due to the nature of destinatio ncharge

royal lake
#

Yes,

hybrid flint
#

I think its impossible to get the fix 1 euro, as the amount increase the stripe fee increase which can be more than 1 euro

#

in a scenario of 100 euros the stripe fee is more than 1 euro so it will be around
1-1.75 so it wiill be negative fee?

#

on the appliction platform?

royal lake
#

I don't follow what you mean by a negative fee. The application_fee_amount is a positive integer representing the amount you want to receive from the Connected account.

hybrid flint
#

I got negative fee after trying to use the fix 1 euro on high end checkouts

#

negative balance sorry

royal lake
#

Okay so the math you are applying is incorrect, right? So you need to test & validate these scenarios.

hybrid flint
#

seems like it, I am tottaly off ๐Ÿ˜ฆ

#

the thing is if I increase the amount to be paid to cover the fees

#

at the same time the stripe fee increases correct?

royal lake
#

Please be very specific about what amount you are increasing

hybrid flint
#

the checkout amount for the client to pay

royal lake
#

The Stripe fees are calculated as a % of the amount parameter on the Checkout Session. However, what you can change to adjust how much the Platform keeps is the application_fee_amount

hybrid flint
#

if the application fee amount is 1 the stripe goes for 1-x% correct?

#

application_fee_amount=1

royal lake
#

Sorry I'm not following what you are trying to do.

hybrid flint
#

lets assume the amount=101
application_fee_amount=1
stripe_fee=101*0.015+0.22

royal lake
#

Stripe fees do not apply to the application fee amount. they apply to the total amount

hybrid flint
#

yes correct. but they are deducted on the application fee?

royal lake
#

No

hybrid flint
#

ohhh...

#

okayy soo
amount=101
application_fee=1
the stripe_fee is on the 101 but no matter the platform will take 1 and the connected account what remains?

royal lake
#

Correct

#

You can see this in the funds flow diagram I shared earlier

hybrid flint
#

hmmm I dont understand why I have negatvie balance then after those checkouts...

#

yes I read it but I got confused due to the negative balance

#

that I shared earlier the screenshot

royal lake
#

Unfortuntaely that I cannot help with. You will need to test and validate the behavior of your code.

hybrid flint
#

yes of course okay thank you I will investigate furhter now that is clear!

royal lake
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚

hybrid flint
#

just to clarify again sorry because you said the stripe fee is not on the application fee

#

it seems here it says its on the application fee

#

on the red line 1.23 Application fee - 0.64 stripe fee

#

The application fee amount minus the Stripe fees (1.23 USD - 0.59 USD = 0.64 USD) remains in your platform accountโ€™s balance.

royal lake
#

The Stripe fee comes out of the Platform's balance. So you would need to account for it in your application_fee_amount if you wanted the paltform's balance to reflect the full application_fee_amount

hybrid flint
#

hmm I see I think I get a better clear image now!!!

#

you are amazing!

royal lake
#

Yeah it's not a simple way to move money around. Sorry if I got too specific at certain points but I'm glad it's starting to click for you now.

hybrid flint
#

nooo no worries! you are super helpful!