subscription

Eventos relacionados a una suscripción.

EventoDescripción
subscription.createdOcurre cada vez que se crea una suscripción
subscription.pausedOcurre cada vez que se pausa una suscripción para detener los planes que consumen tus clientes
subscription.resumedOcurre cada vez que retomas la suscripción para iniciar los planes que consumen tus clientes
subscription.canceledOcurre cada vez que se cancela una suscripción
subscription.paidOcurre cada vez que una una suscripción es pagada exitosamente
subscription.payment_failedOcurre cada vez que falla el pago de una suscripción
subscription.updatedOcurre cada vez que se actualiza una suscripción

Subscripción creada - subscription.created

{
	"object": {
		"id": "sub_2t8VW3VAHX1si4fdq",
		"status": "in_trial",
		"object": "subscription",
		"charge_id": null,
		"created_at": 1672788372,
		"subscription_start": 1672788372,
		"canceled_at": null,
		"paused_at": null,
		"billing_cycle_start": null,
		"billing_cycle_end": null,
		"trial_start": null,
		"trial_end": null,
		"plan_id": "gold-plan",
		"last_billing_cycle_order_id": null,
		"customer_id": "cus_2pg4fUUMNNb9uvFqy",
		"customer_custom_reference": null,
		"card_id": "src_2s5n1U6J99nqWaUG2"
	},
	"previous_attributes": {}
}

Subscripción pausada - subscription.paused

{
	"object": {
		"id": "sub_2sgtPVU2zmuRXmm1i",
		"status": "paused",
		"object": "subscription",
		"charge_id": "634d778728c7ba000b60a221",
		"created_at": 1666021255,
		"subscription_start": 1666021255,
		"canceled_at": null,
		"paused_at": 1672620819,
		"billing_cycle_start": 1666021245,
		"billing_cycle_end": 1681746045,
		"trial_start": null,
		"trial_end": null,
		"plan_id": "gold-plan",
		"last_billing_cycle_order_id": "ord_2sgtPVU2zmuRXmm1r",
		"customer_id": "cus_2sgtPUd9HmfB9CNWp",
		"customer_custom_reference": null,
		"card_id": "src_2sgtPUd9HmfB9CNWt"
	},
	"previous_attributes": {}
}

Subscripción reactivar - subscription.resumed

{
	"object": {
		"id": "sub_2t5ow2YqGxaRjXeMY",
		"status": "active",
		"object": "subscription",
		"charge_id": "63a9e88bf3a68f0013b429f1",
		"created_at": 1672079499,
		"subscription_start": 1672079499,
		"canceled_at": null,
		"paused_at": null,
		"billing_cycle_start": 1672079489,
		"billing_cycle_end": 1687804289,
		"trial_start": null,
		"trial_end": null,
		"plan_id": "gold-plan",
		"last_billing_cycle_order_id": "ord_2t5ow2YqGxaRjXeMe",
		"customer_id": "cus_2t5ow1p1km1nAR5Xn",
		"customer_custom_reference": null,
		"card_id": "src_2t5ow1p1km1nAR5Xr"
	},
	"previous_attributes": {}
}

Subscripción cancelada - subscription.canceled

{
	"object": {
		"id": "sub_2rA6VFbRGVKW11qUj",
		"status": "canceled",
		"object": "subscription",
		"charge_id": null,
		"created_at": 1642555040,
		"subscription_start": 0,
		"canceled_at": 1673659055,
		"paused_at": null,
		"billing_cycle_start": null,
		"billing_cycle_end": 1673659030,
		"trial_start": null,
		"trial_end": null,
		"plan_id": "gold-plan",
		"last_billing_cycle_order_id": "ord_2tBnaWXargY6bxbCg",
		"customer_id": "cus_2rA6VFixibGiyishM",
		"customer_custom_reference": null,
		"card_id": "src_2rA6VFixibGiyishN"
	},
	"previous_attributes": {}
}

Subscripción pagada - subscription.paid

{
	"object": {
		"id": "sub_2prRbeC9GLAbpLNAM",
		"status": "active",
		"object": "subscription",
		"charge_id": "63b193b05f727800010db2de",
		"created_at": 1622556473,
		"subscription_start": 1622556473,
		"canceled_at": null,
		"paused_at": null,
		"billing_cycle_start": 1672582063,
		"billing_cycle_end": 1675260463,
		"trial_start": null,
		"trial_end": null,
		"plan_id": "gold-plan",
		"last_billing_cycle_order_id": "ord_2t7iE1rdNXMn63bdo",
		"customer_id": "cus_2prRbeC9GL5qaTvnC",
		"customer_custom_reference": null,
		"card_id": "src_2prRbeC9GL5qaTvnD"
	},
	"previous_attributes": {}
}

Subscripción pago fallido - subscription.payment_failed

{
	"object": {
		"id": "sub_2rA6VFbRGVKW11qUj",
		"status": "past_due",
		"object": "subscription",
		"charge_id": null,
		"created_at": 1642555040,
		"subscription_start": 1673659040,
		"canceled_at": null,
		"paused_at": null,
		"billing_cycle_start": null,
		"billing_cycle_end": 1673659030,
		"trial_start": null,
		"trial_end": 1673659040,
		"plan_id": "gold-plan",
		"last_billing_cycle_order_id": "ord_2tBnaWXargY6bxbCg",
		"customer_id": "cus_2rA6VFixibGiyishM",
		"customer_custom_reference": null,
		"card_id": "src_2rA6VFixibGiyishN"
	},
	"previous_attributes": {}
}

Subscripción actualizada - subscription.updated

{
	"object": {
		"id": "sub_2sxHQXxd4puB8KS4W",
		"status": "active",
		"object": "subscription",
		"charge_id": "638b8eabb4812b001920ed57",
		"created_at": 1670090411,
		"subscription_start": 1670090411,
		"canceled_at": null,
		"paused_at": null,
		"billing_cycle_start": 1670090401,
		"billing_cycle_end": 1672768801,
		"trial_start": null,
		"trial_end": null,
		"plan_id": "quincenal-450",
		"customer_id": "cus_2ne2PZfHY8b2pqxLG",
		"customer_custom_reference": null,
		"card_id": "src_2sxHQXk4fVwEx5KKS"
	},
	"previous_attributes": {}
}