Any change to an In App Purchase resource will trigger an event, you can subscribe to these events through our Integrations service (currently Webhooks and Amazon SNS an SQS are available).

Signature Validation

Every event that is sent to your webhooks are signed using unique a SHA256 HMAC Key in the X-SHA256-Digest header. You can verify the authenticity of the payload by generating a comparison signature using the HMAC Key, a SHA256 digest and the JSON body.

You will find your HMAC Key in the options menu beside each integration in the App General Settings page on the Mbaasy App Publisher Developer Console.

Example Payload

{
  "id": "a38c8405-0116-45c3-b0bc-00adf75ab966",
  "type": "in_app_purchase",
  "versions": 3,
  "created_at": {
    "utc": "2018-03-28 10:35:38 UTC",
    "ms": 1522233338702
  },
  "data": {
    "id": "b981d914-9453-483f-a970-f70c350ad780",
    "marketplace": "itunes_connect",
    "app_family_id": "8b111c2b-5971-493f-8bee-3fcf3cfcc215",
    "fact_id": "2bad56e0-e550-4dd5-a258-a0c4d91ae8f5",
    "app_identifier": "com.mbaasy.demo",
    "product_id": "premium.1year",
    "quantity": 1,
    "type": "subscription",
    "environment": "production",
    "country_code": "DE",
    "currency_code": "EUR",
    "user_identifier": "ee56eaef-4795-4d36-83a9-b6586742cb30",
    "is_auto_renewing": false,
    "in_trial_period": false,
    "in_grace_period": false,
    "unique_identifier": 123456789012345,
    "metadata": {
      "campaign_id": "0074db55-999b-4470-8e87-a71fe549a9bb"
    },
    "purchased_at": {
      "utc": "2018-02-26 10:35:47 UTC",
      "ms": 1519641347834
    },
    "current_period_start_at": {
      "utc": "2018-03-28 12:35:32 UTC",
      "ms": 1522240532357
    },
    "current_period_end_at": {
      "utc": "2019-03-28 12:35:32 UTC",
      "ms": 1553776532357
    },
    "created_at": {
      "utc": "2018-02-26 10:35:50 UTC",
      "ms": 1519641350456
    },
    "updated_at": {
      "utc": "2018-03-28 10:35:38 UTC",
      "ms": 1522233338639
    }
  },
  "previous_attributes": {
    "in_trial_period": true,
    "current_period_start_at": {
      "utc": "2018-02-26 10:35:47 UTC",
      "ms": 1519641347834
    },
    "current_period_end_at": {
      "utc": "2018-03-28 12:35:32 UTC",
      "ms": 1522240532357
    },
    "updated_at": {
      "utc": "2018-02-26 10:36:04 UTC",
      "ms": 1519641364097
    }
  },
  "new_attributes": {
    "in_trial_period": false,
    "current_period_start_at": {
      "utc": "2018-03-28 12:35:32 UTC",
      "ms": 1522240532357
    },
    "current_period_end_at": {
      "utc": "2019-03-28 12:35:32 UTC",
      "ms": 1553776532357
    },
    "updated_at": {
      "utc": "2018-03-28 10:35:38 UTC",
      "ms": 1522233338639
    }
  }
}

Register for early access

  • Yes Unlimited 30 day free trial
  • Yes 2,500 free events / month

Frequently Asked Questions