Commission Webhook Events

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

Listen to commission events to follow the part of each payment that goes to each business.

Each commission belongs to one business, in receiver, and that business receives the notification.

Commission Events

  • commission.created — Commission created for a payment.
  • commission.updated — Commission updated, such as a change of its status.
  • commission.released — Commission released to the business, after the settlement of the installment. Its status is released when the installment was fully settled, or partialy-released when only part of it was settled so far. A commission that is partialy-released can be released again later, with a new commission.released.

In commission.released, orderItem and recurrence are not sent. Use payment.id to find the order or the recurrence of the commission.

Commissions of a subscription

Every recurrence of a subscription has its own payment and its own commissions, so commission.released is sent for every recurrence.

  • installment is the installment of the card payment, not the number of the recurrence. From the second recurrence on, each recurrence is charged in a single installment, so it is 1.
  • To find the recurrence of a commission, match payment.id with payments[].id of the recurrence events. The number of the recurrence is recurrence in those events.

Events

  • commission.created
  • commission.updated
  • commission.released

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

Payloadrequired

Webhook payload with the data of the commission.

Content typeapplication/jsonobject

  • eventstring

    Name of the event received.

    Possible values:commission.createdcommission.updatedcommission.released

  • occurredAtstring · date-time

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

  • payloadobject

    Data of the commission at the moment of the event. An object that is not available is absent.

    Show child attributesHide child attributes
    • idstring · uuid

      Commission ID.

    • receiverobject

      Business that receives the commission.

      Show child attributesHide child attributes
      • idstring · uuid
      • namestring
    • receiverRolestring

      Role of the business in the sale.

      Possible values:producerco-produceraffiliateplatform

    • statusstring

      Status of the commission.

      Possible values:pendingpaidreleasedpartialy-releasedcanceledreversedrefundedcharged-back

    • grossValueInCentsinteger

      Gross value of the commission, in cents.

    • netValueInCentsinteger

      Net value of the commission, in cents.

    • taxInCentsinteger

      Fees of the commission, in cents.

    • interestValueInCentsinteger

      Interest of the installments in the commission, in cents.

    • installmentinteger

      Installment of the card payment that the commission refers to. It is not the number of the recurrence of a subscription.

    • settlementDatestring

      Expected settlement date of the installment.

    • paymentobject

      Payment of the commission. Use id to link the commission to an order payment or to a recurrence.

      Show child attributesHide child attributes
      • idstring · uuid

        Payment ID. In a subscription, it is equal to one of the payments[].id of the recurrence.

      • externalIdstring
      • statusstring
      • paymentMethodstring
      • valueInCentsinteger
      • valuePaidInCentsinteger
      • installmentsinteger
      • methodReferenceCodestring
      • descriptionstring
      • providerstring
    • orderItemobject

      Order item of the commission, when it comes from an order. Not sent in commission.released.

      Show child attributesHide child attributes
      • idstring · uuid
      • orderIdstring · uuid
      • externalReferenceIdstring
      • orderItemTypestring
      • namestring
      • quantityinteger
      • unitValueInCentsinteger
    • recurrenceobject

      Recurrence of the commission, when it comes from a subscription. Not sent in commission.released.

      Show child attributesHide child attributes
      • idstring · uuid
      • subscriptionIdstring · uuid
      • recurrenceinteger
      • statusstring
      • billingDatestring · date-time
      • dueDatestring · date-time
      • recurrenceValueInCentsinteger
    • planDetailsobject
      Show child attributesHide child attributes
      • planNamestring
      • descriptionstring
    • releasedAtstring · date-time

      When the commission was released. Set in commission.released.

    • releasedRatioPercentagenumber

      Percentage of the value of the installment that was settled. Sent in commission.released when Easyflow knows the original value of the installment.

    • installmentFeesobject

      Fees of the installment, in cents. Absent when they are not available.

      Show child attributesHide child attributes
      • mdrInCentsinteger
      • fixedFeeInCentsinteger
      • anticipationInCentsinteger
      • otherFeesInCentsinteger
      • totalFeesInCentsinteger
      • sellerAbsorbedInterestInCentsinteger
      • installmentPaidByBuyerInCentsintegernullable
    • createdAtstring · date-time
    • updatedAtstring · date-time