Prerequisites
Review Prerequisites for service-to-service APIs. This API only supports the Microsoft Entra ID auth type. If product configuration isn’t published in Partner Center, can succeed but return no results.Request
Request syntax
Request header
Request body
Request example
Response
Response body
The
RecurrenceItem object contains the following parameters.
Recurrence states
- Inactive/Canceled/Failed are terminal states. When a subscription enters one of these states, the user must repurchase the subscription to activate it again. The user isn’t entitled to use the services in these states.
- When a subscription is Canceled, the expirationTime is updated with the date and time of the cancellation.
- The ID of the subscription remains the same during its entire lifetime. It doesn’t change if the auto-renew option is turned on or off. If a user repurchases a subscription after reaching a terminal state, a new subscription ID will be created.
- The ID of a subscription should be used to execute any operation on an individual subscription.
- When a user repurchases a subscription after canceling or discontinuing it, if you query the results for the user you’ll get two entries: one with the old subscription ID in a terminal state, and one with the new subscription ID in an active state.
- It’s always a good practice to check both recurrenceState and expirationTime, as updates to recurrenceState can be delayed a few minutes (or occasionally hours).
Response example
Explanation of example response
This response shows three subscription entries for the user: two in aCanceled state and one currently Active that started on July 26, 2021.
The active subscription’s period ends on August 26, 2021 and is set to auto-renew on that date.
If the renewal payment fails, the subscription transitions to the Grace window where the user still receives benefits before expirationTimeWithGrace (September 08, 2021 in this example).
When the subscription transitions to the Grace window, the recurrenceState becomes InDunning.
After Grace ends, the subscription transitions into the Dunning window.
During this period, your service stops granting benefits, and the user must fix their payment method.
The user is unable to cancel, or start a new subscription during this period.
When the payment is processed, the Grace time (two weeks in this example) is deducted from the next paid period.
