Since this is the first google result when searching for "The subscription 
purchase token does not match the subscription ID." error, I'll post my 
solution here:

Make sure you are passing the subscription ID, AKA SKU as the second 
parameter, and not the Order ID.
Secondly, make sure that for subscriptions you're calling the subscriptions 
endpoint and not the purchases endpoint.

Hope this helps.

On Tuesday, August 23, 2016 at 1:27:21 PM UTC+4, 2date Dating App wrote:
>
> I verify a subscription one month ago, it return a valid result with 
> expiry time and other information. 
>
> https://www.googleapis.com/androidpublisher/v2/applications/com.xxx.app/purchases/subscriptions/com.xxx.app.vip.1mth_sub/tokens/jhfmblfobojihoeicdahgble.AO-J1OzWtjNuPWXpOI56OrzzumU8C2pKS9s71vBWptjomo-m0bCIErB7O_-JWcTlc3s3gudmLNvbqSBtTD3_Yr9yUxNNaOwArzrQcVrvpO6cFXrcunUj-XPNXkEElW3zm3wjNO_CLzhD
>
> This is one month subscription, Now i call it again with same purchase 
> token, it return 400 Bad Request
> {
>   "error": {
>     "errors": [
>       {
>         "domain": "global",
>         "reason": "invalid",
>         "message": "Invalid Value"
>       }
>     ],
>     "code": 400,
>     "message": "Invalid Value"
>   }
> }
>
> When the product id changed, It will be return:
>
> https://www.googleapis.com/androidpublisher/v2/applications/com.xxx.app/purchases/subscriptions/
> com.xxx.app.vip.1mth_sub01
> /tokens/jhfmblfobojihoeicdahgble.AO-J1OzWtjNuPWXpOI56OrzzumU8C2pKS9s71vBWptjomo-m0bCIErB7O_-JWcTlc3s3gudmLNvbqSBtTD3_Yr9yUxNNaOwArzrQcVrvpO6cFXrcunUj-XPNXkEElW3zm3wjNO_CLzhD
> {
>   "error": {
>     "errors": [
>       {
>         "domain": "androidpublisher",
>         "reason": "purchaseTokenDoesNotMatchSubscriptionId",
>         "message": "The subscription purchase token does not match the 
> subscription ID.",
>         "locationType": "parameter",
>         "location": "token"
>       }
>     ],
>     "code": 400,
>     "message": "The subscription purchase token does not match the 
> subscription ID."
>   }
> }
>
> Why it will be return "Invalid Value" in this case?
> Can anyone solve my problem? Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/66cc394f-85cb-4b2d-812f-866c9ab10e85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to