Notifying when a subscription (app, main…) is updated.
The event is triggered when a subscription (app, main…) is updated.
Webhook authorization: using an app, a business or a directory token.
To get the subscription’s current data, you need to call the GET subscription API
Subscribing to the Subscription Update webhook:
curl --location --request POST '/platform/v1/webhook/subscribe' \
--header 'Authorization: "Bearer API_TOKEN"'\
--header 'Content-Type: application/json' \
--data-raw '{
"event": "purchasable_subscription/updated",
"target_url": "URL"
}'
Subscription Update Payload Example:
{
"entity_name": "purchasable_subscription",
"event_type": "update",
"data": {
"uid": "3d3dc97a-7ea7-42d7-a287-9993530721fd",
"display_name": "myappcodename",
"purchasable_uid": "ee655c26-4a57-48df-8e2e-f85a994b335c",
"buyer_uid": "ny1g1gau6o3x3yat",
"business_uid": "ato1v2g3eg3xkyqm",
"purchase_currency": "USD",
"purchase_price": "5.00",
"purchase_state": "canceled",
"cancellation_date": null,
"expiration_date": null,
"updated_at": "2024-03-17T12:27:10.000Z",
"created_at": "2024-03-01T12:27:09.966Z",
"payment_type": "monthly",
"bundled_from_subscription_uid": null,
"is_active": true
}
}