#Leo75
1 messages · Page 1 of 1 (latest)
Hi there, the stripe trigger command will create all the necessary resources for the event. In invoice.paid case, a customer is needed for an invoice and that's why a new customer is created.
The workaround is to use the --override flag to override the customerId of the generated invoice (https://stripe.com/docs/cli/trigger#trigger-override). Note that a new customer is still created regardless.
Thank you Jack! What I'm trying to do is test a subscription where the customer is rebilled. Are you aware of a way I can do this? Is there an event other than invoice.paid I should use?
What do you by rebilling a customer?
So I'm creating a subscription for cus_Nxxx. I have that working on the command line - a new customer is created and put in my database
I want to update fields in my database when Stripe rebills the account.
I want to make sure that when the rebill runs, the code works using the existing customer
does that make sense?
Is my understanding correct that you want to test the recurring payments? (i.e., Stripe automatically charges the customer)?
Yes, that's it exactly
I see. In this case I believe test clocks is a better choice https://stripe.com/docs/billing/testing/test-clocks
Thank you!
You can use test clocks to advance the time without actually waiting for one month to see the recurring payments happen.
I saw that. I'll look into it more closely. Thanks again for your help.
Welcome! happy to help.