#mairakanwal
1 messages · Page 1 of 1 (latest)
Can you share the request id where you got that error?
No
I need the request id
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I see. Request id is: req_jqqgMrJl5ehEKq
That's not how incremental auth works
They never update the payment intent amount in that doc
They make an incremental authroization api call
this is test id request. Maybe if you can recheck what might be the issue
The issue is you can't update a payment intent once it requires capture
The error message is correct
So I don't have to update the payment intent?
But I have to add more payment from customer whose payment is already authorized. I want to increase the authorized amount on a payment of the customer. How will that be done?
I have fully followed the documentation, but still this issue is not resolved. Is there a way I can get one-on-one help regarding this issue?
You're not doing this step; https://stripe.com/docs/terminal/features/incremental-authorizations#increment-authorization
You're making a call to update the payment intent
Can you share your code?
Yes sure, I can share my code:
For payment intent:
const paymentIntent = await stripe.paymentIntents.create({
amount: amount,
currency: 'sek',
customer:customerId,
//confirm:true,
automatic_payment_methods: {
enabled: true,
},
payment_method_options: {
card: {
capture_method: 'manual',
},
card_present: {
request_incremental_authorization_support: true,
},
},
});
For Update:
app.post('/add-more-payment', async (req, res) => {
try {
const { paymentIntentId, amountToAdd } = req.body;
// paymentIntentId = "pi_3NalhvDfOEYgmHLm3yhLnNc6";
const paymentIntent = await stripe.paymentIntents.retrieve(paymentIntentId);
await stripe.paymentIntents.update(paymentIntentId, {
amount: paymentIntent.amount + amountToAdd,
});
res.status(200).json({ message: 'Additional payment added successfully.' });
} catch (error) {
res.status(500).json({ error: error.message });
}
});