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

# List collection attempts


`GET /v1/invoices/{invoice_id}/attempts`

Every attempt made to collect it, in order — the answer to "why has this not been paid".

Auth: a secret key with the `invoices.attempts` permission. Returns `200` with Invoice charge attempt.

## Parameters

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

## Request

**curl**

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

**Node**

```node
const res = await fetch("https://payments-api-sandbox.merchantservicedepot.com/v1/invoices/{invoice_id}/attempts", {
  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/invoices/{invoice_id}/attempts",
    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 attempt identifier. |
| `object` | "invoice_charge_attempt" | Stable resource discriminator. |
| `invoiceId` | string | Invoice being collected. |
| `attempt` | integer | One-based attempt number. |
| `outcome` | string | Result of the attempt. |
| `failureCode` | string | Stable failure code. |
| `createdAt` | string | ISO 8601 creation timestamp. |

```json
{
  "object": "list",
  "data": [
    {
      "id": "ica_01JEXAMPLE",
      "object": "invoice_charge_attempt",
      "invoiceId": "inv_01JEXAMPLE",
      "attempt": 1,
      "outcome": "failed",
      "failureCode": "card_declined",
      "createdAt": "2026-08-10T20:49:51.653Z"
    }
  ],
  "hasMore": false
}
```

Source: https://docs.merchantservicedepot.com/api-reference/list-collection-attempts/
