> Index of every page: https://docs.merchantservicedepot.com/llms.txt

# Retrieve recurring invoice


`GET /v1/recurring_invoices/{recurring_invoice_id}`

`nextInvoiceDate` is the next date this produces an invoice, in your timezone. It is absent once a schedule is cancelled or has run its course. `occurrenceCount` is how many it has issued so far.

Auth: a secret key with the `recurringInvoices.retrieve` permission. Returns `200` with Recurring invoice.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `recurringInvoiceId` | path | string | Yes | The recurring invoice id in the request path. |

## Request

**curl**

```curl
curl -X GET "https://payments-api-sandbox.merchantservicedepot.com/v1/recurring_invoices/{recurring_invoice_id}" \
  -H "Authorization: Bearer $MYELA_API_KEY"
```

**Node**

```node
const res = await fetch("https://payments-api-sandbox.merchantservicedepot.com/v1/recurring_invoices/{recurring_invoice_id}", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MYELA_API_KEY}`,
  },
});

if (!res.ok) {
  const { error } = await res.json();
  // Branch on error.code — never on error.message.
  throw new Error(error.code);
}
const data = await res.json();
```

**Python**

```python
import os
import requests

res = requests.get(
    "https://payments-api-sandbox.merchantservicedepot.com/v1/recurring_invoices/{recurring_invoice_id}",
    headers={
        "Authorization": f"Bearer {os.environ['MYELA_API_KEY']}",
    },
)

if not res.ok:
    # Branch on error["code"] — never on error["message"].
    raise RuntimeError(res.json()["error"]["code"])
data = res.json()
```

## Response

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique recurring invoice identifier. |
| `object` | "recurring_invoice" | Stable resource discriminator. |
| `customerId` | string | The customer every generated invoice bills. |
| `name` | string | Your label for the schedule. Not shown to the customer. |
| `status` | string | One of active, paused, completed, cancelled or failed. You set paused and cancelled; completed and failed are set for you — completed when it runs out of occurrences or passes its end date, failed when it parks itself after repeated errors. |
| `mode` | string | auto_send issues each invoice as it is generated. draft_for_review leaves a draft for you to edit and send, which is what you want when the amount needs a human look before it goes out. |
| `cadence` | object | unit (weekly or monthly) and interval, plus weekday for weekly, or dayOfMonth or lastDayOfMonth for monthly. dayOfMonth is reported as you asked for it, never as clamped: a schedule set to the 31st reports 31 in every month, and bills the 28th in February. |
| `startDate` | string | First date the schedule may produce an invoice, as a calendar date (YYYY-MM-DD) in your timezone — not a timestamp. |
| `endDate` | string | Optional last date, inclusive. Absent means it runs until you stop it. |
| `nextInvoiceDate` | string | The next date this produces an invoice, in your timezone. Absent once the schedule is cancelled or has run its course. |
| `maxOccurrences` | integer | Optional cap on how many invoices this will ever produce. |
| `occurrenceCount` | integer | How many invoices it has produced so far. |
| `template` | object | What each generated invoice is built from: amount and currency, optional amountTax, amountDiscount, description, paymentTerms, items, plus autoCharge and paymentMethodId. Amounts are minor units. Editing it changes the next cycle only. |
| `lastFailureCode` | string | Why the last cycle produced nothing, as a code. Present only after a failure; cleared once a cycle succeeds. |
| `recurringInvoiceId` | string | The recurring invoice that produced this one. Absent on a one-off invoice. |
| `billingPeriod` | string | Which cycle this invoice satisfies, as the period's start date in your timezone. Two invoices in one month carry two different values, which is how you tell them apart. |
| `createdAt` | string | ISO 8601 creation timestamp. |

```json
{
  "id": "sch_01JEXAMPLE",
  "object": "recurring_invoice",
  "customerId": "cus_01JEXAMPLE",
  "name": "Monthly retainer",
  "status": "active",
  "mode": "auto_send",
  "cadence": {
    "unit": "monthly",
    "interval": 1,
    "dayOfMonth": 1
  },
  "startDate": "2026-09-01",
  "endDate": "2027-09-01",
  "nextInvoiceDate": "2026-10-01",
  "maxOccurrences": 12,
  "occurrenceCount": 3,
  "template": {
    "amount": 120000,
    "currency": "USD",
    "paymentTerms": "net_30",
    "autoCharge": false
  },
  "lastFailureCode": "RECURRING_INVOICE_CARD_NOT_FOR_CUSTOMER",
  "recurringInvoiceId": "sch_01JEXAMPLE",
  "billingPeriod": "2026-09-01",
  "createdAt": "2026-08-19T12:00:00.000Z"
}
```

Source: https://docs.merchantservicedepot.com/api-reference/retrieve-recurring-invoice/
