Customers

Attach payment method

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

post/api/v1/customers/{id}/payment-method

Path parameters

idstring required

The unique identifier of the entity

Headers

X-ACCOUNT-IDstring

Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.

X-ENVIRONMENT-IDstring

Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).

Request body

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

integrationIdstring required

Integration details

paymentMethodIdstring required

Billing provider payment method id

Response

The customer object with attached payment method.

Changes

Changed in 10 of the 115 revisions of this API.146

    • added the new ContractNotFound enum value to the code response property for the response status 404

      response-property-enum-value-added

    • added the new CreditOveragePriceCurrencyNotFound enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new InvalidCreditOverageBillingModel enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new InvoicePreviewNotAvailableForDraftContract enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new OveragePriceNotSupportedOnAddon enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new OveragePriceRequiresUsageLimit enum value to the code response property for the response status 400

      response-property-enum-value-added

  • 8d63db93d65611See the full diff
    • added the new STRIPE_INVOICING enum value to the data/integrations/items/vendorIdentifier response property for the response status 200

      response-property-enum-value-added

    • added the new STRIPE_INVOICING enum value to the request property vendorIdentifier

      request-property-enum-value-added

    • added the new GovernanceNotEnabled enum value to the code response property for the response status 403

      response-property-enum-value-added

  • 2fee3609afd211See the full diff
    • added the new AIRWALLEX enum value to the data/integrations/items/vendorIdentifier response property for the response status 200

      response-property-enum-value-added

    • added the new AIRWALLEX enum value to the request property vendorIdentifier

      request-property-enum-value-added

    • added the new optional header request parameter X-ACCOUNT-ID

      new-optional-request-parameter

    • added the new optional header request parameter X-ENVIRONMENT-ID

      new-optional-request-parameter

    • added the new PricingModelNotSupportedByBillingIntegration enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new PREQUEL enum value to the data/integrations/items/vendorIdentifier response property for the response status 200

      response-property-enum-value-added

    • added the new PREQUEL enum value to the request property vendorIdentifier

      request-property-enum-value-added

    • added the new DataExportIntegrationError enum value to the code response property for the response status 400

      response-property-enum-value-added

  • b181b166a2a521See the full diff
    • added the new InvalidReceivedSignatureError enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new RECEIVED enum value to the data/integrations/items/vendorIdentifier response property for the response status 200

      response-property-enum-value-added

    • added the new RECEIVED enum value to the request property vendorIdentifier

      request-property-enum-value-added