{"id":137992,"date":"2022-12-15T00:00:00","date_gmt":"2022-12-15T00:00:00","guid":{"rendered":"https:\/\/adapty.io\/jp-android-in-app-purchases-part-5-server-side-purchase-validation\/"},"modified":"2022-12-15T00:00:00","modified_gmt":"2022-12-15T00:00:00","slug":"android-in-app-purchases-part-5-server-side-purchase-validation","status":"publish","type":"post","link":"https:\/\/adapty.io\/ja\/blog\/android-in-app-purchases-part-5-server-side-purchase-validation\/","title":{"rendered":"Android\u30a2\u30d7\u30ea\u5185\u8cfc\u5165\u3001\u30d1\u30fc\u30c8 5: \u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u3067\u306e\u8cfc\u5165\u306e\u691c\u8a3c"},"content":{"rendered":"\n
\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9 (server-side) \u306e\u691c\u8a3c\u306f\u3001\u8cfc\u5165\u306e\u4fe1\u983c\u6027\u3092\u691c\u8a3c\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u30c7\u30d0\u30a4\u30b9\u306fGoogle\u30b5\u30fc\u30d0\u30fc\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3001\u8cfc\u5165\u304c\u5b9f\u969b\u306b\u884c\u308f\u308c\u305f\u304b\u3069\u3046\u304b\u3001\u304a\u3088\u3073\u8cfc\u5165\u304c\u6709\u52b9\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n
\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001Android\u30a2\u30d7\u30ea\u306e\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u691c\u8a3c\u3092\u69cb\u6210\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n
\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u691c\u8a3c\u306f\u5fc5\u9808\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002\u691c\u8a3c\u3057\u306a\u304f\u3066\u3082\u30a2\u30d7\u30ea\u5185\u8cfc\u5165\u3092\u5b8c\u4e86\u3067\u304d\u307e\u3059\u304c\u3001\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n
1. \u9ad8\u5ea6\u306a\u652f\u6255\u3044\u5206\u6790<\/strong>\uff1a\u6709\u52b9\u5316\u5f8c\u306b\u767a\u751f\u3059\u308b\u3059\u3079\u3066\u306e\u3053\u3068\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u306a\u3044\u305f\u3081\u3001\u5b9a\u671f\u8cfc\u5165 (subscription) \u306b\u304a\u3044\u3066\u7279\u306b\u91cd\u8981\u3067\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u8cfc\u5165\u51e6\u7406\u304c\u306a\u3044\u305f\u3081\u3001\u73fe\u5728\u306e\u5b9a\u671f\u8cfc\u5165\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u5b9a\u671f\u8cfc\u5165\u3092\u66f4\u65b0\u3057\u305f\u308a\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u305f\u308a\u3057\u305f\u304b\u3069\u3046\u304b\u3001\u652f\u6255\u3044\u306e\u554f\u984c\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u306a\u3069\u3092\u628a\u63e1\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n 2. \u8cfc\u5165\u306e\u4fe1\u983c\u6027\u3092\u78ba\u8a8d\u3067\u304d\u308b<\/strong>\uff1a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u4e0d\u6b63\u3067\u306f\u306a\u304f\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u5b9f\u969b\u306b\u30a2\u30a4\u30c6\u30e0\u306e\u4ee3\u91d1\u3092\u652f\u6255\u3063\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059.<\/p>\n\n\n\n 3.\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u5b9a\u671f\u8cfc\u5165<\/strong>\uff1a\u30e6\u30fc\u30b6\u30fc\u306e\u5b9a\u671f\u8cfc\u5165\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u78ba\u8a8d\u3067\u304d\u308c\u3070\u3001\u4ed6\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u540c\u671f\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001iOS\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u5b9a\u671f\u8cfc\u5165\u3092\u8cfc\u5165\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306f\u3001Android\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3001\u304a\u3088\u3073\u305d\u306e\u4ed6\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n 4. \u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u304b\u3089\u30b3\u30f3\u30c6\u30f3\u30c4\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u5fa1\u3067\u304d\u308b<\/strong>\u305f\u3081\u3001\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3001\u5b9a\u671f\u8cfc\u5165\u305b\u305a\u306b\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u4fdd\u8b77\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n \u7d4c\u9a13\u4e0a\u3001\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u8cfc\u5165\u51e6\u7406\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u6700\u521d\u306e\u30e1\u30ea\u30c3\u30c8\u3060\u3051\u3067\u5341\u5206\u3067\u3059\u3002<\/p>\n\n\n\n\n\n \u3053\u306e\u65b9\u6cd5\u3092\u901a\u3057\u3066\u3001Android\u306e\u652f\u6255\u3044\u306e\u691c\u8a3c\u306b\u3064\u3044\u3066\u306e\u8981\u7d04\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n Google Play Developer API\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u7f72\u540d\u3059\u308b\u305f\u3081\u306e\u30ad\u30fc\u3092\u751f\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001Google Play Console\u30a2\u30ab\u30a6\u30f3\u30c8 (\u30a2\u30d7\u30ea\u3092\u7ba1\u7406\u3059\u308b\u5834\u6240) \u3092 Google Cloud \u30a2\u30ab\u30a6\u30f3\u30c8 (\u30ea\u30af\u30a8\u30b9\u30c8\u7f72\u540d\u7528\u306e\u30ad\u30fc\u3092\u751f\u6210\u3059\u308b\u5834\u6240) \u306b\u30ea\u30f3\u30af\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3059\u3079\u3066\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u8cfc\u5165\u7ba1\u7406\u6a29\u9650\u3092\u4ed8\u4e0e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u306b\u3064\u3044\u3066\u306f\u3001\u5c02\u7528\u306e\u8a18\u4e8b\u3067\u8aac\u660e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5e78\u3044\u306b\u3082\u3001Adapty\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u306b\u3042\u308b\u624b\u9806\u3054\u3068\u306e\u30ac\u30a4\u30c9\u3067\u65e2\u306b\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n \u901a\u5e38\u3001\u30ad\u30fc\u3092\u751f\u6210\u3057\u3066\u304b\u3089\u6a5f\u80fd\u3092\u5229\u7528\u958b\u59cb\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u300124\u6642\u9593\u4ee5\u4e0a\u304b\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u56de\u907f\u3059\u308b\u306b\u306f\u3001\u30a2\u30d7\u30ea\u5185\u30a2\u30a4\u30c6\u30e0\u307e\u305f\u306f\u5b9a\u671f\u8cfc\u5165\u306e\u8aac\u660e\u3092\u66f4\u65b0\u3059\u308b\u3060\u3051\u3067\u3001\u3059\u3050\u306b\u30ad\u30fc\u304c\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n \u516c\u5f0f\u306egoogle-api-python-client<\/a>\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3001Google Play Developer API\u3092\u64cd\u4f5c\u3057\u307e\u3059\u3002\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3001\u4e00\u822c\u7684\u306a\u8a00\u8a9e\u306e\u5927\u90e8\u5206\u3067\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n iOS\u306e\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u691c\u8a3c<\/a>\u3068\u306f\u7570\u306a\u308a\u3001Android\u3067\u306f\u3001\u5b9a\u671f\u8cfc\u5165\u3068\u305d\u306e\u4ed6\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u691c\u8a3c\u306e\u4e21\u65b9\u304c\u3055\u307e\u3056\u307e\u306a\u65b9\u6cd5\u3067\u5b9f\u88c5\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u691c\u8a3c\u3059\u308b\u3068\u304d\u306f\u3001\u30a2\u30a4\u30c6\u30e0\u307e\u305f\u306f\u5b9a\u671f\u8cfc\u5165\u306e\u3044\u305a\u308c\u304b\u3092\u8ca9\u58f2\u3057\u3066\u3044\u308b\u304b\u3092\u628a\u63e1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5b9f\u969b\u306b\u306f\u3001\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u304b\u3089\u3053\u306e\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u306e\u518d\u691c\u8a3c\u304c\u5fc5\u8981\u306a\u5834\u5408\u306b\u5099\u3048\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30d5\u30e9\u30b0\u3092\u4fdd\u6301\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n 2\u3064\u76ee\u306e\u91cd\u8981\u306a\u9055\u3044\u306f\u3001Android\u3067\u306f\u5404\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u72ec\u81ea\u306e\u30c8\u30fc\u30af\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u306e\u306b\u5bfe\u3057\u3001\u3059\u3079\u3066\u306eiOS\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u30a2\u30d7\u30ea\u56fa\u6709\u306e\u5171\u6709\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5c65\u6b74\u5168\u4f53\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u8cfc\u5165\u3092\u3044\u3064\u3067\u3082\u5fa9\u5143\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u5834\u5408\u306f\u3001\u4efb\u610f\u306e1\u3064\u306e\u30c8\u30fc\u30af\u30f3\u3092\u9078\u629e\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u3059\u3079\u3066\u306e\u8cfc\u5165\u30c8\u30fc\u30af\u30f3\u3092\u4fdd\u5b58\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n\n\n\n \u5b9a\u671f\u8cfc\u5165\u3092\u691c\u8a3c\u3059\u308b\u306b\u306f\u3001purchases.subscriptions.get<\/em><\/a>\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u57fa\u672c\u7684\u306b\u3001\u4ee5\u4e0b\u306eGET\u30ea\u30af\u30a8\u30b9\u30c8\u547c\u3073\u51fa\u3057\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n\u652f\u6255\u3044\u306e\u691c\u8a3c<\/h2>\n\n\n\n
<\/figure>\n\n\n\n
Google Play Developer API\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u8a8d\u8a3c<\/h2>\n\n\n\n
\u5b9a\u671f\u8cfc\u5165\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u691c\u8a3c<\/h3>\n\n\n\n