Sample webhook request
Sample request headers and payloads for every Subrite webhook event, and how Subrite retries requests that do not get a 2xx response.
ReferenceView as Markdown
This page assumes you are familiar with HTTP, web servers and your own data tooling, which allowed you to provide a URL that accepts Subrite's requests.
Request headers#
Here are sample request headers:
{
"authorization": "Bearer a34a-sasdf32asdflklLasBpsIKasipa8A",
"x-subrite-webhook-signature": "jmHevgDTOrtSRsCkuBbpy7kztJdp+XNgVEvp+hfzDJE=",
"x-subrite-webhook-signature-timestamp": "1716883729"
}Request body#
Here are sample request payloads for each event:
member.deleted#
{
"id": "17095300-edef-4c16-8ebd-277b8cad7fee",
"timestamp": "2024-05-28T08:08:49.640Z",
"event": "member.deleted",
"data": {
"email": "harry-potter@subrite.no",
"phone": "+4712345678",
"fullName": "Harry Potter",
"memberId": "b6e54562-211c-4e60-b1bd-60a4bfff81e0",
"nickName": null
}
}member.updated#
{
"id": "17095300-edef-4c16-8ebd-277b8cad7fas",
"timestamp": "2024-05-28T08:08:49.640Z",
"event": "member.updated",
"data": {
"id": 7463,
"email": "harry-potter@subrite.no",
"phone": "+4712345678",
"avatar": "https://cdn.subrite.no/43205114.jpeg",
"address": {
"city": "Oslo",
"name": null,
"email": null,
"line1": "123 Main St",
"line2": null,
"country": "NO",
"postCode": "12345",
"companyName": null,
"organizationNo": null
},
"fullName": "Harry Potter",
"nickName": "Potter",
"birthDate": "2024-01-10T11:24:38.610Z",
"createdAt": "2024-01-10T11:24:38.610Z",
"isCompany": false,
"companyName": "",
"emailVerified": "2025-02-07T11:47:34.135Z",
"phoneVerified": null,
"organizationNo": "",
"customPropertyValues": {
"customProperty1": "value1",
"customProperty2": "value2",
"customProperty3": "value3"
},
"deleteAfterExpiration": false
}
}subscription.created#
{
"id": "17095300-edef-4c16-8ebd-277b8cad7fee",
"timestamp": "2024-05-28T08:08:49.640Z",
"event": "subscription.created",
"data": {
"fullName": "Harry Potter",
"memberId": "b6e54562-211c-4e60-b1bd-60a4bfff81e0",
"phone": "+4712345678",
"planName": "Subrite Monthly Plan",
"packageName": "Subrite Combo Package",
"subscriptionId": 124321,
"reference": null
}
}subscription.renewed#
{
"id": "17095300-edef-4c16-8ebd-277b8cad7fee",
"timestamp": "2024-05-28T08:08:49.640Z",
"event": "subscription.renewed",
"data": {
"fullName": "Harry Potter",
"memberId": "b6e54562-211c-4e60-b1bd-60a4bfff81e0",
"phone": "+4712345678",
"planName": "Subrite Monthly Plan",
"packageName": "Subrite Combo Package",
"subscriptionId": 124321,
"reference": null
}
}member.subscription.activated#
{
"id": "17095300-edef-4c16-8ebd-277b8cad7fee",
"timestamp": "2024-05-28T08:08:49.640Z",
"event": "member.subscription.activated",
"data": {
"email": "harry-potter@subrite.no",
"phone": "+4712345678",
"memberId": "b6e54562-211c-4e60-b1bd-60a4bfff81e0",
"subscriptionId": 124321,
"action":"subscription_reactivated"
}
}member.subscription.deactivated#
{
"id": "17095300-edef-4c16-8ebd-277b8cad7fee",
"timestamp": "2024-05-28T08:08:49.640Z",
"event": "member.subscription.deactivated",
"data": {
"email": "harry-potter@subrite.no",
"phone": "+4712345678",
"memberId": "b6e54562-211c-4e60-b1bd-60a4bfff81e0",
"subscriptionId": 124321,
"action":"subscription_stopped"
}
}Retries#
If your endpoint does not return a 2xx response, Subrite retries up to 7 more times, waiting longer each time (30 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, then 24 hours). The last attempt is about 41 hours after the first. Each attempt is listed on the webhook’s Logs tab.