Methods and systems for dynamic routing of electronic transaction messages
Systems and methods are disclosed for dynamic routing of electronic transactions. One method comprises receiving a request message from a merchant system and determining a routing directive associated with the request message. Upon determining the routing directive, contextual data may be retrieved based on the routing directive. Then, a final destination payment processor may be determined based on the routing directive and the contextual data. The request message may be updated based on the final destination payment processor. The updated request message may then be transmitted to a downstream entity for further processing.
1 . A computer-implemented method comprising:
receiving, by a dynamic routing service, one or more requests from one or more devices, wherein the one or more requests include an identifier associated with an initial destination processor;
transmitting, by the dynamic routing service, the one or more requests to a payment gateway;
receiving, by the dynamic routing service, a response from the payment gateway indicating whether a connection is established with the initial destination processor, the connection being initiated by the payment gateway through a handshaking operation with the initial destination processor;
determining, by the dynamic routing service, a status code associated with at least one request from the one or more requests based on the response from the payment gateway, wherein the status code indicates an error in processing the at least one request by the initial destination processor;
determining, by the dynamic routing service, a plurality of candidate destination processors for the at least one request based on routing directives and contextual data;
splitting, by the dynamic routing service, the at least one request among the plurality of candidate destination processors based on processing loads of the plurality of candidate destination processors;
updating, by the dynamic routing service, each of the split requests with identifiers associated with the plurality of candidate destination processors; and
transmitting, by the dynamic routing service, the updated requests to the payment gateway, wherein the payment gateway generates at least one response indicating whether the plurality of candidate destination processors successfully processed the at least one request.
2 . The computer-implemented method of claim 1 , wherein determining the status code associated with the at least one request, further comprises:
determining, by the dynamic routing service, a time of receipt of the at least one request from the payment gateway; and
storing, by the dynamic routing service, the status code and the time of receipt of the at least one request in a database.
3 . The computer-implemented method of claim 1 , wherein the routing directives are configured based on one or more routing parameters, and wherein the one or more routing parameters include one or more of:
(i) a message type,
(ii) a routing directive type,
(iii) an error type, or
(iv) a destination selection criteria.
4 . The computer-implemented method of claim 1 , wherein the contextual data include one or more of:
(i) origination points for the at least one request,
(ii) destination for the at least one request,
(iii) temporal data associated with transmission of the at least one request to the payment gateway,
(iv) origination points for the at least one response,
(v) destination for the at least one response,
(vi) temporal data associated with a receipt of the at least one response,
(vii) status codes associated with the initial destination processor or the plurality of candidate destination processors,
(viii) temporal data associated with the status codes, or
(ix) historical and current fees associated with the initial destination processor or the plurality of candidate destination processors.
5 . The computer-implemented method of claim 1 , wherein updating each of the split requests with the identifiers associated with the plurality of candidate destination processors, further comprises:
updating, by the dynamic routing service, payload of each of the split requests for compatibility with a requirement or protocol of the plurality of candidate destination processors.
6 . The computer-implemented method of claim 1 , wherein transmitting the updated requests to the payment gateway, further comprises:
determining, by the dynamic routing service, a time of transmission of the transmitted requests to the payment gateway;
storing, by the dynamic routing service, the time of transmission of the transmitted requests in a database; and
receiving, by the dynamic routing service, the at least one response from the payment gateway, wherein the at least one response indicates successful processing of the transmitted requests by the plurality of candidate destination processors.
7 . The computer-implemented method of claim 1 , wherein transmitting the updated requests to the payment gateway, further comprises:
determining, by the dynamic routing service, a time of transmission of the transmitted requests to the payment gateway;
storing, by the dynamic routing service, the time of transmission of the transmitted requests in a database; and
receiving, by the dynamic routing service, the at least one response from the payment gateway, wherein the at least one response indicates an error in processing at least one of the transmitted requests by at least one of the plurality of candidate destination processors.
8 . The computer-implemented method of claim 7 , further comprising:
determining, by the dynamic routing service, an alternate destination processor for the at least one of the transmitted requests based on the routing directives and the contextual data;
updating, by the dynamic routing service, the at least one of the transmitted requests with an identifier associated with the alternate destination processor; and
transmitting, by the dynamic routing service, the at least one updated request to the payment gateway.
9 . The computer-implemented method of claim 1 , further comprising:
monitoring, by the dynamic routing service, performance metrics of the plurality of candidate destination processors, wherein the performance metrics includes one or more of response time or error rate, and
updating, by the dynamic routing service, one or more routing conditions based on the performance metrics.
10 . The computer-implemented method of claim 1 , wherein the payment gateway generates the response indicating a connection error based on failure to establish a communication link with the initial destination processor during the handshaking operation.
11 . The computer-implemented method of claim 10 , wherein the response from the payment gateway include a status code representative of the connection error.
12 . The computer-implemented method of claim 1 , wherein the payment gateway transmits a test message to check whether a test response is received within a predetermined time threshold, and wherein the payment gateway generates the response indicating a connection error upon expiration of the predetermined time threshold without receiving the test response from the initial destination processor.
13 . A system comprising:
one or more processors of a computing system; and
at least one non-transitory computer readable medium storing instructions which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
receiving, by a dynamic routing service, one or more requests from one or more devices, wherein the one or more requests include an identifier associated with an initial destination processor;
transmitting, by the dynamic routing service, the one or more requests to a payment gateway;
receiving, by the dynamic routing service, a response from the payment gateway indicating whether a connection is established with the initial destination processor, the connection being initiated by the payment gateway through a handshaking operation with the initial destination processor;
determining, by the dynamic routing service, a status code associated with at least one request from the one or more requests based on the response from the payment gateway, wherein the status code indicates an error in processing the at least one request by the initial destination processor;
determining, by the dynamic routing service, a plurality of candidate destination processors for the at least one request based on routing directives and contextual data;
splitting, by the dynamic routing service, the at least one request among the plurality of candidate destination processors based on processing loads of the plurality of candidate destination processors;
updating, by the dynamic routing service, each of the split requests with identifiers associated with the plurality of candidate destination processors; and
transmitting, by the dynamic routing service, the updated requests to the payment gateway, wherein the payment gateway generates at least one response indicating whether the plurality of candidate destination processors successfully processed the at least one request.
14 . The system of claim 13 , wherein determining the status code associated with the at least one request, further comprises:
determining, by the dynamic routing service, a time of receipt of the at least one request from the payment gateway; and
storing, by the dynamic routing service, the status code and the time of receipt of the at least one request in a database.
15 . The system of claim 13 , wherein the routing directives are configured based on one or more routing parameters, and wherein the one or more routing parameters include one or more of:
(i) a message type,
(ii) a routing directive type,
(iii) an error type, or
(iv) a destination selection criteria.
16 . The system of claim 13 , wherein the contextual data include one or more of:
(i) origination points for the at least one request,
(ii) destination for the at least one request,
(iii) temporal data associated with transmission of the at least one request to the payment gateway,
(iv) origination points for the at least one response,
(v) destination for the at least one response,
(vi) temporal data associated with a receipt of the at least one response,
(vii) status codes associated with the initial destination processor or the plurality of candidate destination processors,
(viii) temporal data associated with the status codes, or
(ix) historical and current fees associated with the initial destination processor or the plurality of candidate destination processors.
17 . The system of claim 13 , wherein updating each of the split requests with the identifiers associated with the plurality of candidate destination processors, further comprises:
updating, by the dynamic routing service, payload of each of the split requests for compatibility with a requirement or protocol of the plurality of candidate destination processors.
18 . The system of claim 13 , wherein transmitting the updated requests to the payment gateway, further comprises:
determining, by the dynamic routing service, a time of transmission of the transmitted requests to the payment gateway;
storing, by the dynamic routing service, the time of transmission of the transmitted requests in a database; and
receiving, by the dynamic routing service, the at least one response from the payment gateway, wherein the at least one response indicates successful processing of the transmitted requests by the plurality of candidate destination processors.
19 . A non-transitory computer readable medium, the non-transitory computer readable medium storing instructions which, when executed by one or more processors of a computing system, cause the one or more processors to perform operations comprising:
receiving, by a dynamic routing service, one or more requests from one or more devices, wherein the one or more requests include an identifier associated with an initial destination processor;
transmitting, by the dynamic routing service, the one or more requests to a payment gateway;
receiving, by the dynamic routing service, a response from the payment gateway indicating whether a connection is established with the initial destination processor, the connection being initiated by the payment gateway through a handshaking operation with the initial destination processor;
determining, by the dynamic routing service, a status code associated with at least one request from the one or more requests based on the response from the payment gateway, wherein the status code indicates an error in processing the at least one request by the initial destination processor;
determining, by the dynamic routing service, a plurality of candidate destination processors for the at least one request based on routing directives and contextual data;
splitting, by the dynamic routing service, the at least one request among the plurality of candidate destination processors based on processing loads of the plurality of candidate destination processors;
updating, by the dynamic routing service, each of the split requests with identifiers associated with the plurality of candidate destination processors; and
transmitting, by the dynamic routing service, updated requests to the payment gateway, wherein the payment gateway generates at least one response indicating whether the plurality of candidate destination processors successfully processed the at least one request.
20 . The non-transitory computer readable medium of claim 19 , wherein transmitting the updated requests to the payment gateway, further comprises:
determining, by the dynamic routing service, a time of transmission of the transmitted requests to the payment gateway;
storing, by the dynamic routing service, the time of transmission of the transmitted requests in a database; and
receiving, by the dynamic routing service, the at least one response from the payment gateway, wherein the at least one response indicates successful processing of the transmitted requests by the plurality of candidate destination processors.