#Syafiq Idrus

1 messages · Page 1 of 1 (latest)

worldly galeBOT
hot badge
#

👋 happy to help

#

if there was a way to trigger a specific event from a specific stripe testing account?
I'm not sure I follow, would you mind elaborating?

tulip adder
#

I would like the event "invoice.payment_succeed" to be triggered from a specific account. Right now, every time i run the command
stripe trigger invoice.payment_succeeded
It creates a new account instead

#

By account, i mean a specific customer

hot badge
#

do you mean a customer?

hot badge
#

first I would like to specify that invoice.paid is a better event to listen to than invoice.payment_succeeded in general

tulip adder
#

Can you explain the difference between the two?

hot badge
#

invoice.paid
Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.

#

invoice.payment_succeeded
Occurs whenever an invoice payment attempt succeeds.

tulip adder
#

Noted

#

But the question still remains, is there any way to trigger this event from a specific customer?

hot badge
#

yes sure

#

with the already created fixture that's not really possible

#

but you can get inspired from that fixture to create a custom fixture

#

you would remove the customer creation

tulip adder
#

I see it now

#

So these are essentially custom steps that i can create using whatever params i want

hot badge
#

yes exactly

tulip adder
#

Ill have a look at it now and play around with it. If i have any questions, should i respond to this thread or create a new one?

hot badge
#

yes please come back here

tulip adder
#

I have another question

hot badge
#

sure

tulip adder
#

If i am trying to track when a subscription is renewed, would checking invoice.paid be the best way to go about it?

hot badge
tulip adder
#

Is there a way that i can track days in between payment periods?

hot badge
#

what do you mean?

tulip adder
#

Say the billing cycle was 1 year, is there a way that i can create a webhook that is triggered each month leading up to the payment

#

From my understanding, the active subscriptions would only be triggered on the day of the payment

hot badge
#

if it's a yearly billing cycle why do you need a monthly webhook?

#

you will have an invoice.upcoming event ahead of the renewal

tulip adder
#

We have a product (which is a service) where a user pays for a yearly subscription. This service allows the user a certain number of credits each month, that would then needs to be renewed each month

hot badge
#

if you really need to do that in Stripe you would have to create another subscription with a monthly price of 0$

#

but this is not ideal to say the least

tulip adder
#

What would be the best way to handle this flow

#

Currently we already have a monthly price, which is working as intended, and this webhook integration would help reset the tokens each month.

The only issue now is the yearly subscription, whereby the tokens should still be reset each month, instead of each year

hot badge
#

it's not really possible to do that in Stripe Billing, what you can do instead is create the monthly recurring event on your side and only handling billing on Stripe's side

tulip adder
#

I see, and i guess this would only be triggered if the billing cycle is set to yearly. else if its a monthly billing cycle, i can still use the webhook

hot badge
#

yes

tulip adder
#

Noted. Thanks for the info. Ill get back to looking at the fixtures for now

hot badge
#

someone else might be here to pick up the thread I need to head out now

tulip adder
#

Sure thing

#

Thanks for the help!