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

# Get Dunning Settings

GET https://app.paymentkit.com/api/accounts/{account_id}/dunning-settings

Get dunning settings for an account.

Reference: https://docs.paymentkit.com/api-reference/api-reference/accounts/get-dunning-settings

## Authentication

- `Authorization` header (bearer token, required)

## Servers

- `https://app.paymentkit.com` (Production, default)
- `https://staging.paymentkit.com` (Staging)

## Request

### Path parameters

- `account_id` (string, required)

## Response

### 200

Successful Response

- `enable_retries` (boolean, optional, nullable, default: false) — Enable automatic failed payment recovery retries. Defaults to False: an account that never configures dunning does not retry failed payments.
- `enable_emails` (boolean, optional, nullable, default: false) — Enable automatic failed payment recovery emails. Defaults to False: an account that never configures dunning sends no dunning emails.
- `contact_info` (object, optional, nullable) — Contact information for dunning emails
  - `from_email` (string, optional, nullable) — From email address for dunning emails
  - `reply_to_email` (string, optional, nullable) — Reply-to email address for dunning emails
  - `email_signature_title` (string, optional, nullable) — Title in email signature
  - `email_signature_name` (string, optional, nullable) — Name in email signature
  - `cc_recipients` (list of string, optional, nullable) — List of CC email addresses
  - `bcc_recipients` (list of string, optional, nullable) — List of BCC email addresses
- `subscription_status_on_failure` (string, optional, nullable) — What to do with subscription if all payment attempts fail. Options: 'cancel' (default) or 'leave_active'
- `invoice_status_on_failure` (string, optional, nullable) — What to do with invoice if all payment attempts fail. Options: 'mark_uncollectible' (default), 'leave_open', or 'void'
- `apply_to_product_ids` (list of string, optional, nullable) — List of product IDs to apply dunning to (empty means all products)
- `settle_past_due_on_pm_update` (boolean, optional, nullable, default: true) — When a customer updates their payment method, immediately charge all past-due invoices. Invoices not yet due are not affected.
- `update_renewal_on_overdue_paid` (boolean, optional, nullable, default: true) — Update subscription renewal date when overdue invoices are paid

## Examples

**Response**

```json
{
  "enable_retries": true,
  "enable_emails": true,
  "contact_info": {
    "from_email": "billing@example.com",
    "reply_to_email": "support@example.com",
    "email_signature_title": "Billing Department",
    "email_signature_name": "John Smith",
    "cc_recipients": [
      "cc1@merchant.com",
      "cc2@merchant.com"
    ],
    "bcc_recipients": [
      "bcc1@merchant.com",
      "bcc2@merchant.com"
    ]
  },
  "subscription_status_on_failure": "cancel",
  "invoice_status_on_failure": "mark_uncollectible",
  "apply_to_product_ids": [
    "prod_abc123",
    "prod_def456"
  ],
  "settle_past_due_on_pm_update": true,
  "update_renewal_on_overdue_paid": true
}
```

**SDK Code**

```python
from payment_kit import PaymentKit

client = PaymentKit(
    token="YOUR_TOKEN_HERE",
)

client.accounts.get_dunning_settings(
    account_id="account_id",
)

```

```javascript
const url = 'https://app.paymentkit.com/api/accounts/account_id/dunning-settings';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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://app.paymentkit.com/api/accounts/account_id/dunning-settings"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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://app.paymentkit.com/api/accounts/account_id/dunning-settings")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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://app.paymentkit.com/api/accounts/account_id/dunning-settings")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.paymentkit.com/api/accounts/account_id/dunning-settings', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://app.paymentkit.com/api/accounts/account_id/dunning-settings");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.paymentkit.com/api/accounts/account_id/dunning-settings")! 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()
```