---
title: "Save a card confirmed through a SetupIntent"
method: POST
path: "/v1/payment-methods"
tags: ["payment-methods"]
---

# Save a card confirmed through a SetupIntent

`POST /v1/payment-methods`

## Request

- Base URL: `https://api.getmyhotels.com`
- URL: `https://api.getmyhotels.com/v1/payment-methods`
- Auth: HTTP bearer

Runs `user.attachStripePaymentMethod`. Send the `pm_` id Stripe returned after confirming the SetupIntent from `POST /v1/payment-methods/setup-intent`. Brand, last 4 and expiry are read from Stripe, not the client. Card payment methods only (400 otherwise). The card must be unattached (it is then attached to the user's Stripe customer) or already on that customer; a card on any other customer is a 400. Saving the same card twice returns the existing row with `alreadySaved: true`. `isDefault` (default false) makes it the default card. Returns `{ publicId, alreadySaved }`.

## Request body

- object
  - `stripePaymentMethodId` string, required
  - `isDefault` boolean

## Response `200`

Success

- unknown

## Other responses

- `400`: Request validation failed or the router rejected the input
- `401`: Missing or invalid bearer session token
- `426`: Reported X-GMH-App-Version is below the supported minimum — the app must update
- `500`: Unexpected server error (opaque; details stay in logs)

---

[API](https://skmtc.dev/getmyhotels/apis/getmyhotels-rest-api.md) · [All operations](https://skmtc.dev/getmyhotels/apis/getmyhotels-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getmyhotels/apis/getmyhotels-rest-api/revisions/cba24a9c13f0?raw)
