---
search:
  tags:
    - customers
    - GET
seo:
  description: >-
    Reference for the GET /v1/customers/{customerId}/state endpoint in the
    Vortex Payments API.
sidebar:
  label: GET /v1/customers/{customerId}/state
  badge: GET
title: GET /v1/customers/{customerId}/state
type: openapi-operation
---
`GET /v1/customers/{customerId}/state`

**curl**

```bash
curl "https://api.vortex.nyc/v1/customers/{customerId}/state?environment=sandbox&merchantAccountId=..." \
  -X GET \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
```

**TypeScript**

```ts
import { getCustomerState, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await getCustomerState({
  client: vortex,
  path: { customerId: "..." },
  query: { environment: "sandbox", merchantAccountId: "..." },
});
```

**Responses**

- `200` — Success

Response example, 200:

```json
{
  "data": {
    "customer": {
      "customerId": "string",
      "name": "string",
      "defaultCurrency": "string",
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "createdAt": "string",
      "externalCustomerRef": "string",
      "email": "string",
      "archivedAt": "string"
    },
    "status": "inactive",
    "currency": "string",
    "summary": {
      "activeSubscriptions": 0,
      "openInvoices": 0,
      "pastDueInvoices": 0,
      "uncollectibleInvoices": 0,
      "totalAmountDue": 0,
      "pendingRetries": 0,
      "pendingPaymentAttempts": 0,
      "pendingRefunds": 0,
      "failedLatestPaymentAttempts": 0,
      "activeEntitlements": 0,
      "revokedEntitlements": 0
    },
    "subscriptions": [
      {
        "subscriptionId": "string",
        "customerId": "string",
        "billingAccountId": "string",
        "status": "draft",
        "collectionMode": "manual",
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "createdAt": "string",
        "currentPeriodStartAt": "string",
        "currentPeriodEndAt": "string",
        "trialEndAt": "string",
        "cancelAt": "string",
        "canceledAt": "string",
        "endedAt": "string",
        "testClockId": "string"
      }
    ],
    "invoices": [
      {
        "invoiceId": "string",
        "customerId": "string",
        "billingAccountId": "string",
        "status": "draft",
        "currency": "string",
        "subtotal": 0,
        "discountTotal": 0,
        "taxTotal": 0,
        "total": 0,
        "amountPaid": 0,
        "amountRemaining": 0,
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "subscriptionId": "string",
        "creditNoteTotal": 0,
        "customerBalanceAppliedTotal": 0,
        "periodStartAt": "string",
        "periodEndAt": "string",
        "issuedAt": "string",
        "dueAt": "string",
        "finalizedAt": "string",
        "voidedAt": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "latestPaymentAttempt": {
          "attemptId": "string",
          "invoiceNumber": "string",
          "status": "pending",
          "requestedAmount": 0,
          "collectedAmount": 0,
          "createdAt": "string",
          "paymentIntentId": "string",
          "paymentId": "string",
          "failureReason": "string",
          "resolvedAt": "string"
        }
      }
    ],
    "entitlements": {
      "active": [
        {
          "entitlementId": "string",
          "customerId": "string",
          "billingAccountId": "string",
          "entitlementKey": "string",
          "status": "active",
          "source": "subscription",
          "sourceRef": "string",
          "grantedAt": "string",
          "metadata": {
            "property1": "string",
            "property2": "string"
          },
          "revokedAt": "string",
          "reason": "string"
        }
      ],
      "revoked": [
        {
          "entitlementId": "string",
          "customerId": "string",
          "billingAccountId": "string",
          "entitlementKey": "string",
          "status": "active",
          "source": "subscription",
          "sourceRef": "string",
          "grantedAt": "string",
          "metadata": {
            "property1": "string",
            "property2": "string"
          },
          "revokedAt": "string",
          "reason": "string"
        }
      ]
    },
    "retryQueue": [
      {
        "retryId": "string",
        "invoiceNumber": "string",
        "status": "pending",
        "retrySequence": 0,
        "runAt": "string",
        "lastError": "string"
      }
    ],
    "pendingPaymentAttempts": [
      {
        "attemptId": "string",
        "invoiceNumber": "string",
        "status": "pending",
        "requestedAmount": 0,
        "collectedAmount": 0,
        "createdAt": "string",
        "paymentIntentId": "string",
        "paymentId": "string",
        "failureReason": "string",
        "resolvedAt": "string"
      }
    ],
    "pendingRefunds": [
      {
        "billingRefundId": "string",
        "invoiceNumber": "string",
        "paymentId": "string",
        "paymentsRefundId": "string",
        "amount": 0,
        "status": "pending",
        "reason": "string",
        "requestedAt": "string",
        "resolvedAt": "string"
      }
    ],
    "access": {
      "allowed": true,
      "state": "ready",
      "reasonCodes": [
        "string"
      ],
      "activeKeys": [
        "string"
      ],
      "activeEntitlements": [
        {
          "entitlementId": "string",
          "customerId": "string",
          "billingAccountId": "string",
          "entitlementKey": "string",
          "status": "active",
          "source": "subscription",
          "sourceRef": "string",
          "grantedAt": "string",
          "metadata": {
            "property1": "string",
            "property2": "string"
          },
          "revokedAt": "string",
          "reason": "string"
        }
      ]
    }
  },
  "requestId": "string"
}
```
