#krishna-awate_webhooks
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1355168854241837066
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- krishna-awate_webhooks, 23 hours ago, 13 messages
- krishna-awate_webhooks, 1 day ago, 60 messages
Hi, are you manually making requests to unpause the subscription?
Yes
Through dashbaord
Want to pause subscription. Can I do using this option --> Pause Payment Collection?
In documents --> customer.subscription.paused
data.object is a subscription
Occurs whenever a customer’s subscription is paused. Only applies when subscriptions enter status=paused, not when payment collection is paused.
How can I test puase & resume events?
We do not have expertise on the Dashboard, but you can make the pause and then update the subscription's metadata: https://docs.stripe.com/api/subscriptions/update#update_subscription-metadata to track those. Also, since you're manually making those requests you can just track that on your end and update your database
When I resume subscription. Payload for charged and resume is same. How can I know which one is for resume?
If you update the subscription with the metadata, you should be able to attain that level of information on the update event after you pass the metadata
Also, can you share the two events from the pause/ unpause actions please?
customer.subscription.paused
customer.subscription.resumed
but when this events hit I am able to see only customer.subscription.updated
I am missing anything? or not pausing subscription in correct way?
No, that is how it works. Since you're listening to customer.subscription.pausedand customer.subscription.resumed does not that solve your problem and telling you exactly what happened?
If not, what are you looking to see exactly?
When subscription is paused
- I want to send email to customer and admin same for resumed
- want to store some data when paused and resumed
To do that I want to trigger paused and resume webhook but not able to trigger these. Instead of this subscription.udpated event is triggering.
Can you share a concrete example subscription please?
You can share the sub_ id with me when customer.subscription.paused was not triggered when expected
sub_1R7dceDBfYojrB0W7yJu4LOr
As, that is because you're pausing the collection and not pausing the subscription. We document that here: https://docs.stripe.com/api/events/types#event_types-customer.subscription.paused
Only applies when subscriptions enter status=paused, not when payment collection is paused.
On the update event, you can look at:
previous_attributes: {
canceled_at: 1743171059,
pause_collection: null
}
and compare it to the the current
pause_collection: {
behavior: "keep_as_draft",
resumes_at: null
},
Can you try that?
if (event_data?.pause_collection) {
isSubPause = true;
} else {
isSubPause = false;
}
I have used this logic to find out susscription is paused or resume
but there is one problem below:
pause_collection is null for both invoice paid (subscription.updated triggers when invoice is paid) and subscription resume, so how can I identify resume?
customer.subscription.updated is being triggered for invoice.paid and customer.subscription.resumed and both having pause_collection: null
Pausing the collection does not make the subscription status to pause:
https://docs.stripe.com/billing/subscriptions/pause-payment
Subscriptions with paused collection can’t move into status=paused. Only ending free trial periods without a payment method cause subscriptions to enter a paused status.
Can you share customer.subscription.resumed event with me? It should start with evt_
How to see?
Similar to the above, https://docs.stripe.com/api/events/types#event_types-customer.subscription.resumed
Only applies when a status=paused subscription is resumed, not when payment collection is resumed.
I'm asking for an event that saw pause_collection: null and what you expect.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Let's step back. The subscription status:paused and the pause_collection are separate.
Okay got it
api_version =
'2022-11-15'
created =
1743172787
data =
{object: {…}, previous_attributes: {…}}
id =
'evt_1R7e4VDBfYojrB0WsC2wIIeE'
livemode =
false
object =
'event'
pending_webhooks =
1
request =
{id: 'req_gE3zBGrGiKzYfk', idempotency_key: 'cd047c05-54e6-4697-94ff-6a095b3598dd'}
type =
'customer.subscription.updated'
You're using pause collection: https://docs.stripe.com/billing/subscriptions/pause-payment which means that you'd see customer.subscription.updated events in this case
id ='evt_1R7e4VDBfYojrB0WsC2wIIeE'
How to trigger pause subscription?
Want to test pause but not able to trigger
You can see that the precious attributes show it correctly:
previous_attributes: {
canceled_at: 1743171124,
pause_collection: {
behavior: "keep_as_draft",
resumes_at: null
}
}
Yes but for resume it is null
I can't help you with Dashboard behavior. This channel is for developers with technical questions with the API.
You can't explititely update that. We document how subscriptions work here: https://docs.stripe.com/billing/subscriptions/overview
You see this status when a subscription is configured to pause when a free trial ends without a payment method. Invoicing won’t occur until the subscription is resumed.
Okay but I am haiving issue to identify resume payment collection as pause_collection is null for resume payment invoice paid
That is beacuse you're not setting it. That comes from you and your code need to send that: https://docs.stripe.com/api/subscriptions/update#update_subscription-pause_collection-resumes_at
Can you please review the above documents carefully first? Then, when you have specific questions I'm happy to assist further
Sir my question is that subcription.update trigger on both inovice.paid and resume payment collection. I want to identify which one is resume.
if i depend on pause_collection then it is null for both inovice.paid and resume payment collection.
In that case how can I identify which one is resume payment collection.
Can you share the events from the pause_collection that show null for both in the previous attribute?
For resume payment collection id is 'evt_1R7eDoDBfYojrB0WrzEc2F8N'
That is because you're resuming so that will be null.
Otherwide, you're not resuming it
same pause_collection : null when invoice.paid
evt_1R7eKYDBfYojrB0WJ60HpTfD