- Delivery
- POST to your endpoint
- Signature
- Standard Webhooks
v1, HMAC-SHA256 - Acknowledgement
-
- 2XX
Norspire sends each subscription event as a POST request with a JSON body and 3 Standard Webhooks v1 headers. Check the signature and timestamp before you store the event, then answer with a 2xx status.
The webhooks member of openapi.json defines all 20 event types. Webhooks change by additions only, such as a new event type, a new body field, or a new value of paymentMethod or endReason.
For signature verification code, retry schedules and endpoint rules, read part 16 of the integration guide.
Headers
Each request sends 3 signature headers along with content-type: application/json and user-agent: Norspire-Webhooks/1.
| Field | Type | Always present | Description |
|---|---|---|---|
webhook-id | header, string | yes | The event ID. It stays the same in each attempt and equals id in the body. |
webhook-timestamp | header, string | yes | The time of the attempt in whole seconds since the epoch. Refuse a timestamp more than 5 minutes off your clock. |
webhook-signature | header, string | yes | Check this header before you use the body. Space-separated v1,<base64> values, each HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<raw body> with the endpoint secret. |
Event body
All 20 event types share 1 JSON object shape. Every timestamp uses UTC with Z. The body holds no text from a locale catalog.
| Field | Type | Always present | Description |
|---|---|---|---|
id | string, UUID | yes | The event ID. It stays the same in each attempt. Use it to skip repeats. |
type | string, event type | yes | The event type. One of the 20 values in the table below. Answer an unknown type with 2xx. |
timestamp | timestamp, UTC | yes | The time of the event in UTC. |
data.sequence | integer, 1 or more | yes | The sequence number of the event in its subscription. It grows by 1 for each event. Use it to order events for 1 subscription. |
data.host | string | yes | The host of the publication. |
data.reader.id | string, UUID | yes | The reader ID. It never changes and equals readerId in the entitlement read. |
data.reader.email | string or null | yes | The email address of the reader at the time of the attempt, or null after the reader deletes the account. |
data.subscription.id | string, UUID | yes | The ID of the subscription. |
data.subscription.status | trialing, active, past_due or ended | yes | The status of the subscription after the event. |
data.subscription.plan.id | string, UUID | yes | The ID of the plan after the event. |
data.subscription.plan.name | string | yes | The name of the plan. |
data.subscription.accessKeys | array of strings | yes | The access keys that the subscription grants at the time of the event. Empty when the subscription grants no access. |
data.subscription.currentPeriodEnd | timestamp, UTC | yes | The end of the current period in UTC. |
data.subscription.cancelAtPeriodEnd | boolean | yes | true when the subscription ends at the end of the current period. |
data.subscription.endsAt | timestamp, UTC or null | yes | The end of the current period while cancelAtPeriodEnd is true, the end date of an ended subscription, or null. |
data.subscription.endReason | string or null | yes | The reason that the subscription ended, or null. Treat an unknown value as another value. |
data.subscription.paymentMethod | string | yes | The payment method type, for example card or swish. Treat an unknown value as another value. |
data.subscription.currency | SEK, NOK or DKK | yes | The currency of the subscription. |
data.charge | object or null | yes | The charge details for a charge event, or null for each other event. |
data.refund | object or null | yes | The refund details for a refund event, or null for each other event. |
Fields in data.charge
| Field | Type | Always present | Description |
|---|---|---|---|
amount.minor | integer | yes | The charge amount in the minor unit of the currency, for example 9900 for 99.00. |
amount.currency | SEK, NOK or DKK | yes | The currency of the amount. |
invoiceNumber | string or null | yes | The invoice number of the charge, or null for a charge with no invoice. |
Fields in data.refund
| Field | Type | Always present | Description |
|---|---|---|---|
amount.minor | integer | yes | The refund amount in the minor unit of the currency. |
amount.currency | SEK, NOK or DKK | yes | The currency of the amount. |
creditNoteNumber | string or null | yes | The credit note number of the refund, or null for a refund with no credit note. |
The 20 event types
| Type | Meaning |
|---|---|
subscription.created | A reader started a subscription. The subscription is active or in its trial. |
charge.succeeded | A charge of the subscription succeeded. The member data.charge holds its amount. |
charge.failed | A charge of the subscription failed. The member data.charge holds its amount. The subscription can be past_due. |
charge.refunded | A refund of a charge completed. The member data.refund holds its amount. |
refund.failed | A refund of a charge failed. The member data.refund holds its amount. |
subscription.payment_method_changed | The reader changed the payment method of the subscription. |
subscription.cancel_requested | The reader asked to end the subscription at the end of the current period. |
subscription.agreement_stopped | The reader stopped the payment agreement in the app of the payment provider. |
subscription.resumed | The reader resumed a subscription that was set to end. |
subscription.withdrawn | The reader withdrew from the subscription inside the withdrawal period. |
subscription.ended | The subscription ended. The member data.subscription.endReason gives the reason. |
refund.requested | A staff member requested a refund of a charge. The member data.refund holds its amount. |
subscription.price_change_notified | Norspire sent the notice of a price change to the reader. |
subscription.price_change_notice_failed | Norspire failed to send the notice of a price change to the reader. |
subscription.plan_changed | The subscription plan changed at once. |
subscription.plan_change_scheduled | A plan change is set for the end of the current period. |
subscription.plan_change_canceled | The reader or staff canceled a scheduled plan change. |
subscription.plan_change_reverted | A plan change failed to take payment, so the subscription returned to its earlier plan. |
account.deleted | The reader deleted the account. The member data.reader.email is null. |
subscription.swish_consent_ended | The Swish consent of the subscription ended outside Norspire. Norspire can no longer charge the subscription. |
Example
Request From Norspire to your receiver
POST /norspire/webhooks HTTP/1.1
Content-Type: application/json
User-Agent: Norspire-Webhooks/1
webhook-id: 0193f0b2-5c1e-7a4e-9d2b-3f6a8c1e2d4f
webhook-timestamp: 1768039200
webhook-signature: v1,<base64 signature> {
"id": "0193f0b2-5c1e-7a4e-9d2b-3f6a8c1e2d4f",
"type": "subscription.created",
"timestamp": "2027-01-10T09:00:00Z",
"data": {
"sequence": 1,
"host": "konto.example.no",
"reader": {
"id": "0193f0b2-1111-7a4e-9d2b-3f6a8c1e2d4f",
"email": "reader@example.no"
},
"subscription": {
"id": "0193f0b2-2222-7a4e-9d2b-3f6a8c1e2d4f",
"status": "active",
"plan": {
"id": "0193f0b2-3333-7a4e-9d2b-3f6a8c1e2d4f",
"name": "Monthly A1"
},
"accessKeys": [
"paid"
],
"currentPeriodEnd": "2027-02-10T09:00:00Z",
"cancelAtPeriodEnd": false,
"endsAt": null,
"endReason": null,
"paymentMethod": "card",
"currency": "NOK"
},
"charge": null,
"refund": null
}
} Response 204 Any 2xx status acknowledges the event
HTTP/1.1 204 No Content