In the Rules Engine, there are two event categories — system events, which are pre-built in Rebilly and cover most common use-cases, and custom events, the ones you can create by yourself. Each event has a different set of actions available for rulesets creation. You can learn more about action types here.

System Event Types

Here’s an overview of all the system event types:

  • Dispute created
  • Gateway Account Requested
  • Invoice Paid
  • Invoice Past Due
  • NSF Response Received
  • Payment Card Expired
  • Renewal Invoice Payment Declined
  • Risk Score Changed
  • Subscription Activated, Canceled, Created, and Renewed
  • Transaction Declined, Discrepancy Found, Process Requested, Processed

To view the full list of System Events, go to Settings > Rules Engine > System Events

Dispute Created

This event triggers when a dispute (chargeback) is added to one of your transactions. The most common use-cases for processing this event are stopping active subscriptions for a customer who started a dispute or blacklisting this customer by a certain attribute.

Actions available for processing this event:

  • Blacklist Customer ID
  • Blacklist Email
  • Blacklist Fingerprint (device)
  • Blacklist IP Address
  • Blacklist Payment Card
  • Stop Subscriptions
  • Send Email
  • Trigger Webhook

Gateway Account Requested

When your customer attempts to make a transaction for the first time, you can create a Rule to assign the most appropriate gateway account to process it depending on certain conditions (Payment Card attributes, its bank’s country, etc).

Actions available for processing this event:

  • Pick Gateway Account
  • Request KYC documents
  • Send Email
  • Trigger Webhook

Invoice Paid 

When an invoice is paid, you may want to send an email with the invoice to the customer or trigger a webhook.

Actions available for processing this event:

  • Send Email
  • Trigger Webhook

Invoice Past Due

When an invoice is past due, you may want to send an email to the customer to remind them to pay the invoice.

Actions available for processing this event:

  • Send Email

NSF Response Received

When a non-sufficient funds response is received, you may want to send an email to notify your customer or add a NSF fee.

Actions available for processing this event:

  • Send Email
  • Add NSF Fee

Payment Card Expired

When a Payment Card of a certain customer expires, you might want to notify that customer so they update their billing info, or you can have the system guess a new expiration date. For each guess, the system attempts a $1 authorization. On successful authorization, the customer's payment card will be updated to use that card.

Actions available for processing this event:

  • Guess Payment Card Expiration
  • Send Email
  • Trigger Webhook

Renewal Invoice Payment Declined

When a renewal invoice (a recurring invoice for a plan/product, charged automatically) payment is declined, you might want to reach out to them to let them know their payment was declined (and why) or schedule a payment retry. 

Actions available for processing this event:

  • Schedule Payment Retry
  • Send Email
  • Trigger a Webhook

Risk Score Changed

Each transaction has a numeric risk score attribute, and changing it triggers this event. A risk score may change in actions related to other events. For example, the Transaction Process Requested and the Transaction Processed events can both trigger this event if you added a rule set that would change a risk score. Here you can check a risk score value - and if it’s greater than a certain allowed amount, you might want to notify a risk agent to take a closer look at the Transaction in question, or perform a blacklist action on a customer who initialized that suspicious transaction.

Actions available for processing this event:

  • Blacklist Customer ID
  • Blacklist Email
  • Blacklist Fingerprint (device)
  • Blacklist IP Address
  • Blacklist Payment Card
  • Send Email
  • Trigger Webhook

Subscription Activated

When a subscription is activated, you may want to send a confirmation email or trigger a webhook.

Actions available for processing this event:

  • Send email
  • Trigger Webhook

Subscription Canceled

This event triggers when a certain customer’s subscription has been canceled. You might need to notify third-party services to disallow access for that customer since they have no subscription (the most common use-case for that is using a “Trigger Webhook” action). You can also send emails in the case that there are people to be notified. Another thing that you might want to do when a subscription is canceled is canceling all scheduled payments for that customer. There is a specific action available for this purpose.

Actions available for processing this event:

  • Cancel Scheduled Payments
  • Send Email
  • Trigger Webhook

Subscription Created

This event triggers when a certain customer’s subscription is created. You may want to send a confirmation email to the customer or trigger a webhook.

Actions available for processing this event:

  • Send Email
  • Trigger Webhook

Subscription Renewed

This event triggers when a certain customer’s subscription has been renewed. When a subscription gets renewed, you might want to schedule a payment for that subscription at a certain time.

Actions available for processing this event:

  • Schedule Payment
  • Send Email
  • Trigger Webhook

Transaction Declined

When a transaction is declined, you may a schedule payment retry. There can be multiple retry attempts at a certain schedule - and instructions for a situation where all payment retries failed. See more about scheduling payment retries and how to configure them in our Help Section article about Action Types.

Actions available for processing this event:

  • Schedule Payment Retry
  • Send Email
  • Trigger a Webhook

Transaction Discrepancy Found

When a transaction discrepancy is found, this event gets triggered. You may want to send an email to your customer or trigger a webhook. Actions available for processing this event:

  • Send Email
  • Trigger a Webhook

Transaction Process Requested

This event happens right before a Transaction process is initialized. The system has a chance to review the Transaction and perform an action basing on its attributes. The most common use-case would be increasing Risk Score for suspicious Transactions - for example, if a Transaction has a billing address in a country that is considered as high-risk for online fraud.

Actions available for processing this event:

  • Add Risk Score
  • Send Email
  • Trigger Webhook

Transaction Processed

This event occurs after a transaction was processed by a payment gateway. That means at this point the system knows about the transaction's result — whether it was approved or declined, and if it was declined, the decline reason. Based on that information, you might want to blacklist a customer if there was a decline reason that suggests fraud. You might also want to add a risk score to that particular transaction marking it as suspicious. If the decline reason was not linked to fraud, you can attempt to retry payments to help recover revenue. 

Actions available for processing this event:

  • Add Risk Score
  • Blacklist Customer ID
  • Blacklist Email
  • Blacklist Fingerprint (device)
  • Blacklist IP Address
  • Blacklist Payment Card
  • Stop Subscriptions
  • Send Email
  • Trigger Webhook

Custom Events

In Rebilly, you can create your own Event and configure its schedule and behavior. To create a Custom Event, go to Settings  > Rules Engine > Custom Events and click on the button “Add Custom Event”.

You will need to specify a name (Title) of your Custom Event and set up its schedule. There are 2 schedule types - the Event can happen on a certain date, or fire before or after a certain system event (enlisted in System Event select box).

In the Schedule section, you can specify whether your Event should happen on a particular date, or before/after a certain period of time-related system event triggers.

What’s Next?

Need Help?

If you have any questions or need assistance with implementing Rebilly, please contact us. You can email us at support@rebilly.com, chat with us or schedule a talk with a billing specialist here.

Did this answer your question?