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 Payment Request API handles the actual payment transaction when a purchase is made by user. The Payment Request API uses the item details that the Digital Goods API provides, to make the in-app purchase by using whichever billing payment method the user has set up at the Microsoft Store.
33
+
The Payment Request API handles the actual payment transaction when a purchase is made by a user. The Payment Request API uses the item details that the Digital Goods API provides, to make the in-app purchase by using whichever billing payment method the user has set up at the Microsoft Store.
34
34
35
-
See [Payment Request API](https://www.w3.org/TR/payment-request/) at W3C.
35
+
See [Payment Request API](https://developer.mozilla.org/docs/Web/API/Payment_Request_API) at MDN.
// Our preferred service provider is not available.
73
-
// Use a normal web-based payment flow.
73
+
// Use a web-based payment flow instead.
74
74
return;
75
75
}
76
76
```
@@ -86,19 +86,22 @@ After connecting the Digital Goods service to Microsoft Store, you can use the A
86
86
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.
The returned `itemDetails` sequence may be in any order, and might not include an item if the item doesn't exist on the server (that is, if there's not a 1:1 correspondence between the input list and output list).
100
103
101
-
The item ID is a string that represents the primary key of the items. As in Microsoft Store, the item ID is `InAppOfferToken`. There is no function to get a list of item IDs; item IDs should be hardcoded in the client code or fetched from your own server (the developer's server).
104
+
The item ID is a string that represents the primary key of the items. In the Microsoft Store, the item ID is `InAppOfferToken`. There is no function to get a list of item IDs; item IDs should be hardcoded in the client code or fetched from your own server (the developer's server).
102
105
103
106
The item's `price` is a `PaymentCurrencyAmount` that contains the current price of the item in the user's current region and currency. The `price` is designed to be formatted for the user's current locale by using `Intl.NumberFormat`, as shown above.
Use the `show` method to purchase an item, after you construct a request that contains item details.
117
+
Use the `show` method to purchase an item, after you construct a request that contains the item details.
115
118
116
119
Once your products and details are displayed to the user, you can implement the purchase flow by using the Payment Request API. When combined with the Digital Goods API, the only required input parameter is `methodData`.
117
120
@@ -120,11 +123,13 @@ Use the `supportedMethods` member of the `methodData` parameter in the `Pa
Then call the `show` method to start the payment flow:
@@ -176,9 +181,11 @@ Use the `listPurchases` method to check existing purchases. This method returns
176
181
The `listPurchases` method returns item IDs and purchase tokens. Before you grant an entitlement, you should verify the returned item ID or the returned purchase token, by using a direct developer-to-provider API, as shown below:
@@ -191,9 +198,11 @@ The `listPurchases` method doesn't return consumed products or expired subscript
191
198
Use the `listPurchaseHistory` method to get the purchase history. This method returns a list that shows the most recent purchase made by the user for each item, regardless of whether the purchase is expired, canceled, or consumed. This method returns a list of `PurchaseDetails` containing the `itemId` and `purchaseToken` for each purchase.
0 commit comments