Notifying when a new subscription (app, main…) is created
The event is triggered when a new subscription (app, main…) is created
Webhook authorization: using an app, a business or a directory token.
Subscribing to the Subscription Created webhook:
curl --location --request POST '/platform/v1/webhook/subscribe' \
--header 'Authorization: "Bearer API_TOKEN"'\
--header 'Content-Type: application/json' \
--data-raw '{
"event": "purchasable_subscription/create",
"target_url": "URL"
}'
Subscription Created Payload Example:
{
"entity_name": "purchasable_subscription",
"event_type": "created",
"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": "purchased",
"cancellation_date": null,
"expiration_date": null,
"updated_at": "2024-03-01T12:27:09.966Z",
"created_at": "2024-03-01T12:27:09.966Z",
"payment_type": "monthly",
"bundled_from_subscription_uid": null,
"is_active": true
}
}