#ynspc
1 messages ยท Page 1 of 1 (latest)
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).
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
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.
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
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.
req_4R2S7ybI3GjaiU
I tried in this event
For this condition, do I need to use stripe dashboard or can it be triggered from our api or stripe_cli?
sorry i got it
https://stripe.com/docs/api/subscriptions/object#subscription_object-test_clock
req_4R2S7ybI3GjaiU
I tried in this event
do we put the frozen time in utc format while creating test-clock?
But test_clock is missing in the create subscription. It was only found in the subscription object
Sorry for the delay, I'm split between threads at the moment, I'll be back as soon as I can.
No worries. Please take your time
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks
Any time!