---
search:
  tags:
    - paymentMethods
    - POST
seo:
  description: >-
    Reference for the POST
    /v1/payment-method-setup-sessions/{paymentMethodSetupSessionId}/exchange
    endpoint in the Vortex Payments API.
sidebar:
  label: >-
    POST
    /v1/payment-method-setup-sessions/{paymentMethodSetupSessionId}/exchange
  badge: POST
title: POST /v1/payment-method-setup-sessions/{paymentMethodSetupSessionId}/exchange
type: openapi-operation
---
`POST /v1/payment-method-setup-sessions/{paymentMethodSetupSessionId}/exchange`

**curl**

```bash
curl "https://api.vortex.nyc/v1/payment-method-setup-sessions/:paymentMethodSetupSessionId/exchange" \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'
```

**TypeScript**

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

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await exchangePaymentMethodSetupSession({
  client: vortex,
  path: { paymentMethodSetupSessionId: "..." },
  body: {...},
});
```

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

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `clientSecret` (string, required)
- `providerToken` (string, required)
- `idempotencyKey` (string | null)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "clientSecret": "string",
  "providerToken": "string",
  "idempotencyKey": "string"
}
```

**Responses**

- `201` — Success

Response example, 201:

```json
{
  "data": {
    "id": "string",
    "merchantAccountId": "string",
    "ownerType": "customer",
    "ownerId": "string",
    "methodType": "string",
    "status": "string",
    "isDefault": true,
    "brandSummary": "string",
    "last4": "string",
    "expiryMonth": 0,
    "expiryYear": 0,
    "fraudSessionId": "string",
    "networkTokenEnabled": true,
    "networkTokenState": "string",
    "microdepositVerification": {
      "microdepositId": "string",
      "verificationUrl": "string"
    }
  },
  "requestId": "string"
}
```
