> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# List the amount recovered metrics

GET https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered

Gets the Amount Recovered metrics, including the total amount recovered and the amount recovered over the last 30 days broken down by currency.


Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/payments/configurable-payment-retry/get-amount-recovered

## Authentication

- `Authorization` header (basic auth, required) — The user name is the email address that you use for logging in Zuora. The password is the API token that is shown in the settings of Configurable Payment Retry.

## Response

### 200

- `currency` (list of GetAmountRecoveredResponseCurrencyItems, optional) — An array containing the following information for each available currency. If no payment of a given currency has been processed over the last 30 days, the currency will not appear in the array. - The total amount recovered to date - The amount recovered over the last 30 days
- `success` (boolean, optional) — Indicates whether the metrics are retrieved successfully. If no data is loaded yet, a 200 response code will be returned with the success field set to `true`. All expected fields will be present but the value will be `null`.

## Types

### GetAmountRecoveredResponseCurrencyItems

## Examples

**Response**

```json
{
  "currency": [
    {
      "CAD": {
        "last_30_days": "5132.87",
        "total_amount": "123954.10"
      },
      "EUR": {
        "last_30_days": "17.17",
        "total_amount": "337.19"
      },
      "USD": {
        "last_30_days": "1100.01",
        "total_amount": "77515.21"
      }
    }
  ],
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://payment-retry.apps.zuora.com/api/v1/metrics/amount_recovered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```