#.sashank
1 messages · Page 1 of 1 (latest)
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.
- .sashank, 2 days ago, 43 messages
hi there!
hello
how are you accepting payments? PaymentSheet, Checkout Session, Payment Element, something else?
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
// },
});
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.
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
not possible, no
ok
but if you use Payment Element or something else, then it could be possible since you owuld have more control on the pyament flow
right, got it
1 more thing, how can we reduce the session expiry time of a checkout session
ok thanks a lot, that's all are our doubts for now