---
title: "Attach payment method"
method: POST
path: "/api/v1/customers/{id}/payment-method"
tags: ["Customers"]
---

# Attach payment method

`POST /api/v1/customers/{id}/payment-method`

Attaches a payment method to a customer for billing. Required for paid subscriptions when integrated with a billing provider.

## Path parameters

- `id` string, required

## Headers

- `X-ACCOUNT-ID` string
- `X-ENVIRONMENT-ID` string

## Request body

- AttachPaymentMethodRequestDto — Attach a payment method from a billing integration to a customer.
  - `billingCurrency` 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf', nullable — Customers selected currency
  - `vendorIdentifier` 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE' | 'RECEIVED' | 'PREQUEL' | 'AIRWALLEX' | 'STRIPE_INVOICING', required — The vendor identifier of integration
  - `integrationId` string, required — Integration details
  - `paymentMethodId` string, required — Billing provider payment method id

## Response `200`

The customer object with attached payment method.

- CustomerResponseDto — Response object
  - `data` object, required — A customer can be either an organization or an individual
    - `createdAt` string, date-time, required — Timestamp of when the record was created
    - `updatedAt` string, date-time, required — Timestamp of when the record was last updated
    - `archivedAt` string, date-time, nullable, required — Timestamp of when the record was deleted
    - `name` string, nullable — The name of the customer
    - `email` string, email, nullable — The email of the customer
    - `billingId` string, nullable — The unique identifier for the entity in the billing provider
    - `id` string, required — Customer slug
    - `billingCurrency` 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf', nullable — The billing currency of the customer
    - `metadata` object — Additional metadata
    - `integrations` object[] — List of integrations
      - `vendorIdentifier` 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE' | 'RECEIVED' | 'PREQUEL' | 'AIRWALLEX' | 'STRIPE_INVOICING', required — The vendor identifier of integration
      - `syncedEntityId` string, nullable, required — Synced entity id
      - `id` string, required — Integration details
    - `defaultPaymentMethod` object, nullable — The default payment method details
      - `billingId` string, nullable, required — The default payment method id
      - `type` 'CARD' | 'BANK' | 'CASH_APP', required — The default payment method type
      - `cardLast4Digits` string, nullable, required — The last 4 digits of the default payment method
      - `cardExpiryMonth` number, nullable, required — The expiration month of the default payment method
      - `cardExpiryYear` number, nullable, required — The expiration year of the default payment method
    - `couponId` union — Customer level coupon
      - string — Customer level coupon
      - ''
    - `timezone` string, nullable — Timezone to use for this customer
    - `language` string, nullable — Language to use for this customer
    - `passthrough` object — Vendor-specific billing passthrough fields.
      - `stripe` object — Stripe-specific billing fields for the customer.
        - `customerName` string — Customer name
        - `billingAddress` object — Physical address
          - `city` string — City name
          - `country` string — Country code or name
          - `line1` string — Street address line 1
          - `line2` string — Street address line 2
          - `postalCode` string — Postal or ZIP code
          - `state` string — State or province
        - `shippingAddress` object — Physical address
          - `city` string — City name
          - `country` string — Country code or name
          - `line1` string — Street address line 1
          - `line2` string — Street address line 2
          - `postalCode` string — Postal or ZIP code
          - `state` string — State or province
        - `paymentMethodId` string — Billing provider payment method id, attached to this customer
        - `taxIds` object[] — Tax IDs
          - `type` string, required — The type of tax exemption identifier, such as VAT.
          - `value` string, required — The actual tax identifier value
        - `invoiceCustomFields` object — Invoice custom fields
        - `metadata` object — Additional metadata
      - `zuora` object — Zuora-specific billing fields for the customer.
        - `billingAddress` object — Physical address
          - `city` string — City name
          - `country` string — Country code or name
          - `line1` string — Street address line 1
          - `line2` string — Street address line 2
          - `postalCode` string — Postal or ZIP code
          - `state` string — State or province
        - `currency` 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf' — Customers selected currency
        - `paymentMethodId` string — Billing provider payment method id, attached to this customer
        - `metadata` object — Additional metadata

## Other responses

- `400` — bad request.
- `401` — User is not authenticated.
- `403` — User is not allowed to access this resource.
- `404` — Customer not found.
- `429` — Too many requests.

---

[API](https://skmtc.net/stiggio/apis/stigg-api.md) · [All operations](https://skmtc.net/stiggio/apis/stigg-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stiggio/stigg-api/versions/ffc977f1c07e/schema)
