Name of the event received.
Subscription Recurrence Webhook Events
Listen to subscription recurrence events to keep your integration always synchronized.
Your application receives a notification whenever the status of a recurrence of a subscription changes.
Recurrences paid by credit card are charged to the card saved in the subscription, so they don't need a new card token. The payload brings only the display fields of the card, never the card token.
Recurrence, attempt and retry
A recurrence is a billing cycle of the subscription, not a charge attempt:
- The
idof the recurrence is the same in every attempt of the cycle, the retries included. - Each attempt adds a new item to
payments, with its ownid. retry.retriescounts the retries already made in the cycle, andretry.nextRetryis when the next one is due. The rules are inretryof Create subscription.recurrenceis the number of the cycle:1is the cycle charged when the buyer subscribes,2the next one, and so on.
From the second cycle on, Easyflow charges the subscription without creating an order: no order.* event is sent for these cycles, and you follow them with the events below.
Recurrence Events
- subscriptionRecurrence.canceled — Recurrence canceled.
- subscriptionRecurrence.delayed — The payment of the recurrence is past due and was not paid. The recurrence follows the same retries as a failed one.
- subscriptionRecurrence.failed — An attempt to charge the recurrence failed. It is sent for every attempt that fails, not only after the last retry.
- subscriptionRecurrence.paid — Recurrence paid.
After the last retry fails, Easyflow makes no new attempt. About intervalInDays days later, the subscription becomes inactive and subscription.deactivated is sent.
Events
subscriptionRecurrence.canceledsubscriptionRecurrence.delayedsubscriptionRecurrence.failedsubscriptionRecurrence.paid
Easyflow sends an HTTP request with this payload to the URL registered for your webhook.
Payloadrequired
Webhook payload with the data of the subscription recurrence event.
Content typeapplication/jsonobject
eventstringoccurredAtstring · date-timeDate and time when the notification was sent, in UTC.
payloadobjectComplete recurrence data.
Show child attributesHide child attributes
idstring · uuidsubscriptionIdstring · uuidstatusstringbillingDatestring · date-timecreatedAtstring · date-timedueDatestring · date-timepaidAtstring · date-timenullablerecurrenceintegerrecurrenceValueInCentsintegerretryobjectShow child attributesHide child attributes
lastRetrystring · date-timenextRetrystring · date-timeretriesinteger
paymentsarray of objectsIn this event,
pix,bankBilletandcreditCardare always objects. Their fields are absent when they do not apply to the payment method.Show child attributesHide child attributes
idstringpaymentMethodstringPayment method, such as
credit-card,pixorbank-billet.statusstringvalueInCentsintegervaluePaidInCentsintegerfineValueInCentsintegerinterestValueInCentsintegerinstallmentsintegerpixobjectnullableShow child attributesHide child attributes
copyAndPasteCodestringnullableqrCodestringnullableexpireAtstring · date-timenullable
bankBilletobjectnullableShow child attributesHide child attributes
expireAtstring · date-timenullablebarCodestringnullablelinkstringnullablelinestringnullable
creditCardobjectnullableCard used in the payment. Only these display fields are sent. The card token and the card number are never sent.
Show child attributesHide child attributes
last4NumbersstringflagstringexpiresAtYearintegerexpiresAtMonthintegerholderNamestringnicknamestring
refuseobjectnullableReason why the payment was refused.
Show child attributesHide child attributes
rawDescriptionstringtypestringnullable