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

**curl**

```bash
curl "https://api.vortex.nyc/v1/customers/{customerId}/payment-method-setup?environment=sandbox&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"methodType":"card","setAsDefault":true}'
```

**TypeScript**

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

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await createCustomerPaymentMethodSetup({
  client: vortex,
  path: { customerId: "..." },
  query: { environment: "sandbox", merchantAccountId: "..." },
  body: {"methodType":"card","setAsDefault":true},
});
```

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

- `billingAccountId` (string)
- `methodType` (string)
- `setAsDefault` (boolean)

Request body example:

```json
{
  "methodType": "card",
  "setAsDefault": true
}
```

**Responses**

- `201` — Created
- `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, 201:

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