Integrating With Recover
An integration with Recover is fairly lightweight, requiring only three merchant-side integration points consisting of the following:
The Recover Enterprise API is an HTTP endpoint that gives you (the merchant) the most flexibility in integrating Recover into your billing management system. It has been designed to be agnostic of the underlying PSP you are using to process payments.
The merchant forwards payment events from their payment processing systems over to this API via HTTP requests in a standardized format for processing by Recover.
The specification on how the Recover Enterprise API is structured can be found within its API reference page below.
The Client Retry API is an endpoint provided by the merchant that serves as a final security check in the recovery process. This endpoint gives the merchant the ability to determine if an invoice is retriable or not right before the retry is attempted.
It is important that this check exists at this point because many things can happen to an invoice between the time it is sent over to Recover to the time it is attempted for retry. This gap in time could be anywhere from hours to days, depending on what Recover's underlying models find to be optimal. The most common reason for wanting to cancel a retry would be a subscription being canceled by a user during this time.
The specification on how the Client Retry API should be structured by the merchant can be found within its API Reference page below.
Recover Webhooks offer real-time updates on how the Recover system is operating. Each time a retry is executed, a webhook event will be sent to an endpoint provided by the merchant via HTTP POST request. These events contain all the relevant information on the retry that was performed, as well as the outcome of the retry, for the merchant to use to reconcile their systems.
Details on how these events are structured can be found within the API Reference page below.
A typical integration with Recover is depicted in Figure 1 below.
Step 1: The merchant performs a payment request as usual.
Step 2: Upon receiving the response from the Payment Processor, the merchant forwards the response information to Recover via the Recover Enterprise API. Recover then analyzes the payment event in real time to determine the best way to recover the failed payment.
Step 3: Just before performing the scheduled retry, Recover will query the Client Retry API to determine if the retry should still be performed.
Step 4: If permitted, Recover performs the retry on behalf of the merchant.
Step 5: After obtaining the request response from the Payment Processor Recover forwards the response to the merchant via Recover Webhooks for reconciliation.