Purchasely
2.8
2.8
  • Welcome page
  • General
    • Presentation
  • Quick test
    • Test in 5 minutes
  • Basic configuration
    • Console Configuration
      • Creating a new application
      • Creating your Products
        • App Store
        • Play Store
        • Huawei App Gallery
        • Amazon App Store
        • Products & Plans
      • Design your Paywalls
    • SDK installation
      • iOS SDK
      • Android SDK
      • React Native SDK
      • Cordova SDK
    • SDK configuration
    • Webhook
      • Receiving and understanding messages
      • Managing entitlements
      • Subscription events
      • Events attributes
      • Detailed sequence diagrams
    • Observer mode
  • Dashboards
    • Introduction
    • Live
    • Subscriptions
    • Cohorts
    • Trials
    • Events
  • S2S notifications
    • Server-to-server notifications ?
    • App Store
    • Play Store
    • Huawei App Gallery
    • Amazon App Store
  • Integrations
    • Airship
    • Amplitude
    • Braze
    • Firebase
  • Advanced Features
    • Anonymous user
    • Associating content
    • Customising UI
      • Errors & alerts
      • Controllers (iOS) / Fragments (Android)
    • Deeplinks automations
    • Displaying users subscriptions
    • UI Analytics
    • Localization
    • Non-subscription products
    • Promoting your products
      • Self-promotion
      • Promoting In-App Purchases
    • Purchase interceptor
    • Purchase manually
    • Subscription status
    • Paywall Guidelines
  • Others
    • Frequently Asked Questions
    • Migration guides
      • Migrate to Purchasely
      • SDK
        • v2.1.3
        • v2.2.0
      • Webhooks
        • v3.0
  • TESTING
    • Testing Cycle Durations
Powered by GitBook

© Purchasely 2020-2023

On this page
  • About the Webhook
  • Client backend responsibilities
  • In-app purchases
  • Subscription update
  • Visualising the messages sent by the Webhook

Was this helpful?

  1. Basic configuration

Webhook

This section describes everything you need to know about the Webhook, which allows to connect your backend with the Purchasely Cloud Platform.

About the Webhook

Purchasely Webhook is a unified interface that streams subscription Events to the Client Backend.

This interface has 2 purposes :

  1. Notifying the client backend each time an event occurs on a subscriber

  2. Unifying the Events from each store into a common language, to simplify much the integration for the client backend

In other words, the main advantage of the Webhook is that it avoids to the client backend team, to develop and maintain a specific interface for each Mobile Application Store and to have to validate the native receipts.

The Webhook is used in 2 main use-cases :

  • when a new in-app purchase is performed by a user inside the mobile application.

  • when any life-cycle event happens on a subscription

Client backend responsibilities

At the client backend level, an endpoint must be developed to :

  • receive the subscription Events coming from the Webhook

  • transform these Events into actual user Entitlements

  • acknowledge the good reception of the receipt to the Purchasely Cloud Platform

The client backend is also in charge of :

  • managing the user Entitlements and providing them to the mobile applications

  • managing the access to the contents depending on the user Entitlements

In-app purchases

The first case where an Event is sent on a Webhook is when an in-app subscription is purchased by the user in the mobile application. An Event is sent on the Webhook to notify the client backend that this particular user must be entitled with the rights corresponding to the subscription.

Subscription update

The second case where Events are sent on the Webhook is when something happens in a subscription lifecycle. The main Events are :

  • the renewing of a subscription

  • the cancellation of the auto-renewing a subscription

  • the expiration of a subscription

  • a refund

  • the billing failure of a subscription

Most of these Events are coming directly from the Application Store and their Server-to-server notifications that Purchasely Cloud Platform receives.

Visualising the messages sent by the Webhook

PreviousSDK configurationNextReceiving and understanding messages

Last updated 3 years ago

Was this helpful?

At Purchasely, we often use the free service . This service allows you to generate a endpoint URL (which you can plug to the Purchasely Cloud Platform using the Purchasely Console), and offers a web interface matching that endpoint showing you all the messages received by the endpoint.

webhook.site
Webhook.site screenshot