#hakiros
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- hakiros-subscription-upgrade, 1 hour ago, 9 messages
- hakiros, 5 hours ago, 3 messages
- hakiros, 3 days ago, 5 messages
- hakiros, 4 days ago, 4 messages
- hakiros, 4 days ago, 12 messages
Hi there 👋 you're right that those amounts may change as the quantity changes, so can you help me understand what you're hoping to pull out of a webhook Event, and what Event types you're currently listening to?
im using customer.subscription.created, customer.subscription.updated, customer.subscription.deleted
in first two I need to insert price of this subscription into database soo i need to get it from somewhere, or calculate it, but I need eighter price this this amount, or I need at least price for first and each next subscription
Hm, the items array in the Subscription should still have a reference to the Price object that it's built off of, as well as a quantity. So you'd be able to look up the Price object and calculate the amount. If you want to see the amount after we've hanlded the calculations, it would likely be better to listen to Invoice related events which should contain a field indicating the total amount the Invoice is charging for. One drawback, is that amount may include discounts, credits, or tax amounts, so if you're looking for the Subscription's subtotal you may need to look elsewhere.