- Welcome to our Dev Docs!
- Use Cases
- Contract Changes
- Contract with an immediately starting trial, then scheduled update
Contract with an immediately starting trial, then scheduled update
Example 22. ContractChanged Webhook
{ "ContractId": "6463d4c10507e90bf5acfd4c", "CustomerId": "6463d4c10507e90bf5acfd48", "ExternalCustomerId": "459927", "ContractChangeId": "6463d4fb0507e90bf5acfd83", "ContractChangeType": "Upgrade", "Event": "ContractChanged", "EntityId": "63b2d4405b49105c19fa7714" }
Example 23. Contract Change Details Webhook
{ "Id": "6463d4fb0507e90bf5acfd83", "Type": "Upgrade", "Timestamp": "2023-05-16T19:09:47.8700000Z", "OrderId": "6463d4fa41ce499d3ffeae85", "ContractId": "6463d4c10507e90bf5acfd4c", "ChangeDate": "2023-06-16T19:13:48.8400000Z", "NewPlanVariantId": "63e62a0d9864a09b6e4b2048", "NewPlanId": "63e62a0d9864a09b6e4b2045", "Contract": { "Id": "6463d4c10507e90bf5acfd4c", "Before": { "CurrentPhase": { "Type": "Trial", "StartDate": "2023-04-16T19:13:48.8400000Z", "PlanVariantId": "64478300c37cfa946c6d6140", "PlanId": "644782f0c37cfa946c6d6135", "Quantity": 1, "InheritStartDate": false }, "Phases": [ { "Type": "Trial", "StartDate": "2023-04-16T19:13:48.8400000Z", "PlanVariantId": "64478300c37cfa946c6d6140", "PlanId": "644782f0c37cfa946c6d6135", "Quantity": 1, "InheritStartDate": false }, { "Type": "Normal", "StartDate": "2023-05-16T19:13:48.8400000Z", "PlanVariantId": "64478300c37cfa946c6d6140", "PlanId": "644782f0c37cfa946c6d6135", "Quantity": 1, "InheritStartDate": false } ] }
...
{
"After": {
"CurrentPhase": {
"Type": "Trial",
"StartDate": "2023-04-16T19:13:48.8400000Z",
"PlanVariantId": "64478300c37cfa946c6d6140",
"PlanId": "644782f0c37cfa946c6d6135",
"Quantity": 1,
"InheritStartDate": false
},
"Phases": [
{
"Type": "Trial",
"StartDate": "2023-04-16T19:13:48.8400000Z",
"PlanVariantId": "64478300c37cfa946c6d6140",
"PlanId": "644782f0c37cfa946c6d6135",
"Quantity": 1,
"InheritStartDate": false
},
{
"Type": "Normal",
"StartDate": "2023-05-16T19:13:48.8400000Z",
"PlanVariantId": "64478300c37cfa946c6d6140",
"PlanId": "644782f0c37cfa946c6d6135",
"Quantity": 1,
"InheritStartDate": false
},
{
"Type": "Normal",
"StartDate": "2023-05-16T19:13:48.8400000Z",
"PlanVariantId": "64478300c37cfa946c6d6140",
"PlanId": "63e62a0d9864a09b6e4b2045",
"Quantity": 1,
"InheritStartDate": false
}
]
}
}
To learn details about the time-based contract change, please click here.
Example 24. ContractChanged Webhook
{ "ContractId": "6463d4c10507e90bf5acfd4c", "CustomerId": "6463d4c10507e90bf5acfd48", "ExternalCustomerId": "459927", "ContractChangeId": "648c984cc605951ff6464a7e", "ContractChangeType": "Timebased", "Event": "ContractChanged", "EntityId": "63b2d4405b49105c19fa7714" }
Example 25. Contract Change Details Webhook
{ "Id": "6463d4fb0507e90bf5acfd83", "Type": "Timebased", "Timestamp": "2023-06-16T19:13:48.8400000Z", "ContractId": "6463d4c10507e90bf5acfd4c", "Contract": { "Id": "6463d4c10507e90bf5acfd4c", "Before": { "CurrentPhase": { "Type": "Trial", "StartDate": "2023-04-16T19:13:48.8400000Z", "PlanVariantId": "64478300c37cfa946c6d6140", "PlanId": "644782f0c37cfa946c6d6135", "Quantity": 1, "InheritStartDate": false }, "Phases": [ { "Type": "Trial", "StartDate": "2023-04-16T19:13:48.8400000Z", "PlanVariantId": "64478300c37cfa946c6d6140", "PlanId": "644782f0c37cfa946c6d6135", "Quantity": 1, "InheritStartDate": false }, { "Type": "Normal", "StartDate": "2023-05-16T19:13:48.8400000Z", "PlanVariantId": "64478300c37cfa946c6d6140", "PlanId": "644782f0c37cfa946c6d6135", "Quantity": 1, "InheritStartDate": false } { "Type": "Normal", "StartDate": "2023-05-16T19:13:48.8400000Z", "PlanVariantId": "63e62a0d9864a09b6e4b2048", "PlanId": "63e62a0d9864a09b6e4b2045", "Quantity": 1, "InheritStartDate": false } ] }
...
{
"After": {
"CurrentPhase": {
"Type": "Normal",
"StartDate": "2023-06-16T19:13:48.8400000Z",
"PlanVariantId": "63e62a0d9864a09b6e4b2048",
"PlanId": "63e62a0d9864a09b6e4b2045",
"Quantity": 1,
"InheritStartDate": false
},
"Phases": [
{
"Type": "Trial",
"StartDate": "2023-04-16T19:13:48.8400000Z",
"PlanVariantId": "64478300c37cfa946c6d6140",
"PlanId": "644782f0c37cfa946c6d6135",
"Quantity": 1,
"InheritStartDate": false
},
{
"Type": "Normal",
"StartDate": "2023-05-16T19:13:48.8400000Z",
"PlanVariantId": "64478300c37cfa946c6d6140",
"PlanId": "644782f0c37cfa946c6d6135",
"Quantity": 1,
"InheritStartDate": false
},
{
"Type": "Normal",
"StartDate": "2023-05-16T19:13:48.8400000Z",
"PlanVariantId": "63e62a0d9864a09b6e4b2048",
"PlanId": "63e62a0d9864a09b6e4b2045",
"Quantity": 1,
"InheritStartDate": false
}
]
}
}
In this section: