Merchants

Update Dunning Configuration

Update the dunning configuration for handling failed payments. Retry schedule overrides existing values when provided; otherwise the previous schedule is retained.

POST
/merchants/dunning-config

Authorization

bearerAuth
AuthorizationBearer <token>

Use your secret API key as the bearer token

In: header

Request Body

application/json

gracePeriodDays*integer
Range0 <= value <= 365
endOfDunningAction*string
Value in"pause_subscription" | "cancel_subscription" | "mark_as_unpaid"
retrySchedule?array<integer>

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.getlumen.dev/v1/merchants/dunning-config" \  -H "Content-Type: application/json" \  -d '{    "gracePeriodDays": 365,    "endOfDunningAction": "pause_subscription"  }'
{
  "config": {
    "id": "dunning_9a8b7c6d5e4f3g2h1i0j",
    "gracePeriodDays": 10,
    "retrySchedule": [
      2,
      4,
      8
    ],
    "endOfDunningAction": "pause_subscription"
  }
}
{
  "config": {
    "id": "dunning_new_123",
    "gracePeriodDays": 7,
    "retrySchedule": [
      1,
      3,
      7
    ],
    "endOfDunningAction": "pause_subscription"
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}