Payment Link Webhook Events

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

Listen to payment link events to know when a payment link changes, closes or expires.

The business that owns the payment link receives the notification.

Payment Link Events

  • paymentLink.created — Payment link created.
  • paymentLink.updated — Payment link updated.
  • paymentLink.removed — Payment link deleted.
  • paymentLink.published — Payment link activated.
  • paymentLink.unpublished — Payment link inactivated.
  • paymentLink.expired — Payment link expired, because its expiresAt has passed. A routine runs every 4 hours and expires the active payment links whose expiresAt has passed, so the event usually comes up to 4 hours after expiresAt, and can come later when many payment links expire at the same time.
  • paymentLink.canceled — Payment link closed, because it reached maxOrdersPerLink paid orders.

Limit of orders

When a payment link has maxOrdersPerLink, Easyflow counts its paid orders every time one of its orders is paid. When the count reaches maxOrdersPerLink, the status of the payment link becomes canceled and paymentLink.canceled is sent.

  • On a recurring payment link, the order counted is the order of the first recurrence, paid when the buyer subscribes. The following recurrences of the subscription create no order, so they do not count for the limit.
  • order.paid and paymentLink.canceled are independent events, and there is no guarantee of the order in which they arrive. Do not wait for one of them to process the other.

Events

  • paymentLink.created
  • paymentLink.updated
  • paymentLink.removed
  • paymentLink.published
  • paymentLink.unpublished
  • paymentLink.expired
  • paymentLink.canceled

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

Payloadrequired

Webhook payload with the data of the payment link.

Content typeapplication/jsonobject

  • eventstring

    Name of the event received.

    Possible values:paymentLink.createdpaymentLink.updatedpaymentLink.removedpaymentLink.publishedpaymentLink.unpublishedpaymentLink.expiredpaymentLink.canceled

  • occurredAtstring · date-time

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

  • payloadobject

    Data of the payment link at the moment of the event. A date that does not apply to the payment link is absent or null.

    Show child attributesHide child attributes
    • idstring · uuid

      Payment link ID.

    • namestring

      Name of the payment link.

    • descriptionstringnullable

      Description of the payment link.

    • statusstring

      Status of the payment link. expired and canceled are final.

      Possible values:draftactiveinactiveexpiredcanceled

    • valueInCentsinteger

      Value of the payment link, in cents.

    • distUrlstring

      URL of the checkout of the payment link, shared with buyers.

    • businessobject

      Business that owns the payment link.

      Show child attributesHide child attributes
      • idstring · uuid
      • namestring
    • publishedAtstring · date-timenullable

      When the payment link was activated.

    • unpublishedAtstring · date-timenullable

      When the payment link was inactivated.

    • expiresAtstring · date-timenullable

      When the payment link expires.

    • expiredAtstring · date-timenullable

      When the payment link expired. Set in paymentLink.expired.

    • canceledAtstring · date-timenullable

      When the payment link was closed by the limit of orders. Set in paymentLink.canceled.

    • maxOrdersPerLinkintegernullable

      Maximum number of paid orders of the payment link. Without it, the payment link has no limit.

    • createdAtstring · date-time
    • updatedAtstring · date-time