PHPackages                             protonlabs/ios-receipt-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. protonlabs/ios-receipt-parser

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

protonlabs/ios-receipt-parser
=============================

Utility to parse Apple-issued PKCS#7 container with receipts

v1.0.0(5y ago)329.1k3MITHTMLPHP &gt;= 7.3

Since Sep 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ProtonMail/ios-receipt-parser)[ Packagist](https://packagist.org/packages/protonlabs/ios-receipt-parser)[ RSS](/packages/protonlabs-ios-receipt-parser/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (5)Used By (0)

Apple StoreKit receipt parser for PHP
=====================================

[](#apple-storekit-receipt-parser-for-php)

[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![GitHub tag (latest by date)](https://camo.githubusercontent.com/95c5668aae279330ed6b71e74a8bc0c872db6170fc816be45b9d1dfa57020d5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f70726f746f6e6d61696c2f696f732d726563656970742d706172736572)](https://camo.githubusercontent.com/95c5668aae279330ed6b71e74a8bc0c872db6170fc816be45b9d1dfa57020d5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f70726f746f6e6d61696c2f696f732d726563656970742d706172736572)[![GitHub issues](https://camo.githubusercontent.com/8a630dd02c29dcfbb584cd2237c63b32d1bd7323c67ef63712ee1d23e154fc9f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f70726f746f6e6d61696c2f696f732d726563656970742d706172736572)](https://camo.githubusercontent.com/8a630dd02c29dcfbb584cd2237c63b32d1bd7323c67ef63712ee1d23e154fc9f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f70726f746f6e6d61696c2f696f732d726563656970742d706172736572)[![GitHub pull requests](https://camo.githubusercontent.com/96dd406332ed69cb7732172662fe28592140070bcc68a52aa5cc09ef2ef28361/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f70726f746f6e6d61696c2f696f732d726563656970742d706172736572)](https://camo.githubusercontent.com/96dd406332ed69cb7732172662fe28592140070bcc68a52aa5cc09ef2ef28361/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f70726f746f6e6d61696c2f696f732d726563656970742d706172736572)[![GitHub branch checks state](https://camo.githubusercontent.com/8ae89759cca6079b02d34c398514a6efe313d6a0d338ae185316b5eb70dc3109/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636865636b732d7374617475732f70726f746f6e6d61696c2f696f732d726563656970742d7061727365722f6d6173746572)](https://camo.githubusercontent.com/8ae89759cca6079b02d34c398514a6efe313d6a0d338ae185316b5eb70dc3109/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636865636b732d7374617475732f70726f746f6e6d61696c2f696f732d726563656970742d7061727365722f6d6173746572)[![Continuous Integration](https://github.com/ProtonMail/ios-receipt-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/ProtonMail/ios-receipt-parser/actions/workflows/ci.yml)

This library is forked from [cthulhu/ios-receipt-parser](https://github.com/CthulhuDen/ios-receipt-parser) and mantained by [Proton](https://github.com/ProtonMail).

Description
-----------

[](#description)

This library can be used to parse Apple billing receipts without calling Apple servers. The parser is built in accordance with the official Apple documentation. More information can be found at the following links:

- [Validate Locally](https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html)
- [Receipt Fields](https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html)

This parser is required, in particular, when you use the latest [XCode features](https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode) to test your billing flow since receipts generated using this method are signed by your local special-purpose certificate and can not be validated via Apple's own servers. In all other cases you should strongly prefer to validate all receipts against Apple servers.

Installation
------------

[](#installation)

You can install this library via Composer:

```
composer install protonlabs/ios-receipt-parser
```

Usage
-----

[](#usage)

The main use case is to parse receipt generated by StoreKit locally. There is no need to validate the signatures.

```
