#savan

1 messages ยท Page 1 of 1 (latest)

warm galleonBOT
royal bay
#

a new invoice showing billing method charge default payment method

agile current
#

Please share your Subscription Id sub_xxx

royal bay
#

@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.

wraith cosmos
#

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, like 4000002500003155 https://stripe.com/docs/testing#three-ds-cards

Simulate payments to test your integration.

royal bay
#

@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?

wraith cosmos
#

I think you are a little confused:

  • You used the test card 4000000000003220 for 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
royal bay
#

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.

wraith cosmos
#

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)
royal bay
#

@wraith cosmos Thanks for your help.
let me check.
but please don't close this thread unless I test it, Please.

wraith cosmos
#

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.

royal bay
#

I am testing

viral oak
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

royal bay
#

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?

viral oak
#

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

royal bay
#

I can add using customer update api
Right?

viral oak
viral oak
#

you need to start over

royal bay
#

let me check

royal bay
#

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?

viral oak
#

is it a daily plan?

royal bay
#

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

viral oak
#

1h after being generated

royal bay
#

Do you mean the time different is between the draft to finalized invoice?

viral oak
#

yes

royal bay
#

let me set +1 hour

royal bay
#

Hi All
Which webbook event is responsible for if the card has no money or less money etc..
with issue message

viral oak
#

I'm not sure I understand the question

royal bay
#

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" ?

viral oak
#

you would then need to look at the payment_intent of that invoice and look at the last_payment_error

royal bay
#

is it string type? last_payment_error

viral oak
royal bay
#

let me check again