#ynspc

1 messages ยท Page 1 of 1 (latest)

craggy anvilBOT
frail finch
#

Hi ๐Ÿ‘‹ that's expected behavior. pending_setup_intent is only populated for Subscriptions that start without needing to process a payment (such as when they begin with a free trial).

stiff lynx
#

So, if i want to make subscription from the new payment method then,
first i need attach the payment-method "card" to the customer
then only proceed to make subscription
Am i correct

frail finch
#

I'm sorry, I feel like there is context about your situation that I'm missing, I'm not sure what new payment method you're referring to. Saving payment method details first, and then creating the Subscription is one possible path.

stiff lynx
#

The customer doesnot have any payment method saved

#

Yeah i successfully saved and created new subscription

#

How can I check the next payment event using test clock?

#

For subscription that I just created

frail finch
# stiff lynx The customer doesnot have any payment method saved

Is this a hypothetical scenario? I'm asking because the customer you used in the request you shared had a Payment Method already set up and had one set as their default for Subscriptions, which is why the Subscription you created was able to automatically process its first payment and proceed to an active status.

#

If you created the Subscription inside of a Test Clock, then you can advance the time of the test clock to see how the Subscription will progress. If the Subscription was created outside of a Test Clock, then it cannot be used with a Test Clock and you will need to create a new Subscription inside of the Test Clock.

stiff lynx
#

req_4R2S7ybI3GjaiU
I tried in this event

stiff lynx
#

sorry i got it

#

https://stripe.com/docs/api/subscriptions/object#subscription_object-test_clock

stiff lynx
#

do we put the frozen time in utc format while creating test-clock?

stiff lynx
frail finch
#

Sorry for the delay, I'm split between threads at the moment, I'll be back as soon as I can.

stiff lynx
#

No worries. Please take your time

frail finch
#

Alright, you have my undivided attention, diving into these requests.

#

You're correct, you don't specify the Test Clock when creating the Subscription (and sorry, I should have made that more clear up front), it's on the Customer object.

You start by creating a Customer inside of the Test Clock, via the test_clock field:
https://stripe.com/docs/api/customers/create#create_customer-test_clock
Then, any Subscriptions created for the Customer will also be placed inside of the Test Clock.

And yes, the Test Clock endpoint should be expecting a unixtimestamp based in UTC.

stiff lynx
#

thanks

frail finch
#

Any time!