Skip to content
/ yaak Public

🐃 YAAK is a simple server that by its API makes In-App Purchase receipt and Auto-Renewable subscription validation easy :)

License

Notifications You must be signed in to change notification settings

dietmap/yaak

Repository files navigation

YAAK - Yet Another AppStore Kit

GitHub Workflow Status Docker Image Version (latest semver)

YAAK is a simple server that by its API makes In-App Purchase receipt and Auto-Renewable subscription validation easy

You should always validate receipts on the server, in Apple's words:

Use a trusted server to communicate with the App Store. Using your own server lets you design your app to recognize and trust only your server, and lets you ensure that your server connects with the App Store server. It is not possible to build a trusted connection between a user’s device and the App Store directly because you don’t control either end of that connection.

Running YAAK locally

YAAK is a Spring Boot application written in Kotlin and built using Gradle. You can build a jar file and then run it on your local machine as follows:

$ git clone https://github.com/dietmap/yaak.git
$ cd yaak
$ ./gradlew clean build
$ java -jar build/libs/*.jar

Or you can run it from Gradle directly using the Spring Boot Gradle plugin.

$ ./gradlew bootRun

Once you run it you can access YAAK here: http://localhost:8080/

Security

By default YAAK runs with this settings. You should generate your own secure API key or choose and configure other available security option: API_KEY, OAUTH, NONE

Health check

Once the YAAK is started you can hit this endpoint in order to verify whether the service is up and running:

$ curl http://localhost:8080/actuator/health

Adding custom callbacks

You can plug-in your custom webhook for handling subscription/purchase specific logic.

yaak.user-app.subscription-webhook-url

Apple Store API Endpoints

Receipt

The following API endpoints accept HTTP POST method and require Content-Type: application/json request body

Returns HTTP 200 with the detailed receipt body or HTTP 500 with error details in case of any errors

Simply returns HTTP code without response body. HTTP 200 if the receipt is valid or HTTP 500 in case of any errors.

Subscription

Google Play Store API Endpoints

Receipt

...

Subscription

...

Docker

The docker image is stored in Docker Hub dietmap/yaak repo.

Issues and contribution

Bug reports and pull requests are welcome on GitHub at https://github.com/dietmap/yaak

License

YAAK is Open Source software released under MIT license.