The Next-Gen payment profile allows much more flexibility and customization that the original Basic payment profile. However, if you do not require an advanced iteration of the payment profile, we recommend using the Basic payment profile type, found here.
The payment flow builder is the visual editor, allowing you to insert, drag, drop and connect nodes. Each node has a specific purpose, either as an action or a filter.
The flow builder is built around nodes, which are able to be connected by selecting a node output and dragging to another nodes' input.
There are three node types and each type has a sub type.
All nodes have a single input, except for the Payment Request start node.
Depending on the node type, there can be zero, one, two or three outputs. The node sub type determines the node output.
Connect nodes by selecting a nodes' output and dragging to another nodes' input.
There is a single start node type, the Payment Request node.
The only start node available is the Payment Request node type. Every Next-Gen profile must begin with a start node in the visual builder. Drag and drop the start node to begin building your payment flow.
Only one start node is allowed, and is the starting point for the remainder of the flow.
All filter nodes have a green and red output. The green output is if the filter passed, the red output is if the filter failed.
The attempt count filter allows you to filter based on the number of attempts specific to the entity being processed. You have the option to filter whether the attempt count is less than or equal to, or greater than or equal to. Note: Applies to initial sale (not pending sale recovery), and subscription renewal request types only. Request types and attempt calculations explained below.
Example Node
In the example above, we are filtering based on the number of attempts being greater than or equal to 4. If the number of attempts is greater than or equal to 4 (passed), the green output would be followed. If the number of attempts is less than 4 (failed), the red output would be followed.
The BIN profile filter allows you to filter based on the first 6 of the current credit card being used for the payment request via BIN profile. You have the option to filter on whether a card BIN is within a BIN profile, not within a BIN profile, or both.
Example Node
In the example above, we are filtering based on the first 6 digits of the credit card being used to process payment. We previously created BIN profiles, with one more BIN's in each. If the card first 6 is in BIN Profile 42 and not in BIN Profile 49, then the green output would be followed, else the red output.
The campaign filter allows you to filter based on the campaign associated with the request. You have the option to filter on whether the request is associated with a campaign, not associated with a campaign, or both.
Example Node
In the example above, we are filtering based on the campaign being one and not the other. If the campaign associated with the request is Adwords Campaign, and is not the Facebook Campaign, then the green output would be followed, else the red output.
The card type filter allows you to filter based on the card type being used to process payment. You have the option to filter on whether the card type is one or more types, is not one or more types, or both.
Example Node
In the example above, we are filtering based on the card type being Maestro. If the card type is Maestro then the green output would be followed, else the red output.
The currency filter allows you to filter based on the currency associated with the request. You have the option to filter on whether the currency is, is not, or both.
Example Node
In the example above, we are filtering based on the currency being one and not the other. If the currency associated with the request is USD, and is not EUR, then the green output would be followed, else the red output.
The customer group filter allows you to filter based on the customer group(s) of the customer associated with the request. You have the option to filter based on whether a customer is in a customer group, not in a customer group, or both.
Important: This should be used as a historical filter for pre-existing customers. Customer groups do not apply to customers instantly. Please read the list of caveats below carefully.
Caveats
Example Node
In the example above, we are filtering based on the customer associated to the request not being in a specific group. If the customer associated with the request is not in the Lifetime value under 100 customer group, then the green output would be followed, else the red output.
The gateway response filter allows you to filter based on the most recent response received from a gateway in the current payment request. Enter one or more terms, each separated by a new line, which must be contained in the gateways response in order for the filter to pass. Useful for determining whether to continue and/or perform further actions.
Note: The profiles' settings for kill terms and max attempts, if enabled, will still apply.
Example Node
In the example above, we are filtering based on either of two specific terms/phrases being found within the most recent gateway response. If either insufficient funds or pick up card are found in the gateways' response, then the green output would be followed, else the red output.
The metadata filter allows you to filter based on the metadata contained within one or more sources. Select the metadata source, i.e. where to search for metadata entries. Payment Request is any metadata contained in a current Initial Sale API call. You have the option to filter on whether the source has or does not have specific metadata names and values.
Metadata Sources
Example Node
In the example above, we are filtering based on the initial sale request having the is_upsell metadata name having a value of true. If the metadata matches, i.e. [{"name": “is_upsell”, “value”: “true”}]
then the green output would be followed, else the red output.
The payment amount filter allows you to filter based on the payment amount that is to be processed. You have the option to filter whether the amount is less than or equal to, or greater than or equal to a certain amount.
Example Node
In the example above, we are filtering based on the request payment amount being less than or equal to $300.00. If the request is less than or equal to $300.00 the green output would be followed, else the red output.
The process payment count filter allows you to filter based on the number of Process Payment nodes executed in the current flow request. I.e. the number of times that payment was attempted already in the request. You have the option to filter whether the process payment count is less than or equal to, or greater than or equal to a certain number.
Example Node
In the example above, we are filtering based on the number of payment nodes executed in the current flow request. If the number of process payment nodes executed is less than or equal to 3, the green output would be followed. If the number of process payment nodes executed is greater than 3, the red output would be followed.
The product group filter allows you to filter based on the product(s) contained in a product group associated with the request. You have the option to filter on whether a product is in a product group, not in a product group, or both.
Example Node
In the example above, we are filtering based on the requests' product being within the Subscription Group. If one or more request products are in the Subscription Group, the green output would be followed, else the red output.
The request type filter allows you to filter based on the request type associated with the request. You have the option to filter on whether the request type is, is not, or both.
Request Types
Example Node
In the example above, we are filtering based on the request type being Subscription Renew. If the request type is Subscription Renew, the green output would be followed, else the red output.
The merge filters node allows you to combine multiple filters. Connect the grey output (third output) of a Merge Filters node to the input of one or more filter nodes to merge all connected as one. All filters connected (merged) to the grey output must pass in order for the merge filter to pass.
Node Outputs:
Example Node
In the example above, we are merging multiple filters into a single filter. We used the grey output node to connect the Request Type and Campaign filters. If the request type is Initial Sale and the request is associated with the Facebook Campaign, the merge filters green output would be followed, else the red output.
You may wish to have multiple filters checked separately, with certain ones checked before others, when at the same point in a flow. The same point being the part of the flow where multiple filters coincide at the same time. Every filter has a filter priority, allowing you to tell RevCent which filter to check before others when at the same point.
Important: The lower the number, the higher up the list, i.e. checked first. For example, a filter with priority 0 will be checked before a filter with priority 1. Filters with the same priority are checked in random order at time of processing.
Filter | Priority Value | Explained |
---|---|---|
Filter A | 0 | The filter priority value is 0. Therefore it will be checked before the other filters with a higher priority value. |
Filter D | 3 | The filter priority value is 3. Therefore it will be checked after Filter A, but before Filter U. |
Filter U | 4 | The filter priority value is 4. Therefore it will be checked after Filter A and Filter D. However, since it has the same priority as Filter B, either Filter U or Filter B will be checked at random after Filter D. |
Filter B | 4 | The filter priority value is 4. Therefore it will be checked after Filter A and Filter D. However, since it has the same priority as Filter U, either Filter U or Filter B will be checked at random after Filter D. |
The following action nodes are available.
Payment flow will be aborted. Use this node if you want to stop the flow and return an error for a specific campaign, gateway response, failed filter, etc. If a payment has been attempted, the decline results will be returned, else an error will be returned. Note: The payment profiles' settings for kill terms and max attempts, if enabled, will still apply.
The Choose a Gateway node determines the gateway to be used to process a payment request. Several settings and options are available.
Select the source, either from a list of gateways, or a list of gateway groups.
Options:
Select one or more gateway groups. All gateways within selected gateway groups will be merged, ignoring each gateway groups' choice method and gateway sort order. The merge will create a single list of unique gateways, sorted randomly. The Selection Method setting will determine the final gateway.
When selecting Gateways as the selection source, two boxes will appear. The first box is for choosing gateways, the second is for sorting chosen gateways.
You choose the gateway(s) you want by clicking the blue down arrow.
When you click the blue down arrow in the Select Gateways box, this will add the gateway to the Gateway(s) Selected list. This is the list of gateways that RevCent will choose from. You can also sort them by dragging up or down.
Select the method in which a gateway will be chosen from the list of gateways from selected gateways/gateway groups.
Options:
Select one or more conditions in which a gateway should be preferred. CVV Bonus is if a gateway was used in an initial sale where the CVV was passed.
Note: Any subscription profile prefer or trial prefer settings outside of this profile take precedence, i.e. override this setting.
Options:
Terminology:
Select one or more conditions in which a gateway should not be chosen.
Options:
Terminology:
Select one or more gateway groups in which once a decline has occurred for any gateways within the group, no gateways in the same group can be chosen.
Select one or more gateway groups in which once an approval has occurred for any gateways within the group, no gateways in the same group can be chosen.
Select one or more gateway groups in which a chosen gateway cannot not be in. This is meant to be used as a block list via gateway groups.
Select one or more gateways to use as a failsafe, in case no gateways could be chosen. A gateway will be selected randomly and used regardless of any revenue or time rules.
Do you want to decrease the payment amount before processing? Will only apply to additional payment attempts during a payment request, i.e. will be ignored for the first payment attempt.
Modify the original transaction amount by a percentage decrease.
Modify the original transaction amount by a fixed dollar amount decrease.
Do you want to swap to another card if one is available? Will only apply to additional payment attempts during a payment request, i.e. will be ignored for the first payment attempt. Note: Only implemented for subscription renewal and trial expiration requests, not sale requests.
Select the entity(s) to insert the metadata entries into. The insert metadata node is unique in that it does not have an output. It is a side action meant to be conducted along with the execution of other filter or action nodes.
Use shortcodes for dynamic text. Must follow the same format as shown, i.e. surrounded by hashtags #shortcode#
#gateway_id#
The ID of most recent gateway chosen.#gateway_name#
The name of the most recent gateway chosen.
Example Node
In the example above, we are inserting two separate metadata entries into the sale related to the request. Notice the second entry using a shortcode, which is dynamic.
If a gateway has been chosen in a prior node, you can officially process the payment. This is a static node that will send a payment request to the chosen gateway. If the payment is successful, the flow will automatically end and the success response returned. If unsuccessful you can use the red output to connect to further nodes, else the flow will end and the decline response will be returned.
You can choose to run a function when processing a payment request. The function can return a specific response, or can run separately without interrupting the payment flow.
Important: This is a highly advanced feature and is only recommended to use if you have an experienced developer and fully understand the Next-Gen flow process.
Select the function you have created.
Select the run method. This determines whether the payment request will wait for a response, or continue and run the function separately.
Options:
Warning when using the “Wait For Response” method:
When the function is executed, it will receive the following event.data
object which contains the details of the current flow request. The item details of the flow request is contained in the event.data.item_details
object.
{
"item_type": "sale",
"item_id": "KnZaE2AZ85SoEX5g5ZbY",
"item_event": "payment_request",
"item_details": {
"request": {
"type": "sale",
"method": "create",
"metadata": [
{
"name": "landing_page",
"value": "v1",
"entry_date": "2023-10-17"
}
]
},
"entity": {
"item_type": "sale",
"item_id": "KnZaE2AZ85SoEX5g5ZbY",
"metadata": [
{
"name": "landing_page",
"value": "v1",
"entry_date": "2023-10-17"
}
]
},
"customer": {
"id": "qZoyanPoLBI10GlLloaz",
"first_name": "George",
"last_name": "Washington",
"address_line_1": "1600 Pennsylvania Ave",
"address_line_2": "",
"city": "Washington",
"state": "DC",
"zip": "20500",
"email": "george@whitehouse.gov",
"phone": "1234567890"
},
"customer_card": {
"id": "pgdl8NydEOurjPYoYdmy",
"first_6": "424242",
"card_type": "visa",
"bin_details": {
"bin_bank": "CAPITAL ONE N.A.",
"bin_phone": "1-800-227-4825"
}
},
"campaign": {
"id": "JN0Zpj7RGJiwKqAnRoy6",
"name": "Twitter Campaign"
},
"payment_profile": {
"id": "1rzGgRKJ90UGM9kZMbKY",
"name": "Flow Profile"
},
"payment_amount": 10.7,
"products": [
{
"id": "LYE26YQPv5f5VbJmlpRR",
"name": "AV 2017",
"sku": "av_2017",
"internal_id": "av_2017",
"quantity": 1,
"price": 29.99,
"amount": 29.99,
"is_trial": true,
"metadata": []
}
],
"shipping": [
{
"amount": 10,
"provider": "ups",
"provider_method": "ups_standard"
}
],
"tax": [
{
"name": "Tax Profile",
"amount": 0.7
}
],
"gateway_history": {
"current": {
"declined": [
"8rNnkY45R4Hw1ZBg1yYB"
]
},
"customer": {
"approved": [],
"approved_cvv": [],
"declined": [
"8rNnkY45R4Hw1ZBg1yYB"
],
"declined_cvv": []
},
"entity": {
"approved": [],
"approved_cvv": [],
"declined": [
"8rNnkY45R4Hw1ZBg1yYB"
],
"declined_cvv": []
},
"gateway_group": {
"approved": [],
"approved_cvv": [],
"declined": [
"GOGaPRql9oUAAkrm5Ll9"
],
"declined_cvv": []
}
},
"node_id": "837cabc6-46d3-46e5-869d-9819e6af8464",
"next_nodes": {
"actions": [
{
"id": "43965f05-887a-4e70-8646-0410440a3494",
"name": "action_process_payment",
"node_type": "action",
"node_note": "node note"
}
],
"filters": []
},
"current_step": 2,
"step_array": [
{
"step_action": "initial",
"step_amount": 10.7,
"step_card": "pgdl8NydEOurjPYoYdmy",
"step_gateway": "NMI",
"step_gateway_id": "8rNnkY45R4Hw1ZBg1yYB",
"step_gateway_response": "",
"step_modifier": "",
"step_num": 1,
"step_result": "Declined",
"step_setting": "initial",
"step_source": "flow",
"step_transaction": "JN7nVvo0PdtRr2bkbN1X",
"swap_card": false
},
{
"step_action": "next",
"step_amount": 10.7,
"step_modifier": "",
"step_num": 2,
"step_setting": "",
"step_source": "flow",
"swap_card": false
}
],
"flow_path": [
{
"order": 1,
"id": "8f6d288f-697e-4c99-92c5-7551ba43c547",
"node_type": "start",
"name": "start_payment_request",
"step_num": 1,
"result": {
"code": 1,
"message": "Processed"
}
},
{
"order": 2,
"id": "91da1872-0511-4847-8a1b-a33c603e748b",
"node_type": "filter",
"name": "filter_request_type",
"step_num": 1,
"result": {
"code": 1,
"message": "Filter passed."
}
},
{
"order": 3,
"id": "628ee271-cbe2-45a0-8d68-48d0ab8bdf9c",
"node_type": "action",
"name": "action_choose_gateway",
"step_num": 1,
"result": {
"code": 1,
"message": "Gateway chosen.",
"failsafe_gateway": false,
"gateway_id": "8rNnkY45R4Hw1ZBg1yYB",
"gateway_name": "NMI"
}
},
{
"order": 4,
"id": "0b8a520e-a74e-4516-8a5b-807337687847",
"node_type": "action",
"name": "action_process_payment",
"step_num": 1,
"result": {
"code": 2,
"message": "Payment declined."
}
},
{
"order": 5,
"id": "837cabc6-46d3-46e5-869d-9819e6af8464",
"node_type": "action",
"name": "action_custom_function",
"step_num": 2,
"result": {}
}
]
}
}
The event.data.item_details
properties:
Property | Explained | Format |
---|---|---|
request | Contains details about the request being processed. For initial sale requests, any metadata sent in the API call is included. | Object |
entity | Contains details regarding the entity related to the request. For example, the entity for an initial sale request would be the specific sale, the entity for a subscription renewal request would be the related subscription. | Object |
customer | Contains details regarding the customer related to the request. | Object |
customer_card | Contains details regarding the customer card related to the request. | Object |
campaign | Contains details regarding the campaign related to the request. | Object |
payment_profile | Contains details regarding the payment profile related to the request. | Object |
payment_amount | The payment amount to be processed for the flow request. | Float |
products | An array of product objects specific to the flow request. | Array |
shipping | An array of shipping objects specific to the flow request. | Array |
tax | An array of tax objects specific to the flow request. | Array |
gateway_history | The gateway and gateway group history specific to the request, entity and customer. Useful for determining the next gateway or gateway group to use to process payment, or deciding action to take based on history. | Object |
gateway_history.current |
An array of declined transaction gateway IDs specific to the current request. This is all gateways that declined a payment during the current flow request being processed.
|
Object |
gateway_history.customer |
Multiple arrays of transaction gateway IDs specific to the customer related to the request, for both current and past transactions.
|
Object |
gateway_history.entity |
Multiple arrays of transaction gateway IDs specific to the entity related to the request, for both current and past transactions.
|
Object |
gateway_history.gateway_group |
Multiple arrays of transaction gateway group IDs specific to the customer related to the request, for both current and past transactions. Only applicable if using gateway groups with gateways associated within.
|
Object |
node_id | The current Run Function node ID. | String |
next_nodes | The nodes, with node type, connected to the outputs of the Run Function node. Useful when parsing and then providing the next_node_id property in your response object. | Array |
current_step | The current step being processed in the step array. | Integer |
step_array | The step array, containing the current step object any past steps in which payment was attempted. Useful for determining future actions based on past payment attempts during the request. | Array |
flow_path | The current flow path taken leading up to the execution of the Run Function node. Contains an ordered list of nodes processed with individual results. You can parse the flow path to determine any filters passed/failed, prior payments, etc. | Array |
If you are using the Wait For Response run method, you must return a response object. Not all properties are required. If no properties are provided, RevCent will consider the node as having “passed", without taking any action, and will follow the green output. If you do not need to have the response take action within the flow, then use the Queue And Continue run method instead of Wait For Response.
Important: Only provide the properties specific to what you want to do when the Run Function node receives the response.
{
"next_node_id": "43965f05-887a-4e70-8646-0410440a3494",
"next_output": "1",
"set_gateway_id": "bOLjn0yvKpUp10qK298R",
"selection_method": "evenly_distribute",
"choose_gateways": ["2r7zOBMldVIomKNdKZoG"],
"choose_gateway_groups": ["GOGaPRql9oUAAkrm5Ll9"],
"custom_error": "Card CVV Invalid"
}
Property | Explained | Format |
---|---|---|
next_node_id | If you want to designate a specific next node connected to the output of the Run Function action node. View available output nodes via the event.data.next_nodes actions array and/or filters array. | String |
next_output | If you want to designate the output of the Run Function action node. 1 is the green output, 2 is the red output. Possible values: 1, 2. | String |
set_gateway_id | If you want to set a specific gateway as the current step gateway for payment processing. Note: a Process Payment node needs to be in the output of the current function node in order to process payment. | String |
select_method | If providing either choose_gateways or choose_gateway_groups, optionally set the selection method, which will override the next Choose Gateway nodes' selection method. Note: a Choose Gateway node needs to be in the output of the current function nodes' flow in order to override the selection method. Possible values: evenly_distribute, round_robin, random. | String |
choose_gateways | Provide an array of gateway ID's which will override a next Choose Gateway nodes' gateway selections. Note: a Choose Gateway node needs to be in the output of the current function nodes' flow in order to override the gateways. | Array |
choose_gateway_groups | Provide an array of gateway group ID's which will override a next Choose Gateway nodes' gateway group selections. Note: a Choose Gateway node needs to be in the output of the current function nodes' flow in order to override the gateway groups. | Array |
custom_error | Provide a custom error response, which will be passed to a following abort flow node. The abort flow node will respond to the API request with either a message property or a custom_error property. Please read the Custom Error Message section thoroughly to understand how to parse and potentially display custom errors and messages to customers. Important: the function response must also return a next_node_id property, with the next_node_id being a following abort flow node. Ex. function response: {"next_node_id": “0b8a520e-a74e…”, “custom_error”: “Card CVV Invalid”} |
String |
Below describes how the Next-Gen profile flow is processed by RevCent when a payment request is received.
A payment request is received and is to be processed by the Next-Gen profile flow. The Payment Request start node is the beginning of the flow. RevCent begins at the Payment Request node output and continues to other nodes.
RevCent will follow the output of a current node to any additional nodes connected. The next node to be processed is determined using abort flow, filter first passed, filter first failed, then action, in that order.
You can output from one node to multiple nodes, however there is node type and outcome to consider. Below is the node type order.
Order | Node Type | Explained |
---|---|---|
1 | Abort Flow | If an Abort Flow node is present in the output of a node, it will take precedence over all other output nodes. |
2 | Filter Node Passed | Filter nodes are checked first. You can set a priority for each individual filter to ensure that certain filters are checked before others when at the same point in the flow. The first passing filter with a green output connection is followed to the next node. Important: Filters are given first priority as the success or failure of a filter may be intended for further processing the flow and not conducting immediate action. |
3 | Filter Node Failed | If no filters pass, RevCent will then check any filter nodes for red outputs with connection(s) to other nodes, following filter priority. If any of the failed filter nodes have a connecting red output, then the red connection is followed to the next node. Important: Filters are given first priority as the success or failure of a filter may be intended for further processing the flow and not conducting immediate action. |
4 | Action Node | If no filters passed and none of the failed filters have red outputs connecting to further nodes, then the first available action node is considered the next node. |
5 | No Next Node | If RevCent does not find a next node, the payment flow ends and any failed payment attempt(s) are returned to the API caller. If payments have been attempted and declined, a decline response will be returned. If no payment attempts have been made, a generic error will be returned. |
Below are scenarios with explanations of how nodes would be processed. Of course there are different business needs and requirements users may have, and the payment flow builder may be confusing. If you need help building your flow, feel free to contact us.
Below shows an example in which you want to:
Below is an example if you wanted to route to different gateways depending on the number of payment attempts for a sale. You want to:
Below is an example if you wanted to take to different actions when a payment is declined, depending on the decline response, utilizing filters to parse a gateways' response.
Below is an example if you wanted to take to different actions when a payment is declined, utilizing a function to parse a gateways' decline response. The proceeding output to be taken is determined by a Run Function nodes' function response. The flow will send a request to a specific function, waiting for the function to return and proceeding according to the function response. Read more about the Run Function node, including the event data a function will receive as well as the proper function output required.
For brevity, we will assume the function code parses the event data, and will determine one of three possible outcomes:
{"next_node_id": “43965f05-887a-4e70-8646-0410440a3494”}
then the flow will know to route to the next node matching that ID. In this case it would be the Abort Flow node.{"set_gateway_id": “bOLjn0yvKpUp10qK298R”, "next_node_id": “f96f16ba-2cab-4ae5-9932-4f548cd479ba”}
then the flow will know to set the current steps' gateway to the gateway ID returned, and then route to the next node matching that ID. In this case it would be the Process Payment node.{"next_output": “2”}
then the flow will know to proceed using the second (red) output and choose any qualifying nodes along the output_2 path.
There are additional settings within the Next-Gen payment profile. These additional settings are given precedence over the payment flow. I.e. if these settings are triggered, the payment flow either stops or does not begin at all.
You have the ability to cancel the payment profile flow if a declined transaction has specific terms/phrases/words in a step gateways' decline response. This will also cancel/void the related sale being attempted. Note: Only applies to initial sale attempts, not renewals or trial expirations.
For example, if a gateway declines a transaction, and the gateways' decline response contains the words “pick up card”, you can add the term “pick up card” to your list of kill terms, which will stop the payment flow, kill the sale, and prevent any future purchase attempts for the specific sale.
RevCent does not remember a customers history related to kill terms. For example, if a customer attempts Sale #1, gets declined with a matching kill term, Sale #1 will be cancelled/voided. If the same customer creates a completely new sale, i.e. Sale #2, previous sale cancellations such as Sale #1, will not carry over and automatically cancel Sale #2.
Important: Any kill terms entered that match a term within a gateways' decline response will immediately stop the payment profile flow and cancel/void the related sale. Kill terms are meant to match specific decline reasons, thus preventing further payment attempts and pending sale recovery. If you enter a basic kill term, such as “the” or “and”, you will most likely kill all declined sales.
You have the ability to cancel/void a sale if the number of declined payment profile attempts reaches a certain number. Only applies to initial sale attempts, not renewals or trial expirations.
Note: A payment profile attempt is the considered to be the completion of all steps within a payment flow and not an individual step within a flow. I.e. an attempt is the entire flow itself.
Example: If you have 3 steps within a flow, and you set max attempts to 3, then it will take 9 declines for the max attempts to be reached.
The Next-Gen payment profile offers custom error responses as well the ability to process decline responses. This section is intended to help developers integrate error messages and display specific messages to visitors attempting to check out.
Please make sure that the shopping cart server is able to process the Custom Error Message scenario below.
When a RevCent user is processing a payment using a Next-Gen profile, they have the option to abort payments attempts and return a custom response of their own. Depending on whether a payment was declined, or not attempted at all, there are two types of custom errors that may exist in the API response. These custom error types do not always exist, so please validate and check if exists or not.
There are two types of custom errors:
custom_error
is present. Payment was declined.“error_code”: “E0690”
exists and a non-empty message
property is also present. No payment was attempted
It is recommended that in cases where code is not 1 and a RevCent API response has a non-empty custom_error
property, display the customer the custom_error.
Example API Response:
{
"api_call_date": "2023-10-19T23:58:08+00:00",
"api_call_id": "k6wEkpq5GLHLJBV6JQvk",
"api_call_unix": 1697759888,
"code": 2,
"payment_profile_results": [...],
"custom_error": "This is a non-E0690 custom error message returned by the Next-Gen profile."
}
Notice:
In the case above where both are true, the contents of the custom_error
should be displayed to the customer.
It is recommended that in cases where code is not 1, the API response has “error_code”: “E0690”
and a non-empty message
property, display the customer the message
property.
Example API Response:
{
"api_call_date": "2023-10-19T23:58:08+00:00",
"api_call_id": "k6wEkpq5GLHLJBV6JQvk",
"api_call_unix": 1697759888,
"code": 0,
"error_code": "E0690",
"message": "This is a custom error message returned by the Next-Gen profile."
}
Notice:
In the case above where all are true, the contents of the message
property should be displayed to the customer.