{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/ios/main/json-schema/app-store-server-transaction-schema.json",
  "title": "JWSTransactionDecodedPayload",
  "description": "Decoded JWSTransaction payload returned by the App Store Server API. Represents a single in-app purchase or subscription transaction.",
  "type": "object",
  "properties": {
    "transactionId": { "type": "string" },
    "originalTransactionId": { "type": "string" },
    "webOrderLineItemId": { "type": "string" },
    "bundleId": { "type": "string" },
    "productId": { "type": "string" },
    "subscriptionGroupIdentifier": { "type": "string" },
    "purchaseDate": { "type": "integer", "format": "int64" },
    "originalPurchaseDate": { "type": "integer", "format": "int64" },
    "expiresDate": { "type": "integer", "format": "int64" },
    "quantity": { "type": "integer" },
    "type": {
      "type": "string",
      "enum": ["Auto-Renewable Subscription", "Non-Consumable", "Consumable", "Non-Renewing Subscription"]
    },
    "appAccountToken": { "type": "string", "format": "uuid" },
    "inAppOwnershipType": {
      "type": "string",
      "enum": ["FAMILY_SHARED", "PURCHASED"]
    },
    "signedDate": { "type": "integer", "format": "int64" },
    "offerType": { "type": "integer" },
    "offerIdentifier": { "type": "string" },
    "environment": {
      "type": "string",
      "enum": ["Sandbox", "Production"]
    },
    "storefront": { "type": "string", "description": "Three-letter country code." },
    "storefrontId": { "type": "string" },
    "transactionReason": {
      "type": "string",
      "enum": ["PURCHASE", "RENEWAL"]
    },
    "price": { "type": "integer", "description": "Price in micro-units of the currency." },
    "currency": { "type": "string" }
  }
}
