#Slush

1 messages · Page 1 of 1 (latest)

real kindleBOT
uneven python
#

Can you share a bit more about what you're trying to do? The amount of a payment is controlled by your server, and is inclusive of the application and stripe fees.

wary flame
#

I implemented that successfully

#

And I need to show my users how much theyre being charged

#

How would I do that

uneven python
#

It depends on the details but typically your server would decide that and it would be part of the payload you send to the client to show the page etc

wary flame
#

Its not already included on the frontend that is supplied?

#

I am already calculating the total amount on the backend and that is fine.

#

So that is all working as expected. Just trying to figure out a good way to get that to the frontend

uneven python
#

Can you share a snippet of what you're doing on the backend?

#

What I expect is that you're creating a payment intent with some amount, which you then need to get the client_secret from and send to your front end to complete the payment. As part of that payload you can also send the amount to show to the customer, if your client app doesn't already have it.

wary flame
#

Yes

#

Here:

#

How do I go about sending that to the frontend?

uneven python
#

Using whatever approach you use to communicate from your server to client, you can send it in the same payload/response with the client secret eg

wary flame
#

How do I attach it to the clientsecret?

#

Thats what I am returning rightn ow

uneven python
#

you'd add amount=paymentIntent.amount in the json object, for example

#

return Json(new {clientSecret=pi.client_secret, amount=pi.amount})

wary flame
#

Im using connected accounts

#

And I want the stripe fee to be placed on the connected account and not the applicationfeeamount

#

how would I go about doing this?

#

@uneven python You still around?

uneven python
#

hey there, yep

uneven python
wary flame
#

This is a paymentIntent with a transferdata

uneven python
#

For express/custom accounts and destination charges, the stripe fee is paid by the platform (and you may aim to cover this wioth the application fee)

#

Right, so thats a destination charges, and the platform pays the stripe fee:

wary flame
#

So is there an easy way to transfer that to the apppfee amount?

uneven python
#

What do you mean?

wary flame
#

ApplicationFeeAmount = (tournyBaseCost * .029) + FEE + 30,

#

Im trying to do that, but then the applicationfeeamount only takes an int

uneven python
#

Yes all amounts are integers in the smallest currency unit, say usd cents