#joseamica

1 messages · Page 1 of 1 (latest)

sage fjordBOT
#

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.

jolly briar
#

Hello, we really don't know much about pricing/fees here, but I can help if you have a technical question about the API.

lost heath
#

@jolly briar I just want to end this and know perfectly so I can make my billing strategy

#

I will give you an example

#

I am paying a 100USD bill - 2 hamburgers $50 each (most expensive hamburger of the world :P)

I want to give 10% of tip ($10)

So it would be a $110

Then the "Avoqado Fee" (0.5%) $0.55

Total: $110.55

I want that the restaurant (connected account "express) receive (110.55 - 2% - 0.5%) = $107.789

I will receive on my account the 2% and 0.5% and I will also get charge with the stripe fees.

#

For some reason, with a 5% fee im charging (for testing purposes) the stripe fees are higher of what im charging the restaurant

jolly briar
#

Do you have an example PaymentIntent you can provide?

lost heath
#
const createPaymentIntent = async (req, res) => {
  const { amounts, customerId, currency, paymentMethodId, params } = req.body
  console.log(amounts)
  const rest_fee = amounts.total * 0.02
  try {
    const paymentIntent = await stripe.paymentIntents.create({
      customer: customerId,
      amount: amounts.total - rest_fee,
      currency: currency,
      payment_method: paymentMethodId,
      setup_future_usage: 'off_session',
      application_fee_amount: amounts.avoFee + rest_fee,
      transfer_data: {
        destination: 'acct_1Oks58PmsglnVXF2',
      },
      metadata: {
        venueId: params.venueId,
        billId: params.billId,
        tipPercentage: amounts.tipPercentage,
        avoFee: amounts.avoFee,
        total: amounts.total,
        amount: amounts.amount,
      },
    })

    res.json({ id: paymentIntent.id, client_secret: paymentIntent.client_secret })
  } catch (err) {
    console.log(err)
    res.status(500).json('Error creating payment intent')
  }
}
  const tip = amount.amount * tipPercentage
  const avoFee = amount.amount * 0.05
  const total = Math.round(amount.amount + tip + avoFee)
jolly briar
#

Sorry, I meant the ID

lost heath
#

let me pay a $50 pesos to give you the id and we can make it more clear

#

pi_3OmKwqBHBjfFQF5Y0gwvKGwx

#

I paid $100 pesos - 2% rest_fee

jolly briar
#

Yeah not sure I understand the confusion

#

Maybe you don't realize that you are using a US test card here so there is an international fee?

lost heath
#

8.14 is almost 10%

jolly briar
lost heath
#

How can i test on a national card (MXN)

lost heath
#

And it doesnt make sense or my math doesnt work (either chat gpt)

jolly briar
#

4000004840008001 is the test card for Mexico

lost heath
#

I want to know if my paymentIntent has something im not seeing