#savan
1 messages ยท Page 1 of 1 (latest)
a new invoice showing billing method charge default payment method
Please share your Subscription Id sub_xxx
@agile current
customer ID : cus_N8tPpixTvU6jV8
subscription ID : sub_1MObcNLrfb9mNPqxFm4wekVO
Is there any way to set a subscription based on hourly?
because it will take too much time to check whether it working or not.
I am suffering from the last 2 weeks and still, issue could not resolve.
Hi! I'm taking over this thread.
Is there any way to set a subscription based on hourly?
If you want to test subscriptions, the best way is to use Test Clocks, that allow you to move forward in time, so you don't have to wait hourse/days for the subscription to renew: https://stripe.com/docs/billing/testing/test-clocks
subscription ID : sub_1MObcNLrfb9mNPqxFm4wekVO
The renewal failed because the card you used required 3DS.
To avoid this in test mode, yous should use a different test card, like4000002500003155https://stripe.com/docs/testing#three-ds-cards
@wraith cosmos if the code is not working in testing mode. then how it's possible to work on production?
I need to cut payment from the customer's card. we already did 3d secure confirmation while making the first payment of the subscription!
so it's possible or not for a 3d secure card?
I think you are a little confused:
- You used the test card
4000000000003220for your subscription, which required 3DS for every payment. So it's expected that the second payment will fail. That's why I recommended to use a different test card. - Once you are in live mode, yes it's possible that the bank will require 3DS for a recurring payment, so the payment will fail. But we have many settings in the Stripe dashboard to automatically handle this https://dashboard.stripe.com/settings/billing/automatic
Do you mean if I will modify the settings then the 3d secure card will work like as normal card in live mode?
I want to implement this with 3d secure card.
we want to auto cut payment on every subscription payment except first one.
Okay, let's take a step back.
- 3DS is something that the bank can request at any time.
- If 3DS is requested, then the payment will work only if the user is in front of their computer to go though the 3DS flow.
- So in case of subscription renewal, if the card request 3DS the payment will fail (since the user is not in from of their computer)
- If you use the test card
4000000000003220, we will ask for the 3DS flow for every single payment you make. - If you use the test card
4000002500003155(that I suggested earlier), we only ask for 3DS once at the beginning. So this is the recommended card to test subscription - Now, in real life, it's possible that a subscription payment will fail because it requires 3DS. So that's something that you will need to handle. And the simplest way to handle this is to rely on the dashboard settings that automatically retry the payment and send an email to the customer (see screenshot below)
@wraith cosmos Thanks for your help.
let me check.
but please don't close this thread unless I test it, Please.
We automatically close threads when they are inactive. But it's okay, you can always start a new thread in #dev-help
But to summarize: you should use 4000002500003155 to test subscriptions in test mode and you should rely on the dashboard settings to handle 3DS in live mode.
I am testing
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Hi @viral oak I created one subscription 10m ago
customer ID : cus_N9JpyqodZyKova
subscription ID : sub_1MP1BULrfb9mNPqxsbHVAUbY
and then I created test clock
test clock id : clock_1MP1I2Lrfb9mNPqxjh7p5TjM
can you add this customer to that test clock so I can test tomorrow subscription payment now?
once a customer is created it's not possible to add a test clock to them
you need to first create a test clock
and then create a customer and pass in the test clock id
then create the subscription
I can add using customer update api
Right?
you can read more about the steps here https://stripe.com/docs/billing/testing/test-clocks
no that's not possible
you need to start over
let me check
it's showing This draft invoice was generated by a subscription. It will be automatically billed soon.
Can I get time so I can modify test clock?
is it a daily plan?
yes
I generated next invoice using test clock advance time
But I don't know When invoice finlize
"subscriptionId": "sub_1MP1WyLrfb9mNPqxBZ0CdaxE",
"customerId": "cus_N9KBNmCjOojkDv"
Test Clock ID : clock_1MP1U4Lrfb9mNPqxEuVNN0D0
1h after being generated
Do you mean the time different is between the draft to finalized invoice?
yes
let me set +1 hour
Hi All
Which webbook event is responsible for if the card has no money or less money etc..
with issue message
I'm not sure I understand the question
if Recurring payment fails due to insufficient balance on the card, is there any webhook event that provides me the details of failed payment like "Reason for failure" ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you would then need to look at the payment_intent of that invoice and look at the last_payment_error
is it string type? last_payment_error
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
let me check again