/complete-app-store-purchase [POST]

Given an in_app_purchase_token and a set of tokens identifying pre-purchase information, attempt to exchange the in_app_purchase_token for a membership.

Only one pre-purchase token can be successully completed.

Only the 10 most recently created pre-purchase tokens will be attempted.

Parameters

The post body is expected to be a json document like:

{
 "in_app_purchase_token" : "..."
 "saved_uuids" : ["..."]
}
  • in_app_purchase_token (string) - the app store token
  • saved_uuids ([string]) - a list of tokens previously returned from /capture-app-store-pre-purchase-information

Response Messages

200 OK - success

The response body will be a JSON structure:

{	
 "data" : [[pre-purchase-token result-code]]
}

The length of the contents under the data key will be no longer than 10 and may be as short as 0. Each pre-purchase-token is a string, one of the values passed in as saved_uuids. Each result-code is a string code that indicates the status of attempting to complete that pre-purchase.

The codes are as follows:

  • 90000 - success, check member’s platinum status
  • 90001 - duplicate sucess, check member’s platinum status
  • 90100 - general failure
  • 90101 - bad token
  • 90102 - duplicate failure, check member’s platinum status
  • 90104 - unable to exchange token, check member’s platinum status
  • 90105 - unexpected error
  • 90106 - package mismatch
  • 90107 - missing result code
  • 90108 - internal communication timeout
  • 90109 - getting subscription info from google returned a http 100
  • 90110 - getting subscription info from google returned a http 200
  • 90111 - getting subscription info from google returned a http 300
  • 90112 - getting subscription info from google returned a http 400
  • 90113 - getting subscription info from google returned a http 500
  • 90114 - getting subscription info from google resulted in something completely unexpected
  • 90115 - apple specific general failure
  • 90116 - apple specific general failure
  • 90117 - apple specific general failure
  • 90118 - apple specific general failure