{"_id":"iap_verifier","_rev":"38-86a3c55848057bc5ca215b19343c9eef","name":"iap_verifier","description":"iOS In App Purchase Receipt Verification library","dist-tags":{"latest":"0.0.12"},"versions":{"0.0.1":{"name":"iap_verifier","version":"0.0.1","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"dependencies":{},"devDependencies":{},"_id":"iap_verifier@0.0.1","_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"9b2d4c4682a42360bfcfd0301d819accce03c2b1","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.1.tgz","integrity":"sha512-Nk1s5mPzmVEIoU9qRfWRrRlRabyxJVfLEJ7D+6QtFnmh6dmNmNvrsKxk8TkkPQ1/oVmSsIVJWL9vPo5Wo4nueg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkbKY5ekikccnfUiVr4s4aXevUCqlaizAWdAXLSnyDwwIgEz1d6kW+IGut/JHB5z7TKwS/fMgysZKea9EyLsgh1Yo="}]},"scripts":{},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.2":{"name":"iap_verifier","version":"0.0.2","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"dependencies":{},"devDependencies":{},"_id":"iap_verifier@0.0.2","_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"0b0d425000cabf83ba493fa1ce72680e2c07b4c3","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.2.tgz","integrity":"sha512-hrOpDhsA8DbQwHxZs589HRLdi4GEyW5gB5Cg026qv+5sqrIfcmMr+UpdtqgPB/rYhoszP3lltKd4scUrWKk4Og==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK7KEGjyBw5ZnvbDDwUrAsQCpfJ0i5agzZS9So0zrxrQIhAN3NOjUEgOmWiC1NfXJe07pm5ot3KVSkE5d7JAAAOajL"}]},"scripts":{},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.3":{"name":"iap_verifier","version":"0.0.3","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"_id":"iap_verifier@0.0.3","dist":{"shasum":"ca465b2ef6b0146130fdcce0bd785f2e1493bdcb","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.3.tgz","integrity":"sha512-gEuOc6DH9BK8Zc8P5Jd7YCAPNzWtrp+58nL6D4jyRouwIskYwHjdrNk5f6s/rqwb3cE56tZ04IklXk4foANuRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNtglOjohlrmhH0akLfn0IQvluKAMeypRjzY7S6efPEAIhAMJ6Wa7cjNmxaraHuYbsmkb7M03cp9fvUjeemli3GOHv"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.4":{"name":"iap_verifier","version":"0.0.4","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"_id":"iap_verifier@0.0.4","dist":{"shasum":"9b737107ef0be3b3b62e21f1568c3398af29abe2","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.4.tgz","integrity":"sha512-vd7zJ9QKjeUNUDw0Jxx11fGDwVc7eoRMWw3DwAuoRucHN66nDJKtPO7xEO2mXrwI7D6atk1DgPo3Nk/+N8ZsDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUH31K62ImVA4EMBwbH5BBc0Ddr9cL+z0Mqae5fV1jvgIhAKqc35hIk5jOz0+ECPxBsX76NE32Kx+o9ZkbyD3/0O7h"}]},"_npmVersion":"1.1.65","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.5":{"name":"iap_verifier","version":"0.0.5","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"_id":"iap_verifier@0.0.5","dist":{"shasum":"555008754e89dddb41fa17d80da0b6f875cd0743","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.5.tgz","integrity":"sha512-dlzxOJ7puwrtGgavW6BRZtuE60oUsMN5XBwjfh9EI/r/f8sEnMcS2NIpZ3NDwED6OXLLOZXDXtTeJIQVEro2sA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE9BGUFdRhkbqOUeuBsoiSFegmORimAXZunumfJPqHXoAiAN6a00Fp5z6mNENzmU1psQghLnZdrGXQT5qAuhWn/f8g=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.7":{"name":"iap_verifier","version":"0.0.7","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"},"_id":"iap_verifier@0.0.7","dist":{"shasum":"6b4654a2d5088cf8310da4a7ae0cac62743e05f3","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.7.tgz","integrity":"sha512-dUrZXotxgmWgcQb2+jRk/bkLh3qlJ8t2QntyLmPtSqZLjTpqNTDnbOc06MIsd3QFs+5efaEZPQOhIvkpmXUv0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt15Kh3eO28+qQCepglKkpn6Y6dxMJaWdJfRMbueZl9AIhAL7qu4n/ByK4SBrYc8rZ89bmymro9NFdTEo6h+YznI7Z"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.8":{"name":"iap_verifier","version":"0.0.8","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"},"_id":"iap_verifier@0.0.8","dist":{"shasum":"3c134c392e6a251f0f535119a55c2697cd139565","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.8.tgz","integrity":"sha512-zlTQc7ZSu0JpQrXHyCgiwkuXEKEwJ1HaKsmp1wPO0uAfIdm8WLgJjhfcWxtECj/yo6riPv0mCWDOQoyF7z+U2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHdh1w85uyQAIeRa7ArdLPDl9Jl+G2Dny9lN4WOPms3AiEAmKN5xbRTtWE7Gxj3N69gFdrVmoXTToe0qTXjzZCchzM="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.9":{"name":"iap_verifier","version":"0.0.9","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"},"_id":"iap_verifier@0.0.9","dist":{"shasum":"4d8a088e7dba4895b7448a4c0106cd351e3fb925","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.9.tgz","integrity":"sha512-QkFIz5665bPyNtYmoqCAqlaID+00p5+ljupt+p+LWJPVSnAPkfoOoLjMDz4j2aUV3D37Fgd19ROJPUpUVDAHaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5fZ+JIq7dvDi1sO0qFNqLZMqiE5TiKMweKKIiQHlNkAiEAnJCfxfxhscw5ilQQ6sKWrRLuDWHF7BP2BnWAGUyaHpA="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.10":{"name":"iap_verifier","version":"0.0.10","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"},"_id":"iap_verifier@0.0.10","dist":{"shasum":"67ca825159dcb54991672ecf0dd33420abc28c0b","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.10.tgz","integrity":"sha512-bfR4GoqNa6fcUWUyvj3gNLmiLsy3u8Z++XsWhJSfA1F+jQXb/fpHVF5HXkALu3qtQQbdbpCdXCaAixIgnbgKUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYJrbKy2pKg6+VVT5TNFDGHsr+tBidvAEDRWAElg3EUAIhALdE2FhJHHO/K/Th/GW6BdicLbkzQSABHAL7bWLOgGlT"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.11":{"name":"iap_verifier","version":"0.0.11","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"},"_id":"iap_verifier@0.0.11","dist":{"shasum":"977cc5ba0d2d14b3e4c1096933fdb4d6e42d06e7","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.11.tgz","integrity":"sha512-vYMudzb45tMsdJOH9V2GlDHUMa0a0Wmg12MY2A3hNAqTtAdWTTLFQyew5WIAi3QHYeSY37mAIejNb75/dOIjfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBAJ8ZHC3/y76ut5I3gKqie7grrjlhJLP9VxbKl898gkAiAP6GLTwOEsP6Q9LtjAdJfOMGX6u0ViHwSlwogQXWTqxA=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]},"0.0.12":{"name":"iap_verifier","version":"0.0.12","description":"iOS In App Purchase Receipt Verification library","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"homepage":"https://github.com/pcrawfor/iap_verifier","author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"main":"./lib/iap_verifier","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"engines":{"node":">= 0.4.7"},"gitHead":"ff355b1aa18ae8361e2ef4f2a4c670fb297e6eb7","bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"},"_id":"iap_verifier@0.0.12","scripts":{},"_shasum":"3199a80119ab1409e100f67acedee5cf40d994e9","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"pcrawfor","email":"paul@cometcoast.com"},"dist":{"shasum":"3199a80119ab1409e100f67acedee5cf40d994e9","tarball":"https://registry.npmjs.org/iap_verifier/-/iap_verifier-0.0.12.tgz","integrity":"sha512-ifWCoo7RaDo3D87ixrRCu/EdpyxRxsQ9eySoT8tnSsIz8RUkJE2Z6Rw2rEtRxkhof8fm5qJSJqZdOuBpvGx4Tg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM4bGX6SsqvduZdBaPIJUTHsaZI8aR5Himf8smlZSRVAIgIXz0FwWWuV8rmdMrKF6yh41kkMjU/A+MFtZg7ZeBUbU="}]},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}]}},"maintainers":[{"name":"pcrawfor","email":"paul@cometcoast.com"}],"time":{"modified":"2022-06-18T23:52:44.007Z","created":"2011-10-25T14:49:50.937Z","0.0.1":"2011-10-25T14:49:51.020Z","0.0.2":"2011-10-25T15:03:06.854Z","0.0.3":"2012-08-28T14:30:00.976Z","0.0.4":"2012-11-22T16:15:56.274Z","0.0.5":"2013-03-04T15:30:00.498Z","0.0.7":"2014-01-21T18:06:47.202Z","0.0.8":"2014-03-20T12:42:54.410Z","0.0.9":"2014-03-20T12:44:30.869Z","0.0.10":"2014-05-11T13:50:34.285Z","0.0.11":"2014-07-28T15:34:25.200Z","0.0.12":"2015-06-16T00:19:44.887Z"},"author":{"name":"Paul Crawford","email":"paul@cometcoast.com","url":"http://cometcoast.com"},"repository":{"type":"git","url":"https://github.com/pcrawfor/iap_verifier.git"},"readme":"# IAPVerifier - Node.js verification library for iOS in app purchase receipts\n\n## Installation\n\nIAPVerifier is available via npm\n\n`npm install iap_verifier`\n\nIt has no external dependencies other than node itself.\n\n## Overview\n\nIAPVerifier takes an iOS In App purchase receipt string in it's raw string form and sends it to the Apple servers for verification, it then returns a response indicating whether the receipt is valid or not.\n\nThere are two environments for Apple's verification servers SandBox and Production, you can configure IAPVerifier to use either environment depending if you are testing your system or running it in production.\n\n### Usage\n  \nWhen instantiating the verifier you need to provide the itunes shared secret for the application you are verifying receipts for.  This can be found on the itunes connect page for the applications' in app purchases.\n  \nThe IAPVerifier API is very simple, create an instance of IAPVerifier and then call verifyReceipt on it with a callback.  The first argument is the receipt data string, the second is a boolean indicating whether or not the receipt data is encoded as base64 already or not (this arguments is optional, defaults to false) and the last argument is the callback which includes three parameters.\n\n    verifyReceipt(rawReceipt, function(isValid, message, data){\n      // do something with the verification info...      \n    });\n  \n    verifyAutoRenewReceipt(rawReceipt, function(isValid, message, data){\n      // do something with the verification info...\n    });\n    \nThe callback has three params sent back to it, these are:\n\n* isValid - boolean indicating that the receipt has valid or the auto-renewing subscription is active\n* message - the message associated in Apple's system with the statusCode\n* data - the receipt data returned by Apple's server\n\nThe callback function includes isValid which indicates whether the receipt is for a valid subscription/purchase, the statusCode returned by Apple's server and the Message associated with the statusCode.\n  \n#### To verify a receipt:\n\nJavascript:\n    \n    var IAPVerifier = require('iap_verifier');\n\n    // Verify a receipt\n    receipt = 'raw_receipt_data_from_ios'\n    \n    var client = new IAPVerifier(itunes_shared_secret);\n    client.verifyReceipt(receipt, function(valid, msg, data) {\n      if (valid) {\n        // update status of payment in your system\n        console.log(\"Valid receipt\");\n      } else {\n        console.log(\"Invalid receipt\");\n      }\n    });\n\nCoffeeScript:\n  \n    IAPVerifier = require('iap_verifier')\n\n    # Verify a receipt\n    receipt = 'raw_receipt_data_from_ios'\n\n    client = new IAPVerifier(itunes_shared_secret)\n    client.verifyReceipt receipt, (valid, msg, data) ->\n      if valid\n        console.log(\"Valid receipt\")\n      else\n        console.log(\"Invalid receipt\")            \n\n\nSimilarly you can verify auto-renewing receipts:\n\nJavascript:\n\n    // Verify an auto-renewing receipt\n    receipt = 'raw_receipt_data_from_ios'\n    \n    var client = new IAPVerifier('your_secret_key_from_itunes')\n    client.verifyAutoRenewReceipt(receipt, function(valid, msg, data){\n      if(valid) {\n        // update status of payment in your system\n      }\n    });\n\nCoffeeScript:\n  \n    # Verify an auto-renewing receipt\n    receipt = 'raw_receipt_data_from_ios'\n\n    client = new IAPVerifier('your_secret_key_from_itunes')\n    client.verifyAutoRenewReceipt receipt, (valid, msg, data) ->\n      if valid\n        console.log(\"Valid receipt\")\n      else\n        console.log(\"Invalid receipt\")\n\n### Special Note: Handling App Store reviews:\n\nThere is a special case for iOS In App Purchase verification that occurs during application review.  \n\nWhen you app is reviewed Apple is testing with a Distribution (production) build of your application however for testing reasons they use dns to fake out your app so that it thinks it's hitting the Production servers but is in fact hitting the Sandbox servers when processing In App purchases.  \n\nThis means when verifying receipts during a review you must failover to check receipts on the Sandbox environment, IAPVerifier does this automatically by checking the error codes sent back from Apple's server and auto-retrying the verification on the Sandbox environment if a Sandbox receipt has been sent to the Production environment.  This approach is recommended by Apple as the simplest way to handle these app store review receipts.\n\n### License\n\nSee LICENSE file.\n","readmeFilename":"README.md","homepage":"https://github.com/pcrawfor/iap_verifier","keywords":["ios","iap","in app purchase","iphone","ipad","verifier","verify","verify in app purchase"],"bugs":{"url":"https://github.com/pcrawfor/iap_verifier/issues"}}