There can be multiple actions for each event with the execution order from top to bottom. Here we'll go over what action types are available in the Rules Engine, and why you might want to use them.

Add Risk Score

This action is available for the Transaction Processed and Transaction Process Requested events.

The most common case of using this action is increasing the risk score for transactions with high velocity, or when the transaction billing address is in a country that is considered as high-risk for online fraud. A high-risk score can indicate that the transaction needs manual review by a risk-agent.

You can view the transaction’s risk score in transaction details via the app, or as a result of API call to transactions endpoint (see here for more detailed information.) Setting a negative value decreases the risk score.

To view a transaction’s risk score, go to the transaction section and click on the transaction ID. You can find the Risk Score in the “Risk Analysis” tile. 

Blacklist Actions

All blacklist-related actions have pretty much the same behavior. They take an attribute you specify (customer ID, IP address, etc) and add its value to a blacklist for a period of time called “Time To Live” (TTL). TTL is measured in seconds. Rebilly will not allow using a blacklisted value anywhere in the system until TTL is expired.

Blacklist actions are available for the Risk Score Changed,Transaction Processed and Dispute Created event types.

When should you use a blacklist action? 

For example, if a transaction is being disputed (a chargeback happens) you might want to block that payment card (or a customer) from making any further transactions or performing other actions with your system.

You can review all blacklisted entries and manage them with Rebilly App (going to Settings -> Blacklist) or by using our API, see specifications here for more details.

Available Blacklist actions:

  1. Blacklist Customer ID
  2. Blacklist Email
  3. Blacklist Fingerprint (unique device fingerprint)
  4. Blacklist IP Address
  5. Blacklist Payment Card

Values will be acquired from a transaction that triggers a related event - when it’s being disputed or when its risk score is changed. You can learn more about blacklists and greylists here. 

Cancel Scheduled Payments

This action is available for the Subscription Canceled event.

It will cancel all scheduled payments related to the canceled subscription.

Guess Payment Card Expiration

This action is available for the Payment Card Expired event.

This action will make up to 3 attempts to guess a new expiration date. For each guess, it will try a $1 authorization. On a successful authorization, the customer's payment card will be updated to use that card. The $1 authorization will be voided.

Pick Gateway Account

This action is related to the Gateway Account Requested Event. A gateway account is requested when a customer first attempts a transaction. Rebilly can assign a Gateway Account based on Gateway Account weight or Gateway Acquirer weight. The weight specifies a priority of Gateway Account or Acquirer.

Schedule Payment

This action is available for the Subscription Renewed event.

This action serves to plan a payment for renewed subscription. You can control the schedule as you like - immediately after an event has been triggered or at a certain day of the week.

Schedule Payment Retry

This action is available for the Transaction Declined event.

If a payment for a subscription failed for some reason, you can schedule multiple payment retries. The schedule of those retries is up to you - for example, you can do the first retry right after the payment has been declined, and a second one a day after.

To schedule a retry attempt, click the “Add Attempt” button, then set a retry time. You can also adjust payment amount on each retry - making the payment partial, or applying a discount.

You can also set up actions that will be taken after a final retry attempt gets failed - cancel the subscription in question or change its renewal time.

Send Email

This action is available for all events. You can send an email to a customer who is related to an event - for example, to a customer whose subscription was canceled.

By default, the emails will be sent from To send from the address of your choice, simply go into Advanced Settings and configure SMTP settings - specify SMTP host/port and set up Authorization type. This information should be provided by your SMTP server administrator, or by a service that provides sending emails via SMTP.

Next you can fill in email information - its text, subject, and recipients. The email can be a plain text or HTML.

There are a lot of placeholders you can use in this section, each of those related to a specific event. To view a list of placeholders, click List of Placeholders link on top of SMTP settings section. For example, a placeholder to fetch an email of a customer whose transaction was canceled would be ##{{}}.

You can send multiple emails with different content - just add them as separate “Send Email” actions.

Stop Subscriptions

This action is available for the Transaction Processed event.

You might want to cancel active subscriptions based on Transaction outcome. This action will cancel both active subscriptions and renewals immediately after the event has been triggered.

Trigger a Webhook

This action is available for all events.

A Webhook is an HTTP callback: an HTTP request used to provide other applications with real-time information, being sent when an event happens. You might want to use webhooks for third-party statistics or ad services - or to trigger more complex actions sequences using apps like Zapier.

You will need to specify a HTTP protocol and URL of the webhook endpoint. You can use GET or POST parameters in the request body - and utilize placeholders related to the event that was triggered (click List of Placeholders link to see all placeholders available for each specific event). For example, using ##{{}} will fetch a customer’s email for any subscription-related event (Subscription was Renewed, Subscription was Canceled).

If your webhook app requires authorization, don’t forget to set auth credentials. You can also and add any custom HTTP header your webhook app requires.

An event can trigger multiple webhooks - just add them as additional actions.

What’s Next? 

Need Help?

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

Did this answer your question?