#Devonthedo88 - Tips

1 messages · Page 1 of 1 (latest)

ashen arrow
#

Hello! What do you mean by "getting nothing" exactly?

echo perch
#

Do I need to do a whole other payment intent to add tip?

abstract violet
#

@echo perch I'm sorry I don't follow what question you have

echo perch
#

So I did a payment intent

#

Now I want to add a tip?

abstract violet
#

The highlighted section tells you that in the US you can capture more than the original amount for tips

echo perch
#

Yes for for the first charge payment intent

#

then what i do to add the tip

abstract violet
#

you say the same sentence, with no info

#

you create a PaymentIntent for $30. You confirm it with your Terminal reader. Then when you go to capture, you capture $35 and you have a $5 tip

echo perch
#

im using JS

#
  const paymentIntent = await stripe.paymentIntents.create({
    customer: data.customer,
    setup_future_usage: "off_session",
    amount: data.amount,
    currency: "USD",
    automatic_payment_methods: {
      enabled: true,
    },
  });
  return { clientSecret: paymentIntent.client_secret, Payment: paymentIntent };
});```
#

So there is there i create the payment intent.

#

then to add tip I do exports.capture = functions.https.onCall(async (data, context) => { const capture = await stripe.paymentIntents.capture( "pi_3KeS3RFXkUN0aehr0Jio4ZiK", { amount_to_capture: 1800, } ); return { status: capture.status }; });

#

Right

abstract violet
#

just to clarify: are you using Terminal with a physical reader?

echo perch
#

No

#

Im making a uber type app

#

so I want to make a chrage for the trip but be able to add a tip

abstract violet
#

cool that's the problem you linked to a Terminal-specific doc

#

it's impossible to add a tip after the fact in your case, we don't support it. So you'll have to either authorize more in advance, or do a separate payment for th tip

echo perch
#

is there a way if the card is not catptured in like 3 hours to auto charge.

abstract violet
#

no

echo perch
#

Okay dokie thanks

abstract violet
#

Sure!

echo perch
#

Is there a way to get all the uncaptured charges? and maybe at the end of the night a function submits them

abstract violet