#idhruv - test clocks

1 messages · Page 1 of 1 (latest)

shell leaf
#

Hi 👋

#

Can you share a request ID?

oak star
#

sure, just a sec

#

req_v9UxEa2aFSfPjc

shell leaf
#

Thanks, looking

oak star
#

ok

shell leaf
#

Okay, yeah, You don't pass a test_clock parameter when creating a Subscription Schedule. The test_clock is associated with a specific customer and by using that customer you assign the Test clock to the Subscription Schedule

oak star
#

so now?

#

how can i assign this to the customer

shell leaf
#

We lay this out nicely here.

#

You will need to start fresh. New customer, new subscription schedule

oak star
#

but now my problem is I already have a customer with certain customerId

shell leaf
#

Okay but this testing, so can't you just delete that one and create a new one?

oak star
#

and these customers are actively involved with other things on our application so i need test the flow using their customer Id, is it not possible?

shell leaf
#

Not with Test clocks

oak star
#

nope, coz then I cannot use them in my application

#

i cannot use them in the process of booking n so on

shell leaf
#

You should not be testing in Live mode, it's a violation of the Terms of Service. So all of this should be test data

oak star
#

we have been some test data already

#

given

#

and it is assigned with booking in our application so they have their own customer Id n stuff

#

can we use customerId from them for test clocks?

#

and if not then what purpose does test_clock serves in a subscription? even if I allot a clock Id by manually creating a clock it will never work as it should

shell leaf
#

The idea and utility of test clocks is to allow you to test various approaches to subscriptions and subscription schedules without having to actually wait for the time to pass.

#

It is not intended to test with specific existing Customer records

oak star
#

my problem is that there are other properties assigned to these test customers data and it is purely testing based. Now if I create a new customer for this purpose, it will serve no purpose because then from my database I will have no properties assigned and hence even if I play with clocks it will just advance the time and call my endpoints, but will never execute the code inside

#

how is that possible that we cannot assign existing customerIds to test clocks? all of them are valid test data

#

in our application every user is assigned with bookingIds or HostIds and several other properties, how will I assign all this to new user I create for stripe clock testing? it can only work the opposite way, i.e i need to somehow assign existing customer to the clock via customer_id n make use of its clock id in my subscription code

shell leaf
#

So script Customer creation for Test Clocks that configures the Customer object to match what you are expecting.

#

The test_clock parameter can only be passed at the time of Customer creation. It is not available for updating customers.

oak star
#

ok

shell leaf
#

I can add your feedback as a feature request.

oak star
#

thank you

#

i have now a different problem

#

This is my clock customer with payment method setup

shell leaf
#

Okay

oak star
#

and this customer is also assigned to a clock

#

from stripe dashboard

#

but when i click on pay now in my application i get this:

#

okay please ignore, i solved it. it was due to incorrect default_payment_method flag