#anurag_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1390230355818319973
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is the code (used stripe node.js library):
async function run() {
try {
const paymentIntent = await stripe.paymentIntents.create({
amount: 1000, // $10.00
currency: 'usd',
capture_method: 'manual',
confirmation_method: 'manual',
payment_method_types: ['card'],
payment_method_options: {
card: {
request_incremental_authorization: 'if_available',
},
},
});
console.log('PaymentIntent created:', paymentIntent.id);
const confirmedIntent = await stripe.paymentIntents.confirm(paymentIntent.id, {
payment_method_data: {
type: 'card',
card: {
number: '4111111111111111',
exp_month: 12,
exp_year: 2026,
cvc: '123',
},
},
});
console.log('PaymentIntent confirmed, status:', confirmedIntent.status);
if (confirmedIntent.status !== 'requires_capture') {
throw new Error('PaymentIntent is not in requires_capture state, cannot increment.');
}
const incrementedIntent = await stripe.paymentIntents.incrementAuthorization(
confirmedIntent.id,
{
amount: 500,
}
);
console.log('Authorization incremented. New capturable amount:', incrementedIntent.amount_capturable);
} catch (err) {
console.error('Error:', err);
}
}
run();
HI there, are you an IC+ user? https://docs.stripe.com/payments/incremental-authorization?platform=web&ui=stripe-hosted#availability, the incremental authorization feature is currently available to IC+ users.
Hi @sinful sparrow, I am not sure if we are an IC+ user or not, this is our account_id: acct_1QWxwpE9cSvqiivY. Can you please enable incremental auth feature for our sandbox account as we are planning to use it in the near future.
You'll need to reach out to Stripe support (support.stripe.com) if you want access to this feature