You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Digital Goods API is currently available for testing in Microsoft Edge. To test the API, use either of the following ways:
43
-
* To test your code locally: [Use a supported preview channel of Microsoft Edge on your dev machine](#use-a-supported-preview-channel-of-microsoft-edge-on-your-dev-machine).
44
-
* To test your code in your Microsoft Store PWA: [Register for the origin trial, then use your token at your website](#register-for-the-origin-trial-then-use-your-token-at-your-website).
45
-
46
-
Details are below.
47
-
48
-
49
-
<!-- ------------------------------ -->
50
-
#### Use a supported preview channel of Microsoft Edge on your dev machine
51
-
52
-
To test the Digital Goods API locally, before deploying your app to production, run Edge Dev or Edge Canary. These preview versions of Edge have the API enabled, as part of a running experiment.
53
-
54
-
To download a preview channel of Microsoft Edge (Beta, Dev, or Canary), go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider).
55
-
56
-
57
-
<!-- ------------------------------ -->
58
-
#### Register for the origin trial, then use your token at your website
59
-
60
-
To test the Digital Goods API in production, with your users, use an origin trial token. With this approach, when your users download your PWA from the Microsoft Store, they will have the API enabled.
61
-
62
-
See:
63
-
*[Use origin trials in Microsoft Edge](../../origin-trials/index.md)
64
-
*[Digital Goods API](https://developer.microsoft.com/microsoft-edge/origin-trials/trials/4b4a9ead-d912-4349-87b3-25e5e50b4f13) at _Origin Trials_.
42
+
The Digital Goods API is currently available for all channels in Microsoft Edge. To test the API, make sure your Edge version is `134.0.3124.51` or higher.
## Checking whether the Digital Goods API is available
69
47
70
-
To detect whether you've correctly enabled the API on your website by using your origin trial token, check whether the `getDigitalGoodsService` method exists on the `window` object:
48
+
To detect whether you have access to the API on your website, check whether the `getDigitalGoodsService` method exists on the `window` object:
71
49
72
50
```javascript
73
51
if ('getDigitalGoodsService'inwindow) {
@@ -119,7 +97,7 @@ See also:
119
97
120
98
Use the `getDetails` method of the `DigitalGoodsService` interface to query item details.
121
99
122
-
After connecting the Digital Goods service to Microsoft Store, you can use the API to access product and purchase information. The `getDetails` method lets you get information about the items you’ve set up in the Partner Center. Display information such as the product title, description, and price in your app UI, so the user knows what's available for purchase.
100
+
After connecting the Digital Goods service to Microsoft Store, you can use the API to access product and purchase information. The `getDetails` method lets you get information about the items you've set up in the Partner Center. Display information such as the product title, description, and price in your app UI, so the user knows what's available for purchase.
123
101
124
102
The `getDetails` method takes a list of item IDs, which correspond to the product IDs of the in-app products and subscriptions you created in the Partner Center.
125
103
@@ -269,10 +247,6 @@ See also:
269
247
## See also
270
248
<!-- all links in article: -->
271
249
272
-
Origin trials:
273
-
*[Use origin trials in Microsoft Edge](../../origin-trials/index.md)
274
-
*[Digital Goods API](https://developer.microsoft.com/microsoft-edge/origin-trials/trials/4b4a9ead-d912-4349-87b3-25e5e50b4f13) at _Origin Trials_.
275
-
276
250
GitHub:
277
251
*[Digital Goods API For Microsoft Store PWA Explainer](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PwaDigitalGoods/explainer.md)
278
252
*[Digital Goods API specification](https://wicg.github.io/digital-goods/)
0 commit comments