Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Table of Contents
- What is the Clawback Service?
- Latest Updates October 2025
- Risk and Fraud Potential
- Microsoft.StoreServices Library
- Setup and Configuration
- Processing Events
- Reconciliation by Product Type
- Event States and Actions
- Testing
- Troubleshooting
What is the Clawback Service?
The Clawback service sends notifications to your message queue when Microsoft Store purchases are refunded, returned, or charged back by banks or credit card companies. This helps you protect your in-game economy and prevent fraud.
Why Use Clawback Events?
Without Clawback notifications, users can exploit the system by:
- Purchasing consumable items (like in-game currency)
- Consuming the items in your game
- Requesting a refund from Microsoft
- Keeping both their money and the value of the consumed items
Key Benefits
- Fraud Prevention: Detect and respond to refund abuse in real-time
- Revenue Protection: Revoke content when payments are reversed
- Real-time Notifications: Get instant alerts instead of waiting for periodic entitlement checks
- Comprehensive Coverage: Support for all product types (consumables, subscriptions, games, durables, bundles)
How It Works
- User requests refund through Microsoft Store
- Clawback event created and sent to your message queue
- Your service reads the event and finds the affected purchases
- Take corrective action by removing content or adjusting balances
This helps your service prevent and reduce revenue loss from fraudulent transactions and refund abuse.
Latest updates October 2025
Clawback events can now be configured for all product types including Games, Durables, and Bundles. To enable these additional product types for your Clawback queue, contact your Developer Partner Manager or Microsoft contact. See Supported Clawback product types.
When a bundle (Game bundle, Add-on bundle, or Season Pass bundle) is refunded, the Clawback service will now generate individual events for each consumable product included within that bundle. This ensures that partners receive appropriate notifications when consumed items are affected by refunds. See Clawback events for bundles.
Risk and fraud potential with refunded products
The Microsoft Store allows users the ability to request refunds or returns of digitally purchased content through their account's orders page (https://account.microsoft.com/billing/orders/). The automated system allows users the ability to receive a refund if certain criteria are met, such as the time between purchase and the refund or time spent playing the game. Otherwise, only in certain instances will Microsoft's Customer Support team issue refunds or returns of a digital item.
For consumable products (like in-game currency), if the item hasn't been used yet, the refund automatically removes it from the user's balance. However, if the item was already used before the refund, the user's balance stays the same (never goes below 0). This means the user keeps both the in-game currency they already spent and gets their money back. This can lead to abuse where players buy currency, spend it in-game, then get refunded.
Store-managed subscriptions must follow different regional laws that require either full or partial refunds. Depending on the refund type, you may want to remove different subscription benefits based on what rewards were already given to the user.
For Games and Durable products (including bundles), the license is removed from the user's account where XStore licensing APIs and Collections services will no longer show it as valid. However, your service would only notice these changes the next time it checks for user entitlements. If your service gives specific rewards or benefits to users, they might keep access to content while getting their money back until you check entitlements again.
We recommend using the Clawback event service to detect these situations and take corrective action to protect your revenue.
Utilizing the Microsoft.StoreServices library and sample
To help demonstrate the principles and flows outlined in this article review the Microsoft.StoreServices Sample which provides the following:
Use of the Microsoft.StoreServices library to manage authentication and make the calls to the Microsoft Store Services.
Example logic for managing consumable products, tracking pending consume requests, reconciling refunded purchases, renew expired User Store Ids, and more.
A configuration guide that includes the steps in this article on how to configure and setup your Microsoft Entra Id for this authentication method.
Clawback event queues
The Clawback event service uses an Azure Storage Queue set up for your service's Entra application client Id. Events are added to the queue within seconds of when a refund, return, or chargeback is processed through Microsoft Store services. This lets your service regularly check for recent Clawback events across all your products and handle them in your system.
Supported Clawback product types
As of October 2025, the Clawback event service supports refunds of all product types. Below is a table of common products configured in Partner Center for games and their associated ProductKind values that would need to be enabled on your Clawback queue.
| Product type | ProductKind value |
|---|---|
| Store-managed Consumable | Consumable |
| Developer-managed Consumable | UnmanagedConsumable |
| Store-managed Subscription | Pass |
| Durables with a package | Durable |
| Durables without a package | Durable |
| Add-on Bundle | Durable |
| Season Pass | Durable |
| Base Game | Game |
| Game Bundle | Game |
Note
To enable your Clawback queue to receive events for product types beyond Consumables and Store-managed subscriptions, request those additional product types through your Developer Partner Manager or Microsoft Contact. This configuration can be done when your Clawback queue is originally set up or can be added later.
Required setup / on-boarding request
Setting up a Clawback event queue requires the Microsoft Store services team to configure an Azure Storage Queue for you. Microsoft covers the hosting costs and management.
To have a Clawback event queue setup for you, contact your Developer Partner Manager or Microsoft contact. When requesting the queue's setup you must provide the following:
- The Entra application client Id that your service(s) will use to authenticate and that your products are associated with in Partner Center.
- The preferred geographical Azure data center of the primary queue. This is not required as the queue is accessible world-wide, but will provide better latency if close to your own service(s).
- The product types you want to receive Clawback events for. By default, consumables and store-managed subscriptions are enabled. If you want to receive events for additional product types such as durables, games, or bundles, you must specifically request them.
Once submitted, it can take 1-2 weeks for your queue setup to be deployed.
Associating your products with your Clawback queue
To receive Clawback events for your products, you must link the Entra client Id from your queue setup with your products in Partner Center. To do this, follow the same steps in Additional configuration required to view and manage products with a User Store Id / Microsoft Entra Id Auth.
Accessing your Clawback event queue
To access your Clawback event queue, your service gets an SAS Token from purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken using your service's Entra Id credentials. The SAS Token expires after a set time, but you can request a new one anytime.
The uri parameter from the SAS Token is the web address to your Clawback Queue and includes the authentication details.
To perform different operations on your queue, you need to add specific parameters to this URI as shown below.
Processing Clawback messages from the queue
Using the modified uri parameter of the SAS token, your service can interact with your Clawback queue using either of the following:
Each Clawback event in the queue is stored as a message containing the event details.
To work with messages in the queue, your service can perform these operations by adding the following parameters to the URI:
| Operation | URI Addition | Additional Parameter | Description |
|---|---|---|---|
| Peek | /messages | peekonly=true | Looks at messages without removing them or making them invisible to others. |
| Get | /messages | none | Gets messages and makes them invisible to others for 30 seconds (so no one else processes them while you work on them). |
| Delete | /messages/(message Id from queue) | popreceipt=(value from queue message) | Permanently removes the message from the queue. |
When you use the Get operation, it makes the messages invisible to others for 30 seconds. This prevents other services from processing the same messages while you're working on them. The Peek operation doesn't hide messages - everyone can still see them. However, to delete a message you need the popreceipt value, which you only get from the Get operation (not Peek).
Recommended steps for processing messages:
- Get messages from the queue.
- Read the Clawback event details from each message.
- Find matching transactions in your database using the same productId, orderId, and lineItemId.
- Fix the items given to the user (remove currency, revoke content, etc.).
- Mark the transaction as processed in your database.
- Delete the message from the queue.
The response from the Get or Peek functions will be an XML List of QueueMessage items with the following format:
<QueueMessagesList>
<QueueMessage>
<MessageId>string-message-id</MessageId>
<InsertionTime>insertion-time</InsertionTime>
<ExpirationTime>expiration-time</ExpirationTime>
<PopReceipt>opaque-string-receipt-data</PopReceipt>
<TimeNextVisible>time-next-visible</TimeNextVisible>
<DequeueCount>integer</DequeueCount>
<MessageText>message-body</MessageText>
</QueueMessage>
</QueueMessagesList>
QueueMessage structure
| Parameter | Type | Description | Required |
|---|---|---|---|
MessageId |
GUID |
Unique Id for the message in the queue. | Yes |
InsertionTime |
datetime |
The UTC date and time that the message was inserted into the queue. | Yes |
ExpirationTime |
datetime |
The UTC date and time that the message will be automatically removed from the queue. | Yes |
PopReceipt |
string |
Used in the Delete operation to remove the message from the queue. | No |
TimeNextVisible |
datetime |
The UTC date and time that the message will be visible in the queue again. | Yes |
DequeueCount |
int |
Number of times the message has been dequeued (pulled off the queue with the Get API). | Yes |
MessageText |
string |
Base64 encoded string that is a JSON structure of a Clawback event | Yes |
Clawback event structure
Each message in the queue will have an encoded JSON string in the MessageText that represents the Clawback event with the following parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
id |
GUID |
Unique Id for the Clawback event. | Yes |
source |
string |
Source service that triggered the event. | Yes |
type |
string |
The object format of the data field. This should be ClawbackEventContractV2. | Yes |
data |
ClawbackEventContractV2 |
ClawbackEventContractV2 object that contains the data relevant to the Order affected by the Clawback event. | Yes |
time |
datetime |
The UTC date and time that the event was created. | Yes |
specversion |
string |
Version of the contract. Should be 1.0. | Yes |
datacontenttype |
string |
Format of the data parameter. This should be application/json. | Yes |
subject |
string |
Additional information used by the Clawback service for logging. | Yes |
traceparent |
string |
Additional information used by the Clawback service for logging. | Yes |
Clawback event source values
| Value | Description |
|---|---|
/Purchase/Refund |
Event originated from a return or refund being processed through Microsoft Customer Support or the Xbox Support return request site. |
/Purchase/Chargeback |
Event originated from a chargeback or chargeback reversal by the payment institution from the order. This could be a bank, credit card, etc. |
ClawbackEventContractV2 structure
| Parameter | Type | Description | Required |
|---|---|---|---|
lineItemId |
GUID |
Identifies the lineItem within the purchase order for the consumable (orders can have multiple lineItemIds for shopping cart scenarios). | Yes |
orderId |
GUID |
Identifies the purchasing order the product was a part of when purchased by the user. | Yes |
productId |
string |
Also referred to as the Store Id for the product within the Microsoft Store catalog. An example Store Id for a product is 9NBLGGH42CFD. | Yes |
productType |
string |
Indicates the product type. For more information, see Product type values and meaning. | Yes |
purchasedDate |
datetime |
The UTC date and time that the item was purchased. | Yes |
eventDate |
datetime |
The UTC date and time that the item was returned or refunded. | Yes |
sandboxId |
string |
The sandbox which the product's purchase is tied to. Production environment with end-users is 'RETAIL'. | Yes |
eventState |
string |
The state of this specific Clawback event. See Clawback event states. | Yes |
skuId |
string |
The specific SKU identifier if there are multiple offerings of the product in the Microsoft Store catalog. An example Store Id for a SKU is 0010. | Yes |
subscriptionData |
ClawbackEventSubscriptionData |
The ClawbackEventSubscriptionData object returned if the order was for a subscription product. This contains data relevant to the subscription order affected by the Clawback event. | No |
Clawback event states
| Value | Description |
|---|---|
Revoked |
User's payment was given back and an attempt was made to revoke the user's entitlement but it was not successful. For consumables, this indicates the item was fulfilled by your service before the order was returned. Reconciliation with your own records and data would be required. See Reconciling consumable Clawback events |
Returned |
User's payment was given back and their entitlement was removed from their account. No reconciliation on your service is required. For consumables, this is where the purchased item has not yet been fulfilled by your service. |
Refunded |
User's payment was given back but they were allowed to retain the entitlement to the product. No reconciliation on your service is required, but you should keep track of this user account and frequent events of this type may indicate fraud behavior. |
ChargebackReversal |
This item was originally reported as either Revoked or Returned due to a Chargeback that was initiated from the payment instrument (Credit Card, Bank, etc.). Microsoft appealed the chargeback and was granted the appeal. The cost of the item was restored to Microsoft and the item's state restored to the user's account. For information on Chargebacks see Chargebacks and chargeback reversals. Additionally for specific behavior of dev-managed vs store-managed consumables see Unique behavior of dev-managed consumables during chargeback Reversal. |
ClawbackEventSubscriptionData structure
| Parameter | Type | Description | Required |
|---|---|---|---|
recurrenceId |
string |
Unique Id to the user's subscription period and can be used with the Subscription management APIs. | Yes |
durationIntervalStart |
datetime |
The UTC date and time that the subscription's interval tied to the purchase order started. | Yes |
durationInDays |
int |
Number of days purchased for the subscription interval in the order. | Yes |
consumedDurationInDays |
int |
Number of days that were used and not refunded / returned to the user. | Yes |
Clawback event example
{
"id": "5ef37bd1-8b4b-48c4-9b67-be458d8ab9de",
"source": "/Purchase/Refund",
"type": "ClawbackEventContractV2",
"data": {
"lineItemId": "230e9063-bffe-411a-8aa1-6f99ca091452",
"orderId": "70fd35f2-7e4a-4f27-8df3-a673a5a4d9d9",
"productId": "9N0297GK108W",
"productType": "UnmanagedConsumable",
"purchasedDate": "2023-01-24T21:59:19.5725585+00:00",
"eventDate": "2023-01-26T08:18:52.246847+00:00",
"eventState": "Revoked",
"sandboxId": "XDKS.1",
"skuId": "0010"
},
"time": "2023-01-26T08:18:56.7103057+00:00",
"specversion": "1.0",
"datacontenttype": "application/json",
"subject": "/Purchase/Refund/907eb4af-57bf-4ff6-b040-e9296d169436",
"traceparent": "00-6d2a86a53e8cae15cddaadc43f4d9670-4821cba073c416c1-00"
}
Clawback refund vs return states
When an event comes from the /Purchase/Refund source, this indicates that the event is tied to either a customer refund or return request.
These two terms are sometimes used synonymously, but in the context of the Microsoft Store services they each have unique behavior that should be handled by your service.
In both cases the user will receive their payment back from the order, but they differ in what happens to the entitlement or quantity granted from the purchase. A return operation will attempt to remove the entitlement or quantity from the user's account. Refunds however result in the user's account retaining the entitlement or quantity from the purchase.
Requests to Microsoft Customer Support or through the automated tools are generally treated as return requests.
However, in rare cases, as a 'make-good' gesture based on the circumstances related to the customer's issue, the state of the event may be Refund in an effort to provide positive customer service.
The Refund state may also be used as a pro-active refund issued to the customer if there is an indication the purchase will be reported as a chargeback to avoid the chargeback processing fees.
Your service should check the eventState value and follow the recommendations for reconciliation of each value outlined in Clawback event states.
For example scenarios see Return and Revoked state behavior for consumable products and Clawback event behavior for Store-managed subscriptions.
Chargebacks and chargeback reversals
When an event comes from the /Purchase/Chargeback source, this indicates that the payment institution reversed the charge of the order and has taken payment back.
A common cause of a chargeback is a dispute or fraudulent charge to the payment instrument.
When the chargeback event happens, the Clawback service will report the event with either a Revoked or Returned state based on the attempt to remove the entitlement or quantity from the user's account.
At the time of the event, your service should treat chargeback events with the same reconciliation actions as events from /Purchase/Refund.
Microsoft will commonly appeal the chargeback if we believe the purchase appears to be legitimate and the quantity was used.
If the appeal is granted, payment is sent back to Microsoft and a ChargebackReversal event will be logged in your Clawback queue.
This event will have the same OrderIDs as the initial chargeback event.
When a ChargebackReversal happens, the item that was purchased is restored to the user's account.
Therefore, any action taken on your server to revoke or remove the purchased item should be reversed as the payment has now been restored.
Reconciling Consumable Clawback events
When a Clawback event shows that an item was already used by the player, you can choose what action to take on their account. Some possible actions include:
- Remove the same amount of currency from the user's current balance (if they have enough)
- Remove the most recent items they bought with that currency (if they don't have enough currency left)
- Don't take action right now, but watch their account for patterns of fraud or abuse (example: buying large amounts of currency, using it, then getting refunds repeatedly)
We recommend telling the user what action you took and why, and logging this information to avoid customer support issues. Example: "Due to a return issued to your account through Microsoft we have removed [qty] of [product] from your account balance."
Requirements to manage consumable Clawback events
To properly handle Clawback events for consumables, your service must track each consume transaction and use the includeOrderIds parameter as TRUE.
This parameter returns the Ids related to the purchase orders and quantity used to fulfill the consume request.
These same OrderIds are provided in the Clawback events which can then be used to search for and identify exactly which consume transaction and user in your own database should be reconciled based on the data in the event.
For more information on recommendations and flow to track consume transactions on your service, see Managing consumable products from your service
Create a consume tracking database
Your tracking database should store these values for each transaction so you can find and update them when Clawback events arrive.
| Variable | Source | Description |
|---|---|---|
Key / Unique Id |
[OrderId]:[LineItemId]:[ProductId] | OrderId and LineItemId may be duplicated across products granted through a bundle purchase, therefore your unique keys should include ProductId. The recommendation is to use a combination of the OrderId, LineItemId, and ProductId. However, you may not have access to the LineItemId for Durables, Games, and Bundle products. For consumables a minimum of LineItemId and ProductId would be required for a unique identifier if your consumable is granting a quantity of 1 per purchase. |
ProductId |
ProductId from consume request | Because the same orderId and lineItemId can be shared between different products granted through a bundle purchase, you should also track the ProductId of the item consumed. |
UserId |
UserId your system uses to identify the user being granted the consumable value | Clawback events do not provide userIds, therefore you must track which user was given the content within your system to take reconciliation action. |
OrderId |
orderTransactions -> orderId (when using "includeOrderIds": true in /consume request) | Id of user's purchase order used to fulfill all or part of this consume request. Example: Id related to the purchase of the whole shopping cart. |
LineItemId |
orderTransactions -> orderLineItemId (when using "includeOrderIds": true in /consume request) | ID representing a unique product within the user’s purchase order used to fulfill the consume request. Example: ID related to a unique item within the shopping cart during the purchase. |
Qty |
orderTransactions -> quantityConsumed (when using "includeOrderIds": true in /consume request) | Amount of the consume request that was fulfilled by this specific OrderId / LineItemId. Note: This should be 1 in the standard consumable configuration but can be greater than 1 if your consumable is configured to grant a qty greater than 1 on each purchase. |
Status |
Current state of the consume transaction within your system for your own tracking | This is helpful so that you can mark when a consume transaction has already been reconciled when a Clawback event is read and processed. This is also needed for Chargeback and Chargeback reversal. So that when you revoke an item due to a Chargeback event, if you see later a ChargebackReversal you can undo the action taken during the initial Chargeback event reconciliation. |
Set up your tracking database early, even before you start using the Clawback event queue. This gives you a history of transactions that might get refunded or charged back later. It also lets you compare data from before and after you start handling Clawback events to see the impact.
Return and Revoked state behavior for consumable products
| Consumable Type | Consumed | eventStatus | Impact to the user's entitlement of the consumable | Recommended actions for developer services |
|---|---|---|---|---|
Store-managed |
No | Return |
Qty reduced by the amount granted from the purchase. Ex: Qty = 1 before return, Qty = 0 after event. | No action, item was not consumed. |
Store-managed |
Yes | Revoked |
Qty not reduced as the item was previously consumed / fulfilled. Ex: Qty = 0 before return, Qty = 0 after event. | Search your completed transactions database for matching OrderId, LineItemId, and ProductId. Revoke value of purchase from the user's balance tracked on game server. |
Dev-managed |
No | Return |
Qty reduced by the amount granted from the purchase. Ex: Qty = 1 before return, Qty = 0 after event. | No action, item was not consumed. |
Dev-managed |
Yes | Revoked |
Qty not reduced as the item was previously consumed / fulfilled. Ex: Qty = 0 before return, Qty = 0 after event. | Search your completed transactions database for matching OrderId, LineItemId, and ProductId. Revoke value of purchase from the user's balance tracked on game server. |
Refund state behavior for consumable products
A Refund event state is a special case where the user is given their payment back, but also allowed to keep the entitlement to the item. There are two main scenarios that would lead to this event state:
- Refund issued by customer service as a 'make good' effort to a user for their inconvenience or issue that lead to the refund.
- Proactively issued refund when there is a high probability the purchase will be reported as a chargeback. This prevents the added fees and resource cost of processing a likely chargeback event.
Therefore, the correct action when you see a Refund event state is to record the event with the linked account information on your service. Then watch for patterns or repeated Refund event states on a single account indicating possible fraud or abuse on that account.
| Consumable Type | Consumed | eventStatus | Impact to the user's entitlement of the consumable | Recommended actions for developer services |
|---|---|---|---|---|
Store-managed |
No | Refund |
Qty is not reduced | No revocation action, user is allowed to keep the entitlement, but log the event and any linked user information to watch for repeated patterns |
Store-managed |
Yes | Refund |
Qty is not reduced | No revocation action, user is allowed to keep the entitlement, but log the event and any linked user information to watch for repeated patterns |
Dev-managed |
No | Refund |
Qty is not reduced | No revocation action, user is allowed to keep the entitlement, but log the event and any linked user information to watch for repeated patterns |
Dev-managed |
Yes | Refund |
Qty is not reduced | No revocation action, user is allowed to keep the entitlement, but log the event and any linked user information to watch for repeated patterns |
Chargeback behavior for consumable products
| Consumable Type | Consumed | eventStatus | Impact to the user's entitlement of the consumable | Recommended actions for developer services |
|---|---|---|---|---|
Store-managed |
No | Return |
Qty reduced by the amount granted from the purchase. Ex: Qty = 1 before return, Qty = 0 after event. | No action, item was not consumed. |
Store-managed |
Yes | Revoked |
Qty not reduced as the item was previously consumed / fulfilled. Ex: Qty = 0 before return, Qty = 0 after event. | Search your completed transactions database for matching OrderID, LineItemID, and ProductID. Revoke value of purchase from the user's balance tracked on game server, then update tracking database entry to note it was a chargeback |
Dev-managed |
No | Return |
Qty reduced by the amount granted from the purchase. Ex: Qty = 1 before return, Qty = 0 after event. | No action, item was not consumed. |
Dev-managed |
Yes | Revoked |
Qty not reduced as the item was previously consumed / fulfilled. Ex: Qty = 0 before return, Qty = 0 after event. | Search your completed transactions database for matching OrderID, LineItemID, and ProductID. Revoke value of purchase from the user's balance tracked on game server, then update tracking database entry to note it was a chargeback |
Chargeback reversal behavior for consumable products
| Consumable Type | Consumed | eventStatus | Impact to the user's entitlement of the consumable | Recommended actions for developer services |
|---|---|---|---|---|
Store-managed |
No | ChargebackReversal |
Qty from chargeback is restored to the user's Qty because it was not consumed before the chargeback event. Ex: Qty = 0 before reversal, Qty = 1 after reversal. | Qty should be seen and consumed as normal by your normal query flow. Search your completed transactions database for matching OrderID, LineItemID, and ProductID. If a match is not found, or the record does not indicate it went through a Chargeback, do nothing. |
Store-managed |
Yes | ChargebackReversal |
Qty from chargeback is not restored to the user's Qty because it was previously consumed before the chargeback event. Ex: Qty = 0 before reversal, Qty = 0 after reversal. | Search your completed transactions database for matching OrderID, LineItemID, and ProductID. If a match is found and it was recorded as being a Chargeback in your system, reverse the Chargeback action taken to the user's balance previously. Then update the tracking entry to note the Chargeback was reversed. |
Dev-managed |
No | ChargebackReversal |
Qty from chargeback is restored to the user's Qty because it was not consumed before the chargeback event. But Qty will never show greater than 1, see note below. | See note below. |
Dev-managed |
Yes | ChargebackReversal |
Qty from chargeback is restored to the user's Qty even though it was already consumed. See note below. | See note below. |
Note
Dev-Managed consumables behave uniquely with chargeback reversals and require additional logic to handle these events. See below for details.
Unique behavior of dev-managed consumables during chargeback reversal
Regardless if the dev-managed consumable was consumed or not before the chargeback event, if there is a chargeback reversal the consumable quantity from the purchase will be added back to the user's account balance. However, Developer-managed consumables will never report a quantity greater than 1 even if there are multiple valid entitlements to the dev-managed consumable. This is because Developer-managed consumables are intended to block users from purchasing the consumable again until it has been reported as consumed/fulfilled by the game service. In the case of a chargeback reversal when there is already a non-zero balance on the user's account, the multiple entitlements are still valid and can be individually consumed as normal. Just note that the user's balance will remain as '1' after each consume request until all of the active entitlements have been consumed / fulfilled. Therefore, your system should go through the consume flow as normal until the user's balance for the Developer-managed consumable reports as '0'.
When consuming, if you see a record matching the same OrderID, LineItemID, and ProductID, check if it is marked as going through a chargeback reconciliation. If it was marked as reconciled from a chargeback, reverse the action taken on the user's account balance and mark the item as a chargeback reversal.
Example: Qty = 1 before reversal, Qty = 1 after reversal but there are actually 2 active entitlements. Service consumes 1 of the consumable, user's quantity will still be '1' after the consume. Service consumes 1 more of the consume, user's quantity now reports as '0'.
Bundle refund considerations for consumables
When consumables are included in a refunded bundle, you will receive separate Clawback events for:
- The bundle itself - This event represents the bundle product that was refunded
- Each consumable included in the bundle - Individual events for each consumable product that was granted as part of the bundle
When reconciling bundle-related consumable refunds:
- Track bundle relationships: Consider maintaining records of which consumables were granted as part of bundle purchases vs individual purchases
- Coordinate reconciliation: Ensure that both the bundle refund and individual consumable refunds are properly handled without double-processing
- User communication: When notifying users about revoked content, consider mentioning that the action is related to a bundle refund to provide better context
The OrderIDs for consumable events from bundle refunds will match the bundle's original purchase OrderID, allowing you to correlate these events together.
Reconciling Store-managed subscription Clawback events
When a Clawback event for a store-managed subscription is detected, additional information related to the subscription is added to the Clawback event through the ClawbackEventSubscriptionData structure. Specifically, if the user was issued a full or partial amount of their payment for the corresponding subscription interval. If your subscription grants monthly in-game rewards or currency to the user’s account, you may want to revoke those rewards depending on how many days payment was returned vs retained.
[NOTE!] The development team and publisher are free to determine the proper course of action on a user’s account when a store-managed subscription Clawback event is received. If action is taken to revoke any items or benefits, it is recommended to notify the user of the reconciliation actions taken, reason why, and logging the information in your service to avoid further Customer Support calls or disputes. Example: “Due to a return issued to your account through Microsoft we have adjusted your [subscription product] benefits.”
Requirements for managing Clawback events for Store-managed subscription
For subscription products, the OrderID associated with the clawback event may change with each renewal transaction of the subscription. Additionally, the LineItemIds for subscriptions are not exposed in the Collections or Recurrence APIs. Therefore, the best way to track and identify the subscription from the Recurrence APIs to related clawback events is through the RecurrenceID value. We recommend using this as the lookup / unique Id for the subscription that you are associating with the user in your tracking database.
Clawback event behavior for Store-managed subscriptions
| eventStatus | Scenario | Recommended actions for developer services |
|---|---|---|
| Revoked | Subscription interval includes days that have already been used, the subscription entitlements have been removed from the user’s account. | Verify if return is partial or full. Take appropriate action to revoke entitlements that have not been paid for, or grant partial value based on how much of a partial payment was retained. |
| Return | Upcoming subscription interval that has not yet been used / started was removed from the user’s account. | No action, interval was not started. |
| Refund | Currently active subscription interval’s payment has been sent back to the user. | No revocation action, user is allowed to keep the entitlement, but log the event and any linked user information to watch for repeated patterns. Follow normal status and logic using the Recurrence services. See Managing subscription products from your service. |
| ChargebackReversal | Subscription interval from a previous Revoked state was restored to the user’s account. | Reverse any action taken when the item was reconciled as revoked. Follow normal status and logic of the subscription state as reported by the Recurrence services. See Managing subscription products from your service. |
Example ClawbackEventSubscriptionData for full and partial returns
Scenario: Monthly subscription, user was issued a pro-rated (partial) return on Jul 6, 2023. User was given back the price of 25 unused days, Microsoft retained the remaining price for 6 days that were used.
"subscriptionData": {
"recurrenceId": "mdr:0:ae5cad80acf2428fa64c38529996a3fd:df3763c2-36f8-4bde-8fa5-a29fb6058d62",
"durationIntervalStart": "2023-07-01T00:00:00+00:00",
"durationInDays": 31,
"consumedDurationInDays": 6,
"refundType": "Partial"
}
Scenario: Monthly subscription, user was issued a full return on Jul 6, 2023. User was given back the full price paid for the month subscription, Microsoft did not retain any payment.
"subscriptionData": {
"recurrenceId": "mdr:0:0dc7194514404dd3bf0f678e21716774:23a454d5-f240-4dad-9923-9c3f53f515cc",
"durationIntervalStart": "2023-07-01T00:00:00+00:00",
"durationInDays": 31,
"consumedDurationInDays": 6,
"refundType": "Full"
}
Scenario: Yearly subscription, user was issued a pro-rated (partial) return on Jan 15, 2024. User was given back the price of 199 unused days, Microsoft retained the remaining price for 168 days that were used.
"subscriptionData": {
"recurrenceId": "mdr:0:9ed0a48236404b78a017e9e226da94c6:22aa4f3c-1ffc-4dd3-8801-cb2a227a5c46",
"durationIntervalStart": "2023-07-31T00:00:00+00:00",
"durationInDays": 367,
"consumedDurationInDays": 168,
"refundType": "Partial"
}
[NOTE!] The above example’s yearly subscription durationInDays is 367 rather than 365. One day is added due to 2024 being a leap-year, the other is added to move the user’s renewal date to the 1st of the next month in order to avoid issues with some months not having a 29th, 30th, or 31st. For more information see Understanding subscription start, renew, and expire dates.
In the latter example, payment for the time prior to the Clawback event was retained. If the subscription granted monthly rewards or in-game items, the recommendation is to ensure the user keeps the items granted to them for that time period.
Reconciling Durable and Game product Clawback events
When a Clawback event is received for a durable or game product (including bundles), your reconciliation approach may be different than a consumable. If your client is using the appropriate XStore licensing APIs the client should act appropriately as the user no longer has a valid license. However, in some cases your title or services may be granting tracked rewards or benefits added to their account from the durable purchase. In this case, it would be similar to a consumable where the granted reward tracked in your service would need to be revoked from the user's account.
OrderIds and LineItemIds for Durable and Game products
When a Game or Durable product is purchased, it will generate an OrderId and LineItemId as any other product purchase. However, these product types' LineItemIds are not exposed within the existing Collections service query APIs. If your service will be tracking the ownership of and matching Clawback events for a Game or Durable, use the OrderID combined with the ProductID of the Game or Durable as a unique identifier.
Clawback event states for Durable and Game products
| eventStatus | Impact to user entitlement | Recommended actions |
|---|---|---|
Returned |
Entitlement and license(s) removed from user's account | Implement your own revocation logic for the specific content or features based on this product (if required) |
Revoked |
Entitlement and license(s) removed from user's account | Implement your own revocation logic for the specific content or features based on this product (if required) |
Refunded |
User keeps the entitlement | No revocation action, but log the event and monitor for patterns of abuse |
ChargebackReversal |
Previously revoked entitlement restored | Restore any content or features that were previously revoked due to chargeback |
It is recommended to notify users of any reconciliation actions taken, provide clear reasons, and log all actions in your service to help resolve potential Customer Support inquiries.
Clawback events for bundles
When a bundle is refunded, the following Clawback events will be generated and written to the Clawback queue(s) associated with the bundle product itself. If the included products in the bundle are associated with different Entra client Ids, these events will not be written to those queues. Therefore, ensure your bundle product is linked to the Entra client Id(s) of the queue(s) you expect to receive these events in.
- Bundle: The bundle itself will generate a Clawback event based on its product type (Game bundle or Durable bundle) and if the partner's Clawback queue is configured for the associated product type(s)
- All included consumables: Each consumable product included in the bundle will generate separate Clawback events
- Other included products: Durable and Game products included in bundles may also generate events if those product types are enabled for your Clawback queue, depending on how they were configured within the bundle at the time of purchase
Required configuration for bundle events
To receive Clawback events for a bundle and its included products, you must ensure your Entra client Id(s) are properly associated with the bundle product in Partner Center:
Add-on & Season Pass Bundles:
- Navigate to the Product collections and purchases page of the base Game that the bundle is configured under
- Ensure the correct Entra client Ids are associated with the bundle
- Save and republish the product to your sandbox(es) and RETAIL
Game Bundles:
- Navigate to the Product collections and purchases page for the Game bundle product
- Ensure the correct Entra client Ids are associated with the bundle
- Save and republish the product to your sandbox(es) and RETAIL
Important
Bundle products must be republished after updating Entra client Id(s) for the changes to take effect and clawback events to be written to your queue.
OrderIds and LineItemIds for bundles and their included products
When a bundle is purchased, it will generate an OrderID and LineItemId as any other product purchase does. These same values are then inherited by all included products granted within the bundle. Therefore, for consumables within a bundle, they will all share the same OrderID and LineItemId, and those values will be reflected in both the consume API results and the Clawback events for those included consumables.
Similar to Durables and Games, the bundle's LineItemId is not exposed within the existing Collections service query APIs. If your service will be tracking the ownership of and matching Clawback events for the bundle, use the OrderID combined with the ProductID of the bundle as a unique identifier.
Testing product returns within your development sandbox
Development accounts for sandboxes do not have access to the automated product return request tool on support.xbox.com. Therefore, to test the return scenarios and your Clawback implementation you will need to request a return for test purchases with the help of your Microsoft Developer Account manager or Microsoft contact by doing the following:
- Verify that the test products are set with non-zero prices ($0.01 is sufficient).
- Login to the development sandbox with your test account(s).
- Purchase the product(s) on the test account(s).
- For consumable products: Fulfill / consume the purchased items using the
includeOrderIds: trueoption on the consume request. For other product types: Ensure the products have been granted to the user's account. - Note the OrderIDs from the purchase (available through the query API as the TransactionID, or consume responses for consumables).
- Send an email to your Microsoft Developer Partner Manager or Microsoft contact to request a product return for the product(s). The email must include the following information in the following template example:
| Request Type | OrderID | OrderLineItemId | Test Account (Email) | Name of item purchased | Date of Purchase | Request Summary, additional info |
|---|---|---|---|---|---|---|
| Return | 8060a406-85c8-4d01-a105-ff11725499c9 | cb054aa0-7392-4cc6-af06-53b285e39259 | XDKS-RefundTest0001@xboxtest.com |
Test Consumable Pack | 2025-08-30T21:53:08.2565331+00:00 | Clawback testing of consumable item |
| Return | 9070b507-96d9-5e02-b206-gg22836500a0 | dc165bb1-8493-5dd7-bg07-64c396f40360 | XDKS-RefundTest0001@xboxtest.com |
Test DLC Pack | 2025-08-30T22:15:22.1234567+00:00 | Clawback testing of durable item |
| Return | a180c608-a7ea-6f03-c317-hh33947611b1 | ed276cc2-9504-6ee8-ch08-75d407g51471 | XDKS-RefundTest0001@xboxtest.com |
Test Season Pass Bundle | 2025-08-30T23:45:33.9876543+00:00 | Clawback testing of bundle with included consumables |
NOTE: Make sure your request is listed as a 'return' and not a 'refund'. The tools used for 'refunds' will refund the payment but keep the entitlement on the user's account. A 'return' in the tools will cause the entitlement to be revoked and cause Clawback event messages to be written to the queue.
NOTE: When testing bundle refunds, you will receive multiple Clawback events - one for the bundle itself and additional events for any consumables (and possibly other products) included in the bundle. Ensure your Entra client Id is properly associated with the bundle product in Partner Center and that the bundle has been republished for the included product events to be generated.
A representative from the Xbox support team will reply to confirm the request has been processed within 3 business days. You should then be able to see the correct Clawback information in your queries. If authorized by your Developer Partner Manager, they may provide you the Xbox Support team's email address for making future requests directly. Do not share this alias broadly within your organization and please remember to CC your Developer Partner Manager on any future direct requests.
NOTE: Returns and refunds will only cause Clawback events with non-zero priced products. Therefore, your products need to have a price of at least $0.01. This is now enabled as all newly created test accounts will have a test payment instrument added to them where they can make test purchases within a sandbox. If you are using an older account that does not have a test payment instrument, create a new account to be able to do this flow.
Troubleshooting Common Issues
Queue Access Problems
- Symptom: Cannot access queue with SAS token
- Solutions:
- Verify Entra client ID is correctly associated with products in Partner Center
- Check SAS token hasn't expired (request new one)
- Ensure correct Azure Storage Queue URI format
Missing Clawback Events
- Symptom: Expected events not appearing in queue
- Solutions:
- Confirm product type is enabled for your queue (contact Developer Partner Manager)
- Verify products are republished after Entra client Id association
- Check that test products have non-zero prices ($0.01 minimum)
Duplicate Event Processing
- Symptom: Same event processed multiple times
- Solutions:
- Implement idempotency using
idfield from Clawback event - Track processed message Ids to prevent reprocessing
- Use proper Get/Delete workflow (not just Peek)
- Implement idempotency using
Reconciliation Issues
- Symptom: Cannot match events to transactions
- Solutions:
- Ensure consume tracking database includes OrderID, LineItemID, ProductID
- Verify
includeOrderIds: trueis used in consume requests - For subscriptions, use RecurrenceID instead of OrderId for matching
Bundle Event Confusion
- Symptom: Unexpected number of events for bundle refunds
- Solutions:
- Expect multiple events: one for bundle + one per included consumable
- Check that bundle product has correct Entra client Id association
- Verify bundle was republished after configuration changes
See also
Managing consumable products from your service