---
title: "Update a merchant's failed payment handling"
method: PUT
path: "/billing/merchant/failedpaymenthandling"
---

# Update a merchant's failed payment handling

`PUT /billing/merchant/failedpaymenthandling`

## Request

- Base URL: `https://api-sandbox.ezypay.com/v2`
- URL: `https://api-sandbox.ezypay.com/v2/billing/merchant/failedpaymenthandling`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://identity-sandbox.ezypay.com/token`

Update the settings that control automatic payment retry when a customer failed payment occurs.

## Headers

- `merchant` string, required

## Request body

- object
  - `initialAction` string: The initial action taken when a failed payment occurs. Supported values are: `stop` - Do not attempt any further payment processing for the failed invoice. `continue` - Continue to attempt payment recovery for the failed invoice.
  - `autoRetry` boolean: Determines if automatic payment retry will occur on the failed invoice. Supported values are `true` and `false`.
  - `retryInDays` integer: Specifies the number of days to wait before next retry for payment. Supported values are between 2 - 14. Default value is 7.
  - `maximumFailedAttempts` integer: Specifies the maximum number of failed attempts allowed before stopping payment retries. Supported values are between 2 - 5. Default value is 2.
  - `applyTo` string: Specifies the scope when updating the failed payment settings. Supported values are: `merchant` - Apply updated settings to all new plans and on-demand invoices created. Existing plans, subscriptions, and invoices are not affected.

## Response `200`

200

- object
  - `id` string
  - `number` string
  - `legalName` string
  - `name` string
  - `address` unknown
  - `countryCode` string
  - `email` string
  - `phoneNumber` unknown
  - `billing` boolean
  - `settlement` boolean
  - `status` string
  - `businessRegistrationNumber` unknown
  - `taxId` unknown
  - `categoryCode` unknown
  - `website` unknown
  - `description` unknown
  - `referenceCode` unknown
  - `settlementSchedule` object
    - `intervalUnit` string
    - `interval` integer
    - `settlementDay` unknown
    - `nextSettlementDate` string
    - `intervalDayType` string
  - `settlementPayoutMethod` object
    - `id` string
    - `paymentMethodToken` string
    - `bank` object
      - `accountHolderName` string
      - `last4` string
      - `bankNumber` string
      - `branchNumber` string
      - `suffixNumber` string
  - `acceptedPaymentMethods` string[]
  - `failedPaymentHandling` object
    - `initialAction` string
    - `autoRetry` boolean
    - `retryInDays` integer
    - `maximumFailedAttempts` integer
  - `paymentReactivationHandling` string
  - `tax` object
    - `rate` integer
  - `notifications` object
    - `customerEmail` object
      - `subscriptionCreation` boolean
      - `paymentMethodCreation` boolean
      - `pastDueInvoice` boolean
      - `settlementReports` boolean
  - `metadata` object
    - `ezypay_internal_payment_simulator` string
  - `type` string
  - `feePricingId` string
  - `documentNumberSettings` object[]
    - `documentType` string
    - `prefix` string

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `924be4030f56`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/merchant/failedpaymenthandling/put.md)

---

[API](https://skmtc.dev/ezypay/apis/vault.md) - [All operations](https://skmtc.dev/ezypay/apis/vault/llms.txt) - [OpenAPI document](https://skmtc.dev/ezypay/apis/vault/revisions/924be4030f56?raw)
