Azure / Commercial-Marketplace-SaaS-Accelerator

A reference example with sample code for developers interested publishing transactable, Software as a-Service offers in the Microsoft commercial marketplace.
MIT License
188 stars 288 forks source link

Examples showing the correct handling automatic the automatic 72h refunds #446

Open aduggleby opened 1 year ago

aduggleby commented 1 year ago

Is your feature request related to a problem? Please describe. It is Microsoft's policy to automatically refund a subscription charge if it cancelled within 72h. The webhook event for a refunded and non-refunded webhook are identical but the necessary action on the publisher's side is very different.

Describe the solution you'd like When this was escalated to the team at MS they responded saying that the webhook should check the 72h period based on the purchasing timestamp. If that is indeed the best/only solution then I would like to see this in this sample project. If not, then please add examples showing which API call to make to verify if it was refunded.

Describe alternatives you've considered Contacted support and got the timestamp answer.

Additional context It's also unclear if SubscriptionResult.TimeStamp or SubscriptionResult.Term.StartDate would be the correct basis for the 72h calculation. Update in Commercial Marketplace Documentation would be good.

santhoshb-msft commented 1 year ago

Hi @aduggleby Understood, for this clarification, it would think Marketplace support will the best place. I think yes we could add something in there to distinguish the difference, but due to that external buisness logic dependency it can be tricky. We will discuss and let you know, if we can take this up. Thank you for the feedback!