#dbjpanda
1 messages · Page 1 of 1 (latest)
Hi
Can you share the Subscription Id please ?
sub_1Mskf0SBUAj5B2VAhg4XH3Kq
It seems I need to add a customer authentication confirmation. But I am confused how to redirect user to that page.
The latest invoice payment was failure yes actually. But first are you following this guide for indian recurring payment ?
https://stripe.com/docs/india-recurring-payments
This is my code where I charge a customer for first time.
return await stripe.checkout.sessions.create({
line_items: [{
price: price_id,
quantity: 1
}],
mode: 'subscription',
success_url: 'https://example.com/success',
client_reference_id: uid,
...(stripeCustomerId ?
{customer: stripeCustomerId} :
{customer_email: context.auth.token.email}),
subscription_data:{
metadata:{
uid:uid
}
}
});
Hi! I'm taking over my colleague. Please, give me a moment to catch up.
Sure @gaunt meadow
There's a section about Subscription updates: https://stripe.com/docs/india-recurring-payments?integration=subscriptions#subscription-updates
It didn't help me
As suggested, if you need to have the amount updated, it's best to delete the old Subscription and create a new one so the a mandate with a new amount can be generated.
well, let me try again. Please stay tuned
it seems, I tried 4242 4242 4242 4242 that does not simulate emadate.
But I tried with 4000003560000008 and I get following error
Only active mandates can be used with PaymentIntents
Where did you see the other card number?
Check the testing section
This is the subscription id sub_1MsmIASBUAj5B2VAaAKG6hFh which says, payment incomplete with additional authentication required.
Do I need any additional permission while creating the subscription for first time?
payment incomplete with additional authentication required
Where do you see this message?
I see this in stripe dashboard
And this is the error message I get from subscription_update() method that Only active mandates can be used with PaymentIntents
Could you please share a screenshot?
Thank you for the screenshots. vanya had to step out but I can help. Getting caught up here...
And where are you getting the error about mandates? Do you have a request that you got it from in your logs? https://dashboard.stripe.com/test/logs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
@glad mural I already mentioned where do I see this. It is on stripe dashboard.
From the test logs, I get this error
payment_intent_mandate_invalid
Only active mandates can be used with PaymentIntents.
Can you send me the ID of the request where you got that error message? (req_123)
I more meant what code are you calling when you get that error
@glad mural here it is req_b5QxM97ve92jNq
Thank you, checking in to that
Interesting, how did you get that request ID for that error? I see that request as being successful in our logs
Ignore the error. I tried another test and the response was successful. But the payment is still not received.
Payment says, incomplete.
As you see here.
request body
{
"payment_behavior": "pending_if_incomplete",
"proration_behavior": "always_invoice",
"items": {
"0": {
"id": "si_Ne5fxhjdodvYG1",
"price": "price_1Ms90JSBUAj5B2VA0UQ8jmmh"
}
}
}
@glad mural I am stuck with this since 3 hrs. Any idea what is happening?
Have you checked if that payment needs 3DS authentication? That is what it sounds lik
Incomplete isn't an error here by the way, it is the default state for payments and it will stay that way until the payment is cancelled or paid
I already completed 3D secure. And initial payment was successful. But when trying to update the subscription to a higher tier, I get this payment incomplete (Requires user action).
Yes, it sounds like the update payment needs 3DS as well
This is likely a test environment thing but in live mode a bank always can ask for 3DS on any payment so it is good to be prepared
If the update payment needs 3D, then how can I display this 3d popup?
You have three main options:
- Direct user to your custom page and present the modal there
- Send the user to the Stripe-hosted invoice page for the subscription's latest invoice
- Configure Stripe to send your user an email about this and Stripe will direct them to the invoice page
Option 1 would look like this in code https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#collect-payment
Option 2 would be directing them to this URL on the invoice object https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So, I need to check if payment is incomplete after subscription update, I have to generate the 3d authentication url
Yes, check if the invoice's payment intent's status is requires_action. If so, you need to use that URL or direct them to your custom page for showing 3DS
When you call update subscription you can expand the latest_invoice.payment_intent property on the subscription https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.