Skip to main content

Webhooks - Transfer

A product (subscription/non-consumable) has been transferred to a new user.

This webhook is triggered in the following scenarios::

  • When a user restores an active subscription (or non-consumable) using a different user ID.
  • When an active subscription is replaced using a different user ID.
info

This webhook won't occur if the User transfer option in the settings of the IAPHUB dashboard is disabled.

info

This webhook won't occur if you're using the deprecated V1 version of webhooks.
We recommend upgrading your app to the latest version (v2).

Request body

StringOriginal user id of the product
StringNew user id of the product
ObjectThe latest data of the purchase related to the event, see the Get purchase API route response properties.
When receiving a webhook you can call the Get purchase API route in order to verify the purchase or refresh the data if your webhook processing got delayed and you're concerned the data might be outdated.

Example

{
id:"5e7fdfe22a3cff5084466e77",
type: 'transfer',
version: '2.0.0',
createdDate:"2030-10-12T17:34:35.256Z",
fromUserId: '62785074-8f32-42a5-b86b-90dbd79ce211',
toUserId: '62785074-8f32-42a5-b86b-90dbd79ce212',
data: {
id: '5da20ea9fbd92641ae8d0c03',
purchaseDate: '2030-10-12T17:34:33.256Z',
quantity: 1,
platform: 'ios',
country: 'US',
tags: {},
orderId: '9873637705964380',
app: '5d86507259e828b8fe321f7e',
user: '5d865c10c41280ba7f0ce9c2',
userId: '62785074-8f32-42a5-b86b-90dbd79ce212',
product: '5d86507259e828b8fe321f8a',
listing: '5d86507259e828b8fe321f32',
store: '5d86507259e828b8fe321f85',
currency: 'USD',
price: 19.99,
convertedCurrency: 'USD',
convertedPrice: 19.99,
isSandbox: false,
isRefunded: false,
isSubscription: true,
isSubscriptionActive: true,
isSubscriptionRenewable: true,
isSubscriptionRetryPeriod: false,
isTrialConversion: false,
subscriptionState: 'active',
subscriptionPeriodType: "normal",
expirationDate: '2030-11-12T17:34:33.256Z',
linkedPurchase: '2d865c10c41280ba7f0ce9c4',
originalPurchase: '2d865c10c41280ba7f0ce9c4',
productSku: 'membership_pricing1',
productType: 'renewable_subscription',
productGroupName: 'subscription_group_1'
}
}