---
search:
  tags:
    - billing
    - POST
seo:
  description: >-
    Archive a customer payment… Reference for the POST
    /v1/customers/{customerId}/payment-methods/{paymentMethodId}/archive
    endpoint in the Vortex Payments API.
sidebar:
  label: Archive a customer payment method
  badge: POST
title: Archive a customer payment method
type: openapi-operation
---
`POST /v1/customers/{customerId}/payment-methods/{paymentMethodId}/archive`

**curl**

```bash
curl "https://api.vortex.nyc/v1/customers/{customerId}/payment-methods/{paymentMethodId}/archive?environment=sandbox&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"customer_requested"}'
```

**TypeScript**

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

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

**Request body** (`application/json`, required)

- `billingAccountId` (string)
- `reason` (string)

Request body example:

```json
{
  "reason": "customer_requested"
}
```

**Responses**

- `200` — Success
- `400` — Bad request, including malformed JSON
- `401` — Missing or invalid API key
- `409` — Conflict, including idempotency body drift
- `422` — Validation failed
- `429` — API key rate limit exceeded
- `default` — Error

Response example, 200:

```json
{
  "data": {},
  "requestId": "string"
}
```
