---
title: "Upsert payment method"
method: POST
path: "/billing/payment-methods"
tags: ["billing"]
---

# Upsert payment method

`POST /billing/payment-methods`

## Request body

- CreatePaymentMethodRequestBody
  - `account_last4` string, nullable
  - `account_name` string, nullable
  - `bank_name` string, nullable
  - `billing_email` string, nullable
  - `billing_name` string, nullable
  - `card_brand` string, nullable
  - `card_exp_month` integer, nullable
  - `card_exp_year` integer, nullable
  - `card_last4` string, nullable
  - `customer_external_id` string, required
  - `external_id` string, required
  - `payment_method_type` string, required

## Response `201`

Created

- object
  - `data` PaymentMethodResponseData, required
    - `account_last4` string, nullable
    - `account_name` string, nullable
    - `bank_name` string, nullable
    - `billing_email` string, nullable
    - `billing_name` string, nullable
    - `card_brand` string, nullable
    - `card_exp_month` integer, nullable
    - `card_exp_year` integer, nullable
    - `card_last4` string, nullable
    - `company_id` string, nullable
    - `created_at` string, date-time, required
    - `customer_external_id` string, required
    - `environment_id` string, required
    - `external_id` string, required
    - `id` string, required
    - `payment_method_type` string, required
    - `provider_type` 'metronome' | 'orb' | 'schematic' | 'stripe', required
    - `updated_at` string, date-time, required
  - `params` object, required — Input parameters

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Server error

---

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