#.sashank

1 messages · Page 1 of 1 (latest)

steep iglooBOT
#

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.

worn dove
#

hi there!

viral egret
#

hello

worn dove
#

how are you accepting payments? PaymentSheet, Checkout Session, Payment Element, something else?

viral egret
#

checkout session

#

we have setup success and cancel urls as well

#

const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
metadata:{"client_reference_id":_id,"servicer_id":servicer_id,"job_id":job_id,"customer_id":customer_id,},
payment_intent_data:{metadata:{"client_reference_id":_id,"servicer_id":servicer_id,"job_id":job_id,"customer_id":customer_id}},
line_items: [{
price_data: {
currency: 'usd',
product_data: {
name: job_name,
},
unit_amount: total_amount,
},
quantity: 1,
}],
mode: 'payment',
success_url: 'https://yourwebsite.com/success',
cancel_url: 'https://yourwebsite.come/failure',
// shipping_address_collection: {
// allowed_countries: ['IN'], // Allow shipping addresses from any country
// },
});

worn dove
#

got it. then yes when the payment fails, users will stay on the Checkout Session so they can try to fix the issue. that's how Checkout Session works.

viral egret
#

ok, is there a way to change the stripe checkout url or provide a different url to show payment failed screen, that's one of our requirement, in case payment failed

worn dove
#

not possible, no

viral egret
#

ok

worn dove
#

but if you use Payment Element or something else, then it could be possible since you owuld have more control on the pyament flow

viral egret
#

right, got it

#

1 more thing, how can we reduce the session expiry time of a checkout session

viral egret
#

ok thanks a lot, that's all are our doubts for now