#Jonah Librach
1 messages · Page 1 of 1 (latest)
Obviously starting with stripe.Customer.retrieve(CUSTOMER_ID)
https://stripe.com/docs/api/payment_intents/list#list_payment_intents-customer if you only use PaymentIntent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Are there other things other than PaymentIntent? That is the most updated, correct?
I.e, I shouldn't be using anything else if I'm just getting started out
Yep that's the most updated.
Thanks so much, that's extremely helpful
And the property 'amount_receive', intuitively, should be the value I'm looking for?
Looks like it is.
Yeah looks like it. I would double confirm amount_received vs amount in case you only capture a part of the PaymentIntent
looks like it's amount_received
Yes. Just need to double check now, because I'm calling the paymentintent list, but it's only giving me one result.
Could be an issue with the test clock, or something else
How long do I need to wait until the stripe clock is calibrated?
Because after the test runs, I can query the customer and everything looks right, but I can't get the test_clock calibration timing
Is the recommended approach to just continue to query the clock until its ready?
By calibration do you mean clock stablization?
Sorry:
Like a few more secs?
No
My test involves setting a test_clock a month in advance
And then it waits to see if my webhooks handle things properly
When time advances
No there's no issue, I guess I'm just trying to figure out what the best way to ensure that the clock is in "ready" state before continuing the test
And I suppose I just need to keep polling until it's ready
Unless there's another way...?
Ah I see, yes I also do the same thing when testing with test clock. I do a loop checking the test clock status
Hmm maybe just temporary? On my testing it's like 10 secs ish
The test is extremely flakey
Running the same thing 3 times gets 3 different results because even when it says ready, it isn't ready
Is there a way to make sure that it's done sending all the messages to the webhooks?
Um I don't think there is a convenient way. Just like you said before do a polling on Test Clock status and wait until it's ready, then validate the webhook
So maybe it's something I'm confused about
In my test, I create a subscription. It charges and everything is good.
Then, I advance the clock to after 30 days later (from July 1 to Aug 2).
This invokes the following webhooks:
test_helpers.test_clock.advancing
invoice.upcoming
invoice.created
customer.subscription.updated
test_helpers.test_clock.ready
But it's doing so without charging a second time.
Then, when I advance it again (to Sept 3), only then does it charge twice, where it should have charged again after the clock advanced the first time.