You can group multiple gateways into a gateway group. This is useful when you have numerous gateways and wish to utilize them within payment profile cascades. Also enables you to use the same gateway multiple times within a payment profile cascade.
View all gateways by clicking the Payments > Credit Card > Gateway Groups link on the sidebar or going to https://revcent.com/user/gateway-groups
Create a new gateway group by clicking the Create New Gateway Group button when viewing all gateway groups or go to https://revcent.com/user/new-gateway-group
Enter a name for the gateway group. Required and must be unique.
Enter a description for the gateway group.
Set the status of the gateway group.
Edit an existing gateway group by clicking the edit button when viewing all gateway groups.
Enter a name for the gateway group. Required and must be unique.
Enter a description for the gateway group.
Set the status of the gateway group.
Select how RevCent will choose a gateway within the group when processing a transaction.
Options:
You have the ability to group gateways by simply selecting from a list, or dynamically based on rules.
Options:
You can set specific rules which will determine the gateways that enter or leave a group. This is a highly advanced feature and we recommend you read thoroughly or contact RevCent for help building your rules JSON.
RevCent will traverse the rules JSON, determine whether a gateway passes or fails, and rebuild the gateway group. This is done automatically when a transaction is created or modified as well as when you save a dynamic gateway group.
When rebuilding occurs:
Instead of choosing gateways individually, you instead choose other gateway groups as either your Source Groups, Deny Groups or Failsafe Groups.
Select gateway groups containing the gateways to individually analyze and insert if the gateway passes all rules. These will be the gateways you plan on potentially entering the group if each passes according to the rules JSON.
Select gateway groups containing gateways that should never be inserted regardless of rules or in source groups. I.e. a blacklist.
If the gateway group does not have any gateways after processing rules, then all gateways within selected failsafe groups will be automatically inserted.
The rules JSON is the most important part when creating a dynamic group. The JSON contains both an “and” array as well as an “or” array. This is to allow conditional logic with nesting. The array must contain one or more rule objects. RevCent will go through all arrays, parse each rule object to determine a pass or fail, and ultimately determine whether the gateway it is analyzing has passed.
Note: The rule JSON must always start with a single “and” array.
The “and” array is a conditional statement which allows you to group rule objects that must all pass in order for the condition to pass.
The “or” array is a conditional statement which allows you to group rule objects that at least one must pass in order for the condition to pass.
The rule object is an individual rule which either passes or fails. It must be contained within either an “and” array or an “or” array.
{
"parameter": "percent_declined",
"comparison": "less_than",
"comparison_value": 70,
"date_start": "12 hours",
"date_end": "now",
"transaction_type": [
"sale_create"
],
"if_no_result": "fail"
}
The parameter is the aggregate value you want calculated, then analyzed. It will be calculated using the time values, then compared using the comparison and comparison_value.
options:
The parameter is the aggregate value you want analyzed. It will be calculated using the time values, then compared using the comparison values.
options:
The set value to compare to the parameter using the comparison property.
The date_start and date_end properties determine the date range to be used when calculated the parameter. Both date_start and date_end are strings, either equals “now” or formatted as “[time_value] [time_unit] [relative] [relative_unit]”.
When using the later formatted time, there must be a space in between each partition (the parts in brackets) or parsing will fail. Formatted time always subtracts from the current time to derive the date. i.e. if “5 hours” then subtracts five hours from current time. If “1 months” then subtracts one month. Do not include brackets when creating formatted time.
If not using “now” as date_x, below are the formatted time partitions:
Examples:
"date_end": "now" // Will use the current time.
"date_start": "5 hours" // Will subtract 5 hours from current time.
"date_end": "4 weeks" // Will subtract 4 weeks from current time.
"date_start": "1 months start_of month" // Will subtract 1 month from current time, and use the start of the month.
"date_end": "1 days end_of day" //Will subtract 1 day from current time and use the end of the day.
You can limit the calculations to only transactions that are of a certain type. Provide one or more values to limit the transactions to a certain type or types. If transaction_type array is empty, then only sale_create transactions are calculated.
options:
When RevCent runs the calculation and does not receive a result, you can specify whether the lack of result is a pass or fail. For example, if a gateway does not have any transactions for a specific date range, then there will be no result.
options:
Below are individual rule objects, explaining whether the individual rule passes or fails. Rule objects are not used as the rule JSON itself, they are contained within either an “and” array or an “or” array within the final rule JSON.
The rule passes if the percentage of declined transactions within the past 6 hours for only initial sales is less than 50%. If the percentage of declined transactions for initial sales was greater than 50% then the rule would fail.
{
"parameter": "percent_declined",
"comparison": "less_than",
"comparison_value": 50,
"date_start": "4 hours",
"date_end": "now",
"transaction_type": [
"sale_create"
],
"if_no_result": "pass"
}
The rule passes if the percentage of transactions for the entire month prior with a chargeback is less than 4.5%. If the chargeback percentage is greater then 4.5% then the rule would fail.
{
"parameter": "percent_chargeback",
"comparison": "less_than",
"comparison_value": 4.5,
"date_start": "1 months start_of month",
"date_end": "1 months end_of month",
"transaction_type": [
"sale_create",
"trial_expire",
"subscription_renew"
],
"if_no_result": "pass"
}
The rule passes if the sum amount of approved transactions for initial sales, during the current day is less than $400. If the sum amount of approved transactions for initial sales is greater then $400 then the rule would fail.
{
"parameter": "sum_approved",
"comparison": "less_than",
"comparison_value": 400,
"date_start": "0 days start_of day",
"date_end": "now",
"transaction_type": [
"sale_create"
],
"if_no_result": "pass"
}
Below is an example of a final rule JSON. In the example we want to have a gateway enter a group if it has low declines or hasn't been used, but definitely does not have high chargebacks.
Either:
And:
{
"and": [
{
"or": [
{
"parameter": "percent_declined",
"comparison": "less_than",
"comparison_value": 50,
"date_start": "4 hours",
"date_end": "now",
"transaction_type": [
"sale_create"
],
"if_no_result": "pass"
},
{
"parameter": "sum_approved",
"comparison": "less_than",
"comparison_value": 400,
"date_start": "0 days start_of day",
"date_end": "now",
"transaction_type": [
"sale_create"
],
"if_no_result": "pass"
}
]
},
{
"parameter": "percent_chargeback",
"comparison": "less_than",
"comparison_value": 4.5,
"date_start": "1 months start_of month",
"date_end": "1 months end_of month",
"transaction_type": [
"sale_create",
"trial_expire",
"subscription_renew"
],
"if_no_result": "pass"
}
]
}
There are three rule objects, contained in different conditions, each condition being an array.