#shubhamjha
1 messages · Page 1 of 1 (latest)
Can you be more specific? I don't understand what you're asking
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
?
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"?
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?
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)
What are the exact steps you're taking? It sounds like the first step is that you're creating a Subscription Schedule? Can you give me the request ID showing you creating that? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Okay, so what do you do next?
i am advancing the time and check for this webhook event invoice.upcoming Event
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?
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.
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?
i have to update in my db when shedule subscription is fire and became subscribed for the shudule date
You should be able to listen for customer.subscription.created.
so how i listen that ? is their any evemt which they call when paying shedule subscription
There are many different Events related to Subscriptions. Have you read through this section of our docs? https://stripe.com/docs/billing/subscriptions/overview#subscription-events
oh yes you are means when a shedule subscription become subscription they are calling create subscription?
Yes.
ohk
ok so is their any why by which we get some difreence is that a create subscription is for sheduleing or only create
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?
If so, you can check to see if the Subscription has a schedule attached or not: https://stripe.com/docs/api/subscriptions/object#subscription_object-schedule
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
Sounds like you passed in an undefined variable instead of a string.
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
?
?
i want to cancel the subscription which is just created by shedule subscription?
how to cancel it?
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.
how can you please explain litte bit
What do you need me to explain? Can you ask a specific question?
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
You update the Subscription Schedule with a new phase that has the new plan.
NO