Use this page with AI
Copy this into your coding assistant and add your request.
Read https://openiap.dev/commerce-protocol and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.
My request: [describe what customers should be able to do]One server API for purchases across stores
Each store verifies purchases and reports subscription changes in its own format. The Commerce Protocol gives your backend one verify call, one way to read access, and one signed event format for all of them, instead of separate integrations with the App Store Server API, Google Play Developer API, Amazon Receipt Verification Service, and Meta Horizon's server API.
See a subscription in actionPOST /commerce/v1/purchases/verifySame call and result shape for each supported store; only the evidence changes.
// Request
{
"store": "apple",
"apple": {
"jws": "eyJhbGciOi…"
}
}
// Response
{
"store": "apple",
"isValid": true,
"state": "ENTITLED",
"productId": "premium.monthly",
"environment": "production"
}IAPKit, which OpenIAP runs, is the reference implementation today. Use it hosted, host it yourself, or implement the protocol in your own backend and check it with the conformance runner. The checks are a floor, not proof that a provider is correct. Compare capability descriptors for the stores and profiles you need.
Start from your role
- From your app: what the app sends to your backend
- Call a provider: verify, bind, and read access from your backend
- Receive events: verify and store signed renewal, refund, and revocation events
When it helps
- Your server verifies purchases from more than one store and needs one access decision across them.
- You want that contract in a specification your provider does not own, so you can switch providers or run your own.
It is optional: the client libraries also work with a store's own server API, your backend, or another verification service.
Commerce backend architecture
Select a part to explore it.Meta · Amazon
Notifications
See a subscription in actionPurchase, access, cancellation, and recovery
Explore the wider ecosystemPaywalls, commerce services, and data platforms
One ecosystem. Your part in it.
Choose your business. Explore the roles you need.
Own one role or combine them. Your app keeps login and access control; partners can supply the rest. Follow one purchase through the system →
Specification
Operations · REST · GraphQL · Authentication · Webhooks · Conformance