> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken

> Microsoft Store v8 clawback SAS token endpoint that generates an Azure Storage SAS token for reading your game service's Clawback event message queue.

This endpoint generates an [SAS token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview) to authenticate and access your Clawback event message queue.
For more information on a Clawback event message queue, see [Managing refunds and chargebacks from your service](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-managing-refunds.md).

## Prerequisites

Review [Prerequisites for service-to-service APIs](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-authenticating-service.md).

To use this API, you must go through the onboarding process with the assistance of your Developer Partner Manager or Microsoft contact.
For more information on the onboarding process, see [Required setup / onboarding request](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-managing-refunds.md#required-setup--onboarding-request).

## Request

### Request syntax

| Method | Request URI |
| - | - |
| `GET` | `purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken` |

### Request header

| Header | Type | Description |
| - | - | - |
| `Authorization` | `string` | Required. Your Microsoft Entra ID service access token in the form `Bearer` \<*token*>. See [Creating Microsoft Entra ID access tokens](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-requesting-userstoreid.md#step-3-creating-microsoft-entra-id-access-tokens). |
| `Host` | `string` | Must be set to the value `purchase.mp.microsoft.com`. |

### Request example

```html theme={null}
GET https://purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken HTTP/1.1
Host: purchase.mp.microsoft.com
Authorization: Bearer [Microsoft Entra ID bearer token]
```

## Response

### Response body

The response body is JSON with the following values.

| Parameter | Type | Description | Required |
| - | - | - | - |
| `expiresOn` | `DateTime` | The UTC date and time that the SAS token expires | Yes |
| `uri` | `string` | Combined Storage resource URI and [SAS Token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview) to access the Clawback Message Queue. | Yes |

### Response example

```json theme={null}

HTTP/1.1 200 OK
Date: Thu, 08 Dec 2022 20:13:46 GMT
Content-Length: 243
Content-Type: application/json; charset=utf-8
ms-correlationid: 70e6f659-ceee-4050-bdf3-56ea3beefe23
ms-requestid: 8c80d7ff-73e2-4a5c-9aca-79059fbc1beb
ms-cv: tRscYtHLJHps.0
x-content-type-options: nosniff

{
    "expiresOn":"2022-12-09T02:13Z",
    "uri":"https://uluufeofsxh2k.queue.core.windows.net:443/gxhxcvb32lnk4?sv=2021-10-04&spr=https&st=2022-12-08T20%3A13%3A46Z&se=2022-12-09T02%3A13%3A46Z&sp=rp&sig=OneHfX99E820avICZvXJUF14IyDuv2BrvY0kj%2Ftxc70%3D"
}

```

## Using the SAS token to access the Clawback event message queue

Once you have the `uri` parameter, you can access queue messages.
For more information, see [Processing Clawback messages from the queue](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-managing-refunds.md#processing-clawback-messages-from-the-queue).

## Related articles

[Managing refunds and chargebacks from your service](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-managing-refunds.md)

[Managing consumable products from your service](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-managing-consumables.md)

[Manage products from your services](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-authenticating-service.md)

[Authenticating your service with the Microsoft Store APIs](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-authenticating-service.md)

[Azure Queue Storage REST APIs](https://learn.microsoft.com/rest/api/storageservices/queue-service-rest-api)

[Azure Queue Storage using .NET](https://learn.microsoft.com/azure/storage/queues/storage-dotnet-how-to-use-queues?tabs=dotnet)


## Related topics

- [Microsoft Store Service APIs (contents)](https://devdocs.xbox.com/reference/microsoft-store-apis/xstore-nav.md)
- [Managing consumable products from your service](https://devdocs.xbox.com/publishing/xstore-commerce/xstore-managing-consumables.md)
- [purchase.mp.microsoft.com/v8.0/b2b/orders/query](https://devdocs.xbox.com/reference/microsoft-store-apis/xstore-v8-clawbackv1.md)
- [purchase.mp.microsoft.com/v8.0/b2b/recurrences/query](https://devdocs.xbox.com/reference/microsoft-store-apis/xstore-v8-recurrence-query.md)
- [purchase.mp.microsoft.com/v8.0/b2b/recurrences/{recurrenceId}/change](https://devdocs.xbox.com/reference/microsoft-store-apis/xstore-v8-recurrence-change.md)
