> 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 baseline metrics

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

Gets baseline metrics for Configurable Payment Retry, including Retry Success Rate and trend, Document Success Rate and trend, and Average Days Outstanding and trend. See Response Schema for detailed descriptions of the metrics.


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

## 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

- `retry_success_rate` (double, optional) — The percentage of successful payment attempts for all customer groups on this Configurable Payment Retry instance so far. Retry Success Rate = Number of successful retry payment attempts / Total number of retry payments attempted Payment attempts here are any payment attempts executed by Configurable Payment Retry, excluding the initial payment run.
- `retry_success_rate_trend` (string, optional) — The trend of change in Retry Success Rate over the last 30 days.
- `document_success_rate` (double, optional) — The percentage of billing documents that are successfully collected, for all customer groups on this Configurable Payment Retry instance so far. Document Success Rate = Number of billing documents collected / Total number of billing documents attempted Billing documents collected are any invoices and debit memos that were paid through the payment attempt initiated by Configurable Payment Retry.
- `document_success_rate_trend` (string, optional) — The trend of change in Document Success Rate over the last 30 days.
- `average_days_outstanding` (double, optional) — The average number of days invoices and debit memos are unpaid before collection, for all customer groups on this Configurable Payment Retry instance so far.
- `average_days_outstanding_trend` (string, optional) — The trend of change in Average Days Outstanding 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`.

## Examples

**Response**

```json
{
  "retry_success_rate": 11.9,
  "retry_success_rate_trend": "down",
  "document_success_rate": 13.54,
  "document_success_rate_trend": "neutral",
  "average_days_outstanding": 4.76,
  "average_days_outstanding_trend": "up",
  "success": true
}
```

**SDK Code**

```python
import requests

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

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

print(response.json())
```

```javascript
const url = 'https://payment-retry.apps.zuora.com/api/v1/metrics/baseline';
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/baseline"

	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/baseline")

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/baseline")
  .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/baseline', [
  '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/baseline");
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/baseline")! 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()
```