---
title: "Retry a payment on an invoice"
method: POST
path: "/billing/invoices/{invoiceId}/retrypayment"
---

# Retry a payment on an invoice

`POST /billing/invoices/{invoiceId}/retrypayment`

## Request

- Base URL: `https://api-sandbox.ezypay.com/v2`
- URL: `https://api-sandbox.ezypay.com/v2/billing/invoices/{invoiceId}/retrypayment`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://identity-sandbox.ezypay.com/token`

Integrators are able to retry a "PAST_DUE" invoice using the retry payment API. Once the retry payment is actioned, the status of the invoice will return to "PROCESSING". 

The retry payment API will validate if the paymentMethodToken is still a valid token before allowing the retry payment to proceed. If the paymentMethodToken used is an invalid token, integrators are required to replace the paymentMethodToken for the "PAST_DUE" invoice.



NOTE:
It is important to note that integrators are required to manage the MAX retry on their application.

## Path parameters

- `invoiceId` string, required

## Headers

- `merchant` string, required

## Request body

- object
  - `oneOff` string: Specify if the invoice will re-use the existing payment method token or use a different token as a one-off payment. Supported values are: `false` - The default value. Use the existing payment method token associated with this invoice. You do not need to provide a new payment method token. `true` - Use a different payment method token for this one-off payment. Specify the token in `paymentMethodToken`.
  - `paymentMethodToken` string: Specify the payment method token that will be used for this payment. Only needs to be provided if `oneOff` is true. Future invoices will not be affected.

## Response `200`

200

- object
  - `id` string
  - `documentNumber` string
  - `date` string
  - `dueDate` string
  - `scheduledPaymentDate` unknown
  - `status` string
  - `memo` unknown
  - `items` object[]
    - `description` string
    - `amount` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `tax` object
      - `rate` integer
    - `id` string
    - `type` string
    - `discounted` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `accountingCode` unknown
  - `amount` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `amountWithoutDiscount` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalDiscounted` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalRefunded` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalTax` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `customerId` string
  - `subscriptionId` unknown
  - `subscriptionName` unknown
  - `paymentMethodToken` string
  - `autoPayment` boolean
  - `createdOn` string
  - `qrData` object
    - `qrString` string
    - `expires` string, date-time

## Other responses

- `400`: 400

## Changes

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

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/invoices/:invoiceId/retrypayment/post.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)
