---
title: "POST /users/{user_id}/cards"
method: POST
path: "/users/{user_id}/cards"
tags: ["userCards"]
---

# POST /users/{user_id}/cards

`POST /users/{user_id}/cards`

Create a credit card and assigns to user

## Path parameters

- `user_id` integer, required

## Request body

- CreateCard
  - `default` boolean
  - `payment_processor` PaymentProcessor — Typically this object is composed into a struct, but embedded into the same table using the `db:",embed"` struct tag.
    - `country` string
    - `external_processor` string
    - `external_processor_id` string
    - `name` string
  - `stripe_token` string

## Response `201`

- UserCard
  - `brand` string
  - `created` string
  - `default` boolean
  - `exp_month` integer
  - `exp_year` integer
  - `id` integer
  - `last_four` string
  - `latest_setup_intent_id` string
  - `owner_id` integer
  - `payment_processor` PaymentProcessor — Typically this object is composed into a struct, but embedded into the same table using the `db:",embed"` struct tag.
    - `country` string
    - `external_processor` string
    - `external_processor_id` string
    - `name` string
  - `stripe_token` string — internal
  - `updated` string

## Other responses

- `401` — Unauthorized error
- `404` — Not found error
- `default` — An unknown, unexpected error.

---

[API](https://skmtc.net/outdoorsy/apis/outdoorsy-api-documentation.md) · [All operations](https://skmtc.net/outdoorsy/apis/outdoorsy-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/outdoorsy/outdoorsy-api-documentation/revisions/f0cf8f605ea0/schema)
