This event is triggered whenever a subscription has its status changed.
Payload (object)
- id (string) The subscription id
- merchantId (string) The merchant id for the subscription
- userId (string) The user for the subscription
- subscriptionPlanId (string) The plan for this subscription
- subscribeDate (Date) The date the subscription was created
- checkoutInstrumentId (string) The instrument id used to charge this payment
- instrumentType (enum)
- payment-card-1
- schedule (object)
- interval (enum)
- daily
- weekly
- monthly
- yearly
- intervalCount
- interval (enum)
- amount (object)
- value (number) - The amount to be paid in float point
- currency (string) - 3 letters ISO code for currency
- formattedValue (string) - The formatted value, e.g: $10.00
- digits (number) - The amount of decimal places this currency has
- wholeValue (number)
An integer value for the least significant value for this currency, eg.: $10.00 would be 1000. It can be thought as how many cents for this operation
- status (enum)
- CREATING: Subscription is in the process of being authorized.
- FAILED: Subscription failed to authorize, payment instrument was not verified successfully. In those cases the buyer might have to try again or select another payment method.
- TRIAL: Subscription in in the trial period. Refer to nextPaymentDate for the next charge date.
- ACTIVE: The subscription is active. Refer to nextPaymentDate for the next charge date.
- CANCELLED: Subscription has been canceled and will not be charged again.
- OVERDUE: Subscription is past nextPaymentDate and failed all attempts to charge the card.
- nextPaymentDate (string) The next payment date for this subscription
- termsOfServiceUrl (string) The merchant's terms of service url that will be displayed to the buyer
- privacyPolicyUrl (string) The merchant's privacy policy url that will be displayed to the buyer
{
id: 'string',
merchantId: 'string',
userId: 'string',
subscriptionPlanId: 'string',
subscribeDate: 'string',
checkoutInstrumentId: 'string',
instrumentType: 'string',
schedule: {
interval: 'string',
intervalCount: number,
},
amount: {
value: number,
currency: 'string',
formattedValue: 'string',
digits: number,
wholeValue: number,
},
status: 'string',
nextPaymentDate: Date,
termsOfServiceUrl: 'string',
privacyPolicyUrl: 'srtring',
}