#pain-test-clock
1 messages · Page 1 of 1 (latest)
Got it, thanks.
There seems to be a ongoing issues with the Test Clocks, e.g. I have a recurring subscription (daily) and I advance the time by 24 hours (1 day) or even 1.5 days, this will not trigger the charge event, I have to send another time advancement even by one minute for it to occur, is this normal?
Did you wait long enough for the events to be triggered? Do you have a concrete example I can look at?
I tried waiting 5 minutes at most
Should I be waiting more than that as I already skipped it past the time it should be charging?
Also another question, is the "latest_invoice" linked to the the latest charge (universal) or is it linked to the latest charge related to it?
Sorry for all these questions, I really appreciate the help.
hi there, can you paste the subscription id here so that I can take a look?
i'm not quite sure what you mean by is the "latest_invoice" linked to the the latest charge (universal) or is it linked to the latest charge related to it? - can you share more about what you're trying to achieve here with the latest_invoice
Sorry, let me rephrase: How does the latest_invoice link up to the "latest invoice"
in customer.subscription.updated there is no invoice parameter but in charge.failed there is
but customer.subscription.updated has a parameter for latest_invoice which matches up the invoice in charge.failed?
Will the latest_invoice always be related to the latest charge.failed or do they have a relation (as in will it always belong to the charge.failed related to the actual charge and not just the recent charge)?
(Sorry if that sounds a bit confusing as I'm confused on how it works)
the latest_invoice on the Subscription is the most recent invoice the Subscription has generated.
I checked a customer.subscription.updated event on my own account and that has the latest_invoice parameter - are you saying that you are not seeing that parameter on the event you received? If so, can you share the event id here?
i think it'll be easier for you to let me know what you're trying to achieve here with both latest_invoice and charge.failed so that I can advise you. For example, if you're trying to figure out if the latest invoice has failed payment, i would probably listen for the invoice.payment_failed event instead of charge.failed
Oh that's probably a better idea, I forgot about the invoice.payment_failed
I was contemplating which event to listen to customer.subscription.updated or charge.failed
I required the invoice from a failed charge so I can request more details, I believe invoice.payment_failed is the right answer for this