Subscription Webhook Events

POSThttps://your-server.com/webhooks/easyflow

Listen to subscription events to keep your integration always synchronized.

Webhooks are the safest and most reliable way to stay updated in real time. Your application receives a notification whenever the status of a subscription changes.

Subscription Events

  • subscription.created — Subscription created.
  • subscription.updated — Subscription updated.
  • subscription.activated — Subscription activated.
  • subscription.canceled — Subscription canceled.
  • subscription.deactivated — Subscription deactivated.
  • subscription.expired — Subscription expired.
  • subscription.inactivated — Subscription inactivated.

Origin of the subscription

Besides subscriptions from an offer (origin equal to offer), a subscription can be created through the API (api) or by a buyer who subscribes through a recurring payment link (payment-link). Subscriptions created through the API or by a payment link send the same events listed above; no event is specific to either origin. They are created as soon as the first order is charged, whatever the result of the card: subscription.created is sent and, if the first order is refused, subscription.canceled follows.

The webhook payload does not include origin. To know how a subscription was created, read origin in Get subscription or Filter subscription.

Events

  • subscription.created
  • subscription.updated
  • subscription.activated
  • subscription.canceled
  • subscription.deactivated
  • subscription.expired
  • subscription.inactivated

Easyflow sends an HTTP request with this payload to the URL registered for your webhook.

Payloadrequired

Webhook payload received by your server in the event of an event.

Content typeapplication/jsonobject

  • eventstring

    Name of the event received.

    Possible values:subscription.createdsubscription.updatedsubscription.activatedsubscription.canceledsubscription.deactivatedsubscription.expiredsubscription.inactivated

  • occurredAtstring · date-time

    Date and time when the notification was sent, in UTC.

  • payloadobject

    Complete subscription data.

    Show child attributesHide child attributes
    • idstring · uuid
    • namestring
    • createdAtstring · date-time
    • expirationstring · date-time
    • installmentsinteger
    • numberRecurrencesinteger
    • repeatIndefinitelyboolean
    • periodicitystring

      Possible values:MonthlyQuarterlyBiannualyAnnualy

    • statusstring

      Possible values:activeinactivecanceledexpired

    • paymentMethodstring

      Possible values:credit-cardpixbank-billetcryptodebit-cardtransfer

    • recurrencePaymentStatusstring

      Possible values:pendingfaileddelayedpaidcanceled

    • recurrenceValueInCentsinteger
    • customValueobject
      Show child attributesHide child attributes
      • recurrenceFrominteger
      • recurrenceTointeger
      • valueInCentsinteger
    • retryobject
      Show child attributesHide child attributes
      • intervalInDaysinteger
      • retriesMaxNumberinteger
    • customerobject
      Show child attributesHide child attributes
      • namestring
      • emailstring
      • phoneobject
        Show child attributesHide child attributes
        • dddstring
        • numberstring
        • areaCodestring
        • isMobileboolean
      • documentobject
        Show child attributesHide child attributes
        • typestring
        • numberstring
      • deliveryAddressobject
        Show child attributesHide child attributes
        • streetstring
        • neighborhoodstring
        • numberstring
        • citystring
        • statestring
        • zipCodestring
        • complementstring
      • billingAddressobject
        Show child attributesHide child attributes
        • streetstring
        • neighborhoodstring
        • numberstring
        • citystring
        • statestring
        • zipCodestring
        • complementstring
    • participantsarray of objects
      Show child attributesHide child attributes
      • businessobject
        Show child attributesHide child attributes
        • idstring · uuid
        • namestring