#Leo75

1 messages · Page 1 of 1 (latest)

copper lichenBOT
spare bramble
#

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.

plucky turtle
#

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?

spare bramble
#

What do you by rebilling a customer?

plucky turtle
#

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?

spare bramble
#

Is my understanding correct that you want to test the recurring payments? (i.e., Stripe automatically charges the customer)?

plucky turtle
#

Yes, that's it exactly

spare bramble
plucky turtle
#

Thank you!

spare bramble
#

You can use test clocks to advance the time without actually waiting for one month to see the recurring payments happen.

plucky turtle
#

I saw that. I'll look into it more closely. Thanks again for your help.

spare bramble
#

Welcome! happy to help.