---
title: "Add Customer Payment Method"
method: POST
path: "/v1/customer-portal/customers/me/payment-methods"
tags: ["customer_portal", "customers", "public"]
---

# Add Customer Payment Method

`POST /v1/customer-portal/customers/me/payment-methods`

## Request

- Base URL: `https://api.polar.sh`
- URL: `https://api.polar.sh/v1/customer-portal/customers/me/payment-methods`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Add a payment method to the authenticated customer.

## Request body

- CustomerPaymentMethodCreate
  - `confirmation_token_id` string, required
  - `set_default` boolean, required
  - `return_url` string, required

## Response `201`

Payment method created or setup initiated.

- union
  - CustomerPaymentMethodCreateSucceededResponse
    - `status` 'succeeded', required
    - `payment_method` union, required
      - PaymentMethodCard
        - `id` string, uuid4, required: The ID of the object.
        - `created_at` string, date-time, required: Creation timestamp of the object.
        - `modified_at` string, date-time, nullable, required: Last modification timestamp of the object.
        - `processor` 'stripe', required
        - `customer_id` string, uuid4, required
        - `type` 'card', required
        - `method_metadata` PaymentMethodCardMetadata, required
          - `brand` string, required
          - `last4` string, required
          - `exp_month` integer, required
          - `exp_year` integer, required
          - `wallet` string, nullable
      - PaymentMethodGeneric
        - `id` string, uuid4, required: The ID of the object.
        - `created_at` string, date-time, required: Creation timestamp of the object.
        - `modified_at` string, date-time, nullable, required: Last modification timestamp of the object.
        - `processor` 'stripe', required
        - `customer_id` string, uuid4, required
        - `type` string, required
  - CustomerPaymentMethodCreateRequiresActionResponse
    - `status` 'requires_action', required
    - `client_secret` string, required

## Other responses

- `400`: The card was declined while setting up the payment method.
- `422`: Validation Error

---

[API](https://skmtc.dev/polar/apis/polar-api.md) - [All operations](https://skmtc.dev/polar/apis/polar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polar/apis/polar-api/revisions/77e4ef94fcc3?raw)
