acknowledgePurchase API

This document focuses on the acknowledgePurchase API used for server-side subscription purchase acknowledgement.

After you have verified the purchase, you should acknowledge it.

Sample acknowledgePurchase Code

The following sample code illustrates the associated request using the acknowledgePurchase API.

import requests

  url = "https://cloud-api.bluestacks.cn/v2/seller/order/acknowledgepurchase"

  payload = 'purchaseToken=nowgg-_purchase_token'
  headers = {
    'Authorization': 'payment_api_key_here',
    'Content-Type': 'application/x-www-form-urlencoded'
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)

Important Information

Expected Response

The following is a sample response from the acknowledgePurchase API.

{  
   "success": true,
   "code": 0,
   "codeMsg": "success",
   "data": {}
 }

Response Params

Params Type Description
success boolean Returns success as true or false.
code int Returns 0 for success and non-zero for failure.
codeMsg string Returns msg related to error code.
data object Data returned as a response.

Error Code Mapping

Error Code Message Description
5001 NO_VALID_SUBSCRIPTION_FOUND No valid subscriptions found.
5002 INVALID_SUBSCRIPTION_OPERATION The subscription operation is not valid.
5004 SUBSCRIPTION_INACTIVE The request subscription is inactive.
5006 ACTIVE_SUBSCRIPTION_ALREADY_EXISTS An active subscription already exists.
×
Text copied to clipboard
Link copied to clipbord
Questions? Please reach out to us at dev-support@now.gg