API reference
API reference
Select your platform
No SDKs available
No versions available

OVR_Requests_IAP.h File

Functions

Allow the consumable IAP product to be purchased again. Conceptually, this indicates that the item was used or consumed. Important: Make sure to pass the correct SKU of the purchase that will be consumed. This value is case- sensitive and should match exactly with the product SKU set in the Developer Dashboard.
Parameters
sku
The SKU of the product of the purchase that will be consumed. This value is case-sensitive and should match exactly with the product SKU set in the Developer Dashboard.
A message with type ovrMessage_IAP_ConsumePurchase will be generated in response.First call ovr_Message_IsError() to check if an error occurred.This response has no payload. If no error occurred, the request was successful. Yay!
Get the next page of entriesA message with type ovrMessage_IAP_GetNextProductArrayPage will be generated in response.First call ovr_Message_IsError() to check if an error occurred.If no error occurred, the message will contain a payload of type ovrProductArrayHandle. Extract the payload from the message handle with ovr_Message_GetProductArray().
Get the next page of entriesA message with type ovrMessage_IAP_GetNextPurchaseArrayPage will be generated in response.First call ovr_Message_IsError() to check if an error occurred.If no error occurred, the message will contain a payload of type ovrPurchaseArrayHandle. Extract the payload from the message handle with ovr_Message_GetPurchaseArray().
Retrieve a list of IAP products that can be purchased. Note: You must provide a list of SKUs (Stock Keeping Units) to retrieve the corresponding product information. The SKUs are used to identify the products in the Oculus store, which can be retrieved by accessing the Developer Dashboard or by ovr_Purchase_GetSKU().
Parameters
skus
An array of SKUs of the products to retrieve. Each SKU should be a string value that matches exactly with the product SKU set in the Oculus Developer Dashboard.
count
The number of items you provided in the SKUs array. This parameter is used to validate the input and ensure that the correct number of products is returned.
A message with type ovrMessage_IAP_GetProductsBySKU will be generated in response.First call ovr_Message_IsError() to check if an error occurred.If no error occurred, the message will contain a payload of type ovrProductArrayHandle. Extract the payload from the message handle with ovr_Message_GetProductArray().
Retrieve a list of Purchase that the Logged-In-User has made. This list will also contain consumable purchases that have not been consumed. Note: This method returns all purchases, including consumable and non-consumable ones. If you only want to retrieve durable purchases, use get_viewer_purchases_durable_cache instead.A message with type ovrMessage_IAP_GetViewerPurchases will be generated in response.First call ovr_Message_IsError() to check if an error occurred.If no error occurred, the message will contain a payload of type ovrPurchaseArrayHandle. Extract the payload from the message handle with ovr_Message_GetPurchaseArray().
Retrieve a list of Purchase that the Logged-In-User has made. This list will only contain durable purchase (non-consumable) and is populated from a device cache. Important: It is recommended to use ovr_IAP_GetViewerPurchases() first and only check the cache if that fails. This method is intended as a fallback mechanism and may not always return up-to-date results.A message with type ovrMessage_IAP_GetViewerPurchasesDurableCache will be generated in response.First call ovr_Message_IsError() to check if an error occurred.If no error occurred, the message will contain a payload of type ovrPurchaseArrayHandle. Extract the payload from the message handle with ovr_Message_GetPurchaseArray().
Launch the checkout flow to purchase the existing product. Oculus Home tries handle and fix as many errors as possible. Home returns the appropriate error message and how to resolve it, if possible. Returns a purchase on success, and an error on user cancellation or other errors.In the case of a user cancelation, the ovr_Error_GetMessage() value will contain a JSON object with a "category" property containing a value of "user_canceled".
Parameters
sku
IAP sku for the item the user wishes to purchase.
A message with type ovrMessage_IAP_LaunchCheckoutFlow will be generated in response.First call ovr_Message_IsError() to check if an error occurred.If no error occurred, the message will contain a payload of type ovrPurchaseHandle. Extract the payload from the message handle with ovr_Message_GetPurchase().
Did you find this page helpful?
Thumbs up icon
Thumbs down icon