#sarvesh3742

1 messages · Page 1 of 1 (latest)

slow bronzeBOT
untold scroll
#

hi there!

#

how can I help?

stuck canyon
#

Hi

#

we are updating subscription by keeping 'billing_cycle_anchor'=>'unchanged'
already subscribed to webhook events as follow
customer.subscription.deleted
invoice.paid
invoice.payment_failed

so in case of update subscription, can we get some different status / type of it? or same as Paid and "type": "invoice.paid" ?

#

or any other webhook event needs to subscribe for update subscription case?

untold scroll
#

I'm not sure I udnerstand. can you give a conrete example of what you are trying to do?

#

and you can listen to customer.subscription.updated to be notified when the subscription changes

stuck canyon
#

$subscription = $stripe->subscriptions->update($subscriptionData['stripe_subscription_id'],[
'items' => [[
'price' => $stripePriceId,
]],
'metadata' => $metaData,
'billing_cycle_anchor'=>'unchanged',
'payment_behavior' => 'default_incomplete',
]);

untold scroll
#

and what's your question?

#

what's the issue?

stuck canyon
#

so in case of update subscription, can we get some different status / type of it? or same as Paid and "type": "invoice.paid" ?
or any other webhook event needs to subscribe for update subscription case?

untold scroll
#

or any other webhook event needs to subscribe for update subscription case?
you can listen to customer.subscription.updated to be notified when the subscription changes

stuck canyon
#

invoice.paid webhook event is useful in case of subscription or need to add use "customer.subscription.created" event?

#

customer.subscription.created
customer.subscription.updated
customer.subscription.deleted

untold scroll
#

these are two different event.
invoice.paid is sent every time an invoice is paid. So that includes the first invoice, but also all recurring invoices.
customer.subscription.created is sent only when the subscription is created

stuck canyon
#

ok, got it

#

and how to create a test for invoice payment fail and retry for next 1 week to capture payment from customer card?

untold scroll
#

you want to test a failed payment with a Subscription?

stuck canyon
#

yes

untold scroll
#

so when the trial ends, Stripe will try to charge the card, which will fail.