#shubhamjha

1 messages · Page 1 of 1 (latest)

unreal echoBOT
limber sparrow
#

Can you be more specific? I don't understand what you're asking

uneven hamlet
#

i am testing my wwebhook event for upcming invoice

#

i am testing my webhook for upcoming invoice but if i shedule a subscription the upcoming invoice webhook event not call but its invoice is paid

#

?

limber sparrow
#

I still don't understand. Can you give a step-by-step explanation of what you're doing and what is happening as a result? What do you mean "schedule a subscription"?

unreal echoBOT
uneven hamlet
#

i am testing my webhook for upcming event

#

invoice event

inner palm
#

Hello! I'm taking over and catching up...

#

Okay, so you're trying to test the invoice.upcoming Event? If so, what are the exact steps you're taking to test it?

uneven hamlet
#

i am testing it for shedule subscription

#

but my webhook can not call for this invoice.upcoming Event

#

but it works fine for subscriton (without sheuling)

inner palm
uneven hamlet
#

req_je08i3e5uZrdtj

#

?

#

?

inner palm
#

Okay, so what do you do next?

uneven hamlet
#

i am advancing the time and check for this webhook event invoice.upcoming Event

inner palm
#

You're looking for an invoice.upcoming Event for the first Invoice for the Subscription? Meaning before the Subscription is created by the Subscription Schedule?

uneven hamlet
#

yes

#

but it runs fine for subscription but dont run for shedule

inner palm
#

Correct, that's expected. The invoice.upcoming Event only fires when the Subscription already exists.

#

It won't fire before a Subscription Schedule creates a Subscription.

uneven hamlet
#

oh

#

then wich event i should looking for shedule subscription

inner palm
#

The invoice.upcoming Event is triggered by the internal payment timing of a Subscription, but if the Subscription doesn't exist yet there is no internal payment timing, so the Event doesn't fire.

#

What's your use case exactly?

uneven hamlet
#

i have to update in my db when shedule subscription is fire and became subscribed for the shudule date

inner palm
#

You should be able to listen for customer.subscription.created.

uneven hamlet
inner palm
uneven hamlet
inner palm
#

Yes.

uneven hamlet
#

ohk

#

ok so is their any why by which we get some difreence is that a create subscription is for sheduleing or only create

inner palm
#

Are you asking how to tell the difference between a customer.subscription.created Event as a result of a Subscription Schedule creating the Subscription vs. a Subscription created without a Subscription Schedule?

uneven hamlet
#

Error: Stripe: Argument "subscription_exposed_id" must be a string, but got: undefined (on API request to GET /v1/subscriptions/{subscription_exposed_id})

#

i got this eroor in customer.subscription.created in this event

inner palm
#

Sounds like you passed in an undefined variable instead of a string.

uneven hamlet
#

data: {
errorMsg: 'The subscription is managed by the subscription schedule sub_sched_1N46YCSBeubK048wE0CKrDQy, and updating any cancelation behavior directly is not allowed. Please update the schedule instead.',
stack: 'Error: The subscription is managed by the subscription schedule sub_sched_1N46YCSBeubK048wE0CKrDQy, and updating any cancelation behavior directly is not allowed. Please update the schedule instead.\n' +
' at StripeError.generate (C:\Users\User\Downloads\LIVE_MODE_STRIPE\STRIPE ISSUE TEST\node_modules\stripe\lib\Error.js:38:24)\n' +
' at res.toJSON.then.StripeAPIError.message (C:\Users\User\Downloads\LIVE_MODE_STRIPE\STRIPE ISSUE TEST\node_modules\stripe\lib\RequestSender.js:104:43)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
}
}

#

when i cancel that new subscription

#

?

#

?

inner palm
#

Looking...

#

The error message is accurate. What questions do you have?

uneven hamlet
#

i want to cancel the subscription which is just created by shedule subscription?

#

how to cancel it?

inner palm
#

As the error states, the Subscription is being controlled by the Subscription Schedule, so you need to make changes to the Subscription Schedule instead of changing the Subscription directly.

uneven hamlet
#

how can you please explain litte bit

inner palm
#

What do you need me to explain? Can you ask a specific question?

uneven hamlet
#

i just have a subscription which is associated with shedule subscription but i need to update new plan for this ubscription id how to do that

inner palm
#

You update the Subscription Schedule with a new phase that has the new plan.

uneven hamlet
#

NO

unreal echoBOT
sudden comet
#

"No" to which part of that?

#

That is the correct way to update a subscription like that with a schedule