Customer Subscription Status Update
Overview#
Event Name: customer.subscription_status.update
Description: This event is triggered when a customer's subscription status changes (e.g., from active to inactive, canceled, or suspended).
{
"id": "evt_123456",
"event": "customer.subscription_status.update",
"data": {
"reason": null,
"company_id": "COM-0FNWT0H89QS36",
"country_id": "CON-0AZZVPQHM475V",
"customer_id": "CUS-0FQHMZE17MASC",
"customer_identifier": "c56164ad-3d54-4eaa-ae3d-46fe3969972b",
"timestamp": 1717645444289,
"status": "ACTIVE",
"trial_used": false
},
"created_at": 1717645444289
}
Payload Fields#
Root Fields#
id (string): Unique identifier for the event.Example: WBH-0G8TFMWR5QYAX
event (string): Name of the event.Example: customer.subscription_status.update
data (object): Contains the event-specific data.
created_at (number): The timestamp when the event was created, in milliseconds since epoch. Data Object Fields#
reason (string or null): The reason for the subscription when status is on ON_HOLD
. It can be null if no specific reason is provided.
company_id (string): The unique identifier of the company associated with the customer.Example: COM-0FNWT0H89QS36
country_id (string): The unique identifier of the country associated with the customer.Example: CON-0AZZVPQHM475V
customer_id (string): The unique identifier of the customer.Example: CUS-0FQHMZE17MASC
customer_identifier (string): An identifier for the customer, specified by merchant.Example: c56164ad-3d54-4eaa-ae3d-46fe3969972b
timestamp (number): The timestamp when the event occurred, in milliseconds since epoch. status (string): The new status of the customer's subscription.Values: ACTIVE
TRIAL
CANCELLED
ON_HOLD
PAUSE
trial_used (boolean): Indicates whether the trial period has been used. Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
customer_identifier
string
required{
"id": "evt_123456",
"event": "customer.subscription_status.update",
"data": {
"reason": null,
"company_id": "COM-0FNWT0H89QS36",
"country_id": "CON-0AZZVPQHM475V",
"customer_id": "CUS-0FQHMZE17MASC",
"customer_identifier": "c56164ad-3d54-4eaa-ae3d-46fe3969972b",
"timestamp": 1717645444289,
"status": "ACTIVE",
"trial_used": false
},
"created_at": 1717645444289
}
Request samples
curl --location --request POST 'https://sandbox.api.stykite.com/' \
--header 'x-api-host: stykite' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "evt_123456",
"event": "customer.subscription_status.update",
"data": {
"reason": null,
"company_id": "COM-0FNWT0H89QS36",
"country_id": "CON-0AZZVPQHM475V",
"customer_id": "CUS-0FQHMZE17MASC",
"customer_identifier": "c56164ad-3d54-4eaa-ae3d-46fe3969972b",
"timestamp": 1717645444289,
"status": "ACTIVE",
"trial_used": false
},
"created_at": 1717645444289
}'
Responses
application/json Modified at 2024-06-08 10:21:08