POST api/Adapty/AdaptyCallback

Callback for Adapty webhook

Request Information

URI Parameters

None.

Body Parameters

AdaptyCallbackModel
NameDescriptionTypeAdditional information
profile_id

Adapty ID in the profile in the Adapty Dashboard.

string

None.

customer_user_id

User ID from your app (UUID, email, or other ID). If not set, this field is null. Customer User ID in the profile in the Adapty Dashboard.

string

None.

idfv

Identifier for Vendors (IDFV), unique per developer. IDFV in the profile in the Adapty Dashboard.

string

None.

idfa

Advertising ID (Apple only). IDFA in the profile in the Adapty Dashboard. It may be null if unavailable due to tracking restrictions, kids mode, or privacy settings.

string

None.

advertising_id

Advertising ID (Android only).

string

None.

profile_install_datetime

Installation timestamp in ISO 8601 format (e.g., 2020-07-10T15:00:00.000000+0000).

date

None.

user_agent

Device browser user-agent.

string

None.

email

User's email. Email in the profile in the Adapty Dashboard.

string

None.

event_type

Event name in Adapty format. See Webhook events for the full list.

string

None.

event_datetime

Event timestamp in ISO 8601 format (e.g., 2020-07-10T15:00:00.000000+0000).

date

None.

event_properties

Event properties.

EventProperties

None.

event_api_version

Adapty API version (current: 1).

decimal number

None.

profiles_sharing_access_level

List of users sharing access excluding the current user profile: profile_id: (UUID) Adapty ID customer_user_id: (String) Customer User ID if provided Used for Sharing purchases between accounts.

Collection of ProfilesSharingAccessLevel

None.

attributions

Attribution data. Included if Send Attribution is enabled in Webhook settings.

Attributions

None.

user_attributes

Custom user attributes. Included if Send User Attributes is enabled in Webhook settings. While custom attribute values in the mobile app code can be set as floats or strings, attributes received via the server-side API or historical import may come in different formats. The boolean and integer values will be converted to floats in this case.

Dictionary of string [key] and string [value]

None.

integration_ids

User integration IDs. null if unavailable or integrations are disabled.

Dictionary of string [key] and string [value]

None.

Request Formats

application/json, text/json

Sample:
{
  "profile_id": "sample string 1",
  "customer_user_id": "sample string 2",
  "idfv": "sample string 3",
  "idfa": "sample string 4",
  "advertising_id": "sample string 5",
  "profile_install_datetime": "2025-06-03T04:15:14.986+00:00",
  "user_agent": "sample string 7",
  "email": "sample string 8",
  "event_type": "sample string 9",
  "event_datetime": "2025-06-03T04:15:14.986+00:00",
  "event_properties": {
    "store": "sample string 1",
    "currency": "sample string 2",
    "price_usd": 3.1,
    "profile_id": "sample string 4",
    "cohort_name": "sample string 5",
    "environment": "sample string 6",
    "price_local": 7.1,
    "base_plan_id": "sample string 8",
    "developer_id": "sample string 9",
    "paywall_name": "sample string 10",
    "proceeds_usd": 11.1,
    "variation_id": "sample string 12",
    "purchase_date": "2025-06-03T04:15:15.006+00:00",
    "store_country": "sample string 14",
    "event_datetime": "2025-06-03T04:15:15.006+00:00",
    "proceeds_local": 16.1,
    "tax_amount_usd": 17.1,
    "transaction_id": "sample string 18",
    "net_revenue_usd": 19.1,
    "profile_country": "sample string 20",
    "paywall_revision": "sample string 21",
    "profile_event_id": "sample string 22",
    "tax_amount_local": 23.1,
    "net_revenue_local": 24.1,
    "vendor_product_id": "sample string 25",
    "profile_ip_address": "sample string 26",
    "consecutive_payments": 27,
    "rate_after_first_year": true,
    "original_purchase_date": "2025-06-03T04:15:15.006+00:00",
    "original_transaction_id": "sample string 30",
    "subscription_expires_at": "2025-06-03T04:15:15.006+00:00",
    "profile_has_access_level": true,
    "profile_total_revenue_usd": 33.1
  },
  "event_api_version": 11.1,
  "profiles_sharing_access_level": [
    {
      "profile_id": "sample string 1",
      "customer_user_id": "sample string 2"
    },
    {
      "profile_id": "sample string 1",
      "customer_user_id": "sample string 2"
    }
  ],
  "attributions": {
    "appsflyer": {
      "ad_set": "sample string 1",
      "status": "sample string 2",
      "channel": "sample string 3",
      "ad_group": {},
      "campaign": "sample string 5",
      "creative": {},
      "created_at": "2025-06-03T04:15:15.006+00:00",
      "network_user_id": "sample string 8"
    }
  },
  "user_attributes": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "integration_ids": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  }
}

application/xml, text/xml

Sample:
<AdaptyCallbackModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models">
  <advertising_id>sample string 5</advertising_id>
  <attributions>
    <appsflyer>
      <ad_group />
      <ad_set>sample string 1</ad_set>
      <campaign>sample string 5</campaign>
      <channel>sample string 3</channel>
      <created_at>2025-06-03T04:15:15.0062343+00:00</created_at>
      <creative />
      <network_user_id>sample string 8</network_user_id>
      <status>sample string 2</status>
    </appsflyer>
  </attributions>
  <customer_user_id>sample string 2</customer_user_id>
  <email>sample string 8</email>
  <event_api_version>11.1</event_api_version>
  <event_datetime>2025-06-03T04:15:14.9861192+00:00</event_datetime>
  <event_properties>
    <base_plan_id>sample string 8</base_plan_id>
    <cohort_name>sample string 5</cohort_name>
    <consecutive_payments>27</consecutive_payments>
    <currency>sample string 2</currency>
    <developer_id>sample string 9</developer_id>
    <environment>sample string 6</environment>
    <event_datetime>2025-06-03T04:15:15.0062343+00:00</event_datetime>
    <net_revenue_local>24.1</net_revenue_local>
    <net_revenue_usd>19.1</net_revenue_usd>
    <original_purchase_date>2025-06-03T04:15:15.0062343+00:00</original_purchase_date>
    <original_transaction_id>sample string 30</original_transaction_id>
    <paywall_name>sample string 10</paywall_name>
    <paywall_revision>sample string 21</paywall_revision>
    <price_local>7.1</price_local>
    <price_usd>3.1</price_usd>
    <proceeds_local>16.1</proceeds_local>
    <proceeds_usd>11.1</proceeds_usd>
    <profile_country>sample string 20</profile_country>
    <profile_event_id>sample string 22</profile_event_id>
    <profile_has_access_level>true</profile_has_access_level>
    <profile_id>sample string 4</profile_id>
    <profile_ip_address>sample string 26</profile_ip_address>
    <profile_total_revenue_usd>33.1</profile_total_revenue_usd>
    <purchase_date>2025-06-03T04:15:15.0062343+00:00</purchase_date>
    <rate_after_first_year>true</rate_after_first_year>
    <store>sample string 1</store>
    <store_country>sample string 14</store_country>
    <subscription_expires_at>2025-06-03T04:15:15.0062343+00:00</subscription_expires_at>
    <tax_amount_local>23.1</tax_amount_local>
    <tax_amount_usd>17.1</tax_amount_usd>
    <transaction_id>sample string 18</transaction_id>
    <variation_id>sample string 12</variation_id>
    <vendor_product_id>sample string 25</vendor_product_id>
  </event_properties>
  <event_type>sample string 9</event_type>
  <idfa>sample string 4</idfa>
  <idfv>sample string 3</idfv>
  <integration_ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </integration_ids>
  <profile_id>sample string 1</profile_id>
  <profile_install_datetime>2025-06-03T04:15:14.9861192+00:00</profile_install_datetime>
  <profiles_sharing_access_level>
    <ProfilesSharingAccessLevel>
      <customer_user_id>sample string 2</customer_user_id>
      <profile_id>sample string 1</profile_id>
    </ProfilesSharingAccessLevel>
    <ProfilesSharingAccessLevel>
      <customer_user_id>sample string 2</customer_user_id>
      <profile_id>sample string 1</profile_id>
    </ProfilesSharingAccessLevel>
  </profiles_sharing_access_level>
  <user_agent>sample string 7</user_agent>
  <user_attributes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </user_attributes>
</AdaptyCallbackModel>

multipart/form-data

Sample:

Failed to generate the sample for media type 'multipart/form-data'. Cannot use formatter 'MultipartMediaTypeFormatter' to write type 'AdaptyCallbackModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.