Skip to main content

Prenumerations Webhook Händelser

En prenumeration genererar en händelse i varje steg av sin livscykel:

Använda subscription.updated för synkronisering i realtid

Webhooken subscription.updated utlöses när som helst ett prenumerationsfält ändras, vilket gör att du kan hålla din applikationsstatus synkroniserad utan att behöva fråga API:et upprepade gånger:
Prenumerera på subscription.updated för att få meddelanden i realtid om alla prenumerationsändringar, vilket eliminerar behovet av att fråga API:et om uppdateringar.

Webhook Payload Schema

Subscription payload sent on a webhook. It carries every field of SubscriptionResponse, plus the grace-period deadline.

addons
Addon Cart Response Item · object[]
obligatorisk

Addons associated with this subscription

billing
object
obligatorisk

Billing address details for payments

brand_id
string
obligatorisk

Brand id this subscription belongs to

cancel_at_next_billing_date
boolean
obligatorisk

Indicates if the subscription will cancel at the next billing date

created_at
string<date-time>
obligatorisk

Timestamp when the subscription was created

credit_entitlement_cart
object[]
obligatorisk

Credit entitlement cart settings for this subscription

currency
enum<string>
obligatorisk

Currency used for the subscription payments

Tillgängliga alternativ:
AED,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BWP,
BYN,
BZD,
CAD,
CHF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SEK,
SGD,
SHP,
SLE,
SLL,
SOS,
SRD,
SSP,
STN,
SVC,
SZL,
THB,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW
customer
object
obligatorisk

Customer details associated with the subscription

has_payment_method
boolean
obligatorisk

Whether a payment method is on file. False while a card-optional subscription waits for the customer to add one.

metadata
Metadata · object
obligatorisk

Additional custom data associated with the subscription

meter_credit_entitlement_cart
object[]
obligatorisk

Meter credit entitlement cart settings for this subscription

meters
object[]
obligatorisk

Meters associated with this subscription (for usage-based billing)

next_billing_date
string<date-time>
obligatorisk

Timestamp of the next scheduled billing. Indicates the end of current billing period

on_demand
boolean
obligatorisk

Wether the subscription is on-demand or not

payment_frequency_count
integer<int32>
obligatorisk

Number of payment frequency intervals

payment_frequency_interval
enum<string>
obligatorisk

Time interval for payment frequency (e.g. month, year)

Tillgängliga alternativ:
Day,
Week,
Month,
Year
previous_billing_date
string<date-time>
obligatorisk

Timestamp of the last payment. Indicates the start of current billing period

product_id
string
obligatorisk

Identifier of the product associated with this subscription

quantity
integer<int32>
obligatorisk

Number of units/items included in the subscription

recurring_pre_tax_amount
integer<int32>
obligatorisk

Amount charged before tax for each recurring payment in the currency's smallest unit (cents for USD, yen for JPY, fils for KWD)

status
enum<string>
obligatorisk

Current status of the subscription

Tillgängliga alternativ:
pending,
active,
on_hold,
paused,
cancelled,
failed,
expired,
past_due
subscription_id
string
obligatorisk

Unique identifier for the subscription

subscription_period_count
integer<int32>
obligatorisk

Number of subscription period intervals

subscription_period_interval
enum<string>
obligatorisk

Time interval for the subscription period (e.g. month, year)

Tillgängliga alternativ:
Day,
Week,
Month,
Year
tax_inclusive
boolean
obligatorisk

Indicates if the recurring_pre_tax_amount is tax inclusive

trial_period_days
integer<int32>
obligatorisk

Number of days in the trial period (0 if no trial)

cancellation_comment
string | null

Free-text cancellation comment, if any

cancellation_feedback
null | enum<string>

Customer-supplied churn reason, if any

Tillgängliga alternativ:
too_expensive,
missing_features,
switched_service,
unused,
customer_service,
low_quality,
too_complex,
other
cancelled_at
string<date-time> | null

Cancelled timestamp if the subscription is cancelled

custom_field_responses
object[] | null

Customer's responses to custom fields collected during checkout

customer_business_name
string | null

Business / legal name associated with the tax id (B2B). When set this is used on the invoice in place of the customer's personal name.

discount_cycles_remaining
integer<int32> | null

DEPRECATED: Use discounts[].cycles_remaining instead.

discount_id
string | null

DEPRECATED: Use discounts instead. Returns the first discount's ID if present.

discounts
object[] | null

All stacked discounts applied, ordered by position

expires_at
string<date-time> | null

Timestamp when the subscription will expire

paused_at
string<date-time> | null

Timestamp when the subscription was paused, if it currently is (or is OnHold due to an unresolved pause settlement). null otherwise.

payment_method_id
string | null

Saved payment method id used for recurring charges

scheduled_change
null | object

Scheduled plan change details, if any

tax_id
string | null

Tax identifier provided for this subscription (if applicable)

trial_amount
integer<int32> | null

Per-unit trial amount after discounts, snapshotted at subscription creation (price currency minor units, pre-quantity, pre-tax). Null for a free trial or no trial.

past_due_ends_at
string<date-time> | null

Time when the grace period ends. The subscription moves to on_hold or to cancelled at this time.

Read in the same query as the rest of the payload, so it always comes from the row snapshot that produced status. It is set whenever the subscription sits in a window at that moment. A delayed event of another type therefore carries the deadline too, next to a past_due status.

Senast ändrad 26 september 2026