---
title: "Update Order"
method: PATCH
path: "/v1/customer-portal/orders/{id}"
tags: ["customer_portal", "orders", "public"]
---

# Update Order

`PATCH /v1/customer-portal/orders/{id}`

Update an order for the authenticated customer.

## Path parameters

- `id` string, uuid4, required — The order ID.

## Request body

- CustomerOrderUpdate — Schema to update an order.
  - `billing_name` string, nullable — The name of the customer that should appear on the invoice.
  - `billing_address` AddressInput
    - `line1` string, nullable
    - `line2` string, nullable
    - `postal_code` string, nullable
    - `city` string, nullable
    - `state` string, nullable
    - `country` 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW', required

## Response `200`

Successful Response

- CustomerOrder
  - `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.
  - `status` 'draft' | 'pending' | 'paid' | 'refunded' | 'partially_refunded' | 'void', required
  - `paid` boolean, required — Whether the order has been paid for.
  - `subtotal_amount` integer, required — Amount in cents, before discounts and taxes.
  - `discount_amount` integer, required — Discount amount in cents.
  - `net_amount` integer, required — Amount in cents, after discounts but before taxes.
  - `tax_amount` integer, required — Sales tax amount in cents.
  - `total_amount` integer, required — Amount in cents, after discounts and taxes.
  - `applied_balance_amount` integer, required — Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance, or decrease it, if the customer has a positive balance.Amount in cents.
  - `due_amount` integer, required — Amount in cents that is due for this order.
  - `refunded_amount` integer, required — Amount refunded in cents.
  - `refunded_tax_amount` integer, required — Sales tax refunded in cents.
  - `currency` string, required
  - `billing_reason` 'purchase' | 'subscription_create' | 'subscription_cycle' | 'subscription_update', required
  - `billing_name` string, nullable, required — The name of the customer that should appear on the invoice.
  - `billing_address` Address, required
    - `line1` string, nullable
    - `line2` string, nullable
    - `postal_code` string, nullable
    - `city` string, nullable
    - `state` string, nullable
    - `country` 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW', required
  - `invoice_number` string, nullable, required — The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize.
  - `is_invoice_generated` boolean, required — Whether an invoice has been generated for this order.
  - `receipt_number` string, nullable, required — The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.
  - `seats` integer, nullable — Number of seats purchased (for seat-based one-time orders).
  - `customer_id` string, uuid4, required
  - `product_id` string, uuid4, nullable, required
  - `discount_id` string, uuid4, nullable, required
  - `subscription_id` string, uuid4, nullable, required
  - `checkout_id` string, uuid4, nullable, required
  - `next_payment_attempt_at` string, date-time, nullable — When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted.
  - `product` CustomerOrderProduct, required
    - `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.
    - `trial_interval` 'day' | 'week' | 'month' | 'year', required
    - `trial_interval_count` integer, nullable, required — The number of interval units for the trial period.
    - `name` string, required — The name of the product.
    - `description` string, nullable, required — The description of the product.
    - `visibility` 'draft' | 'private' | 'public', required
    - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
    - `recurring_interval_count` integer, nullable, required — Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
    - `meter_interval` 'day' | 'week' | 'month' | 'year', required
    - `meter_interval_count` integer, nullable, required — Number of meter interval units. None when no meter cycle is set.
    - `is_recurring` boolean, required — Whether the product is a subscription.
    - `is_archived` boolean, required — Whether the product is archived and no longer available.
    - `organization_id` string, uuid4, required — The ID of the organization owning the product.
    - `prices` union[], required — List of prices for this product.
      - union
        - union
          - LegacyRecurringProductPriceFixed — A recurring price for a product, i.e. a subscription. **Deprecated**: The recurring interval should be set on the product itself.
            - `created_at` string, date-time, required — Creation timestamp of the object.
            - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
            - `id` string, uuid4, required — The ID of the price.
            - `source` 'catalog' | 'ad_hoc', required
            - `amount_type` 'fixed', required
            - `price_currency` string, required — The currency in which the customer will be charged.
            - `tax_behavior` 'location' | 'inclusive' | 'exclusive', required
            - `is_archived` boolean, required — Whether the price is archived and no longer available.
            - `product_id` string, uuid4, required — The ID of the product owning the price.
            - `type` 'recurring', required — The type of the price.
            - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
            - `price_amount` integer, required — The price in cents.
            - `legacy` true, required
          - LegacyRecurringProductPriceCustom — A pay-what-you-want recurring price for a product, i.e. a subscription. **Deprecated**: The recurring interval should be set on the product itself.
            - `created_at` string, date-time, required — Creation timestamp of the object.
            - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
            - `id` string, uuid4, required — The ID of the price.
            - `source` 'catalog' | 'ad_hoc', required
            - `amount_type` 'custom', required
            - `price_currency` string, required — The currency in which the customer will be charged.
            - `tax_behavior` 'location' | 'inclusive' | 'exclusive', required
            - `is_archived` boolean, required — Whether the price is archived and no longer available.
            - `product_id` string, uuid4, required — The ID of the product owning the price.
            - `type` 'recurring', required — The type of the price.
            - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
            - `minimum_amount` integer, required — The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.
            - `maximum_amount` integer, nullable, required — The maximum amount the customer can pay.
            - `preset_amount` integer, nullable, required — The initial amount shown to the customer.
            - `legacy` true, required
        - union
          - ProductPriceFixed — A fixed price for a product.
            - `created_at` string, date-time, required — Creation timestamp of the object.
            - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
            - `id` string, uuid4, required — The ID of the price.
            - `source` 'catalog' | 'ad_hoc', required
            - `amount_type` 'fixed', required
            - `price_currency` string, required — The currency in which the customer will be charged.
            - `tax_behavior` 'location' | 'inclusive' | 'exclusive', required
            - `is_archived` boolean, required — Whether the price is archived and no longer available.
            - `product_id` string, uuid4, required — The ID of the product owning the price.
            - `price_amount` integer, required — The price in cents.
          - ProductPriceCustom — A pay-what-you-want price for a product.
            - `created_at` string, date-time, required — Creation timestamp of the object.
            - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
            - `id` string, uuid4, required — The ID of the price.
            - `source` 'catalog' | 'ad_hoc', required
            - `amount_type` 'custom', required
            - `price_currency` string, required — The currency in which the customer will be charged.
            - `tax_behavior` 'location' | 'inclusive' | 'exclusive', required
            - `is_archived` boolean, required — Whether the price is archived and no longer available.
            - `product_id` string, uuid4, required — The ID of the product owning the price.
            - `minimum_amount` integer, required — The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.
            - `maximum_amount` integer, nullable, required — The maximum amount the customer can pay.
            - `preset_amount` integer, nullable, required — The initial amount shown to the customer.
          - ProductPriceSeatBased — A seat-based price for a product.
            - `created_at` string, date-time, required — Creation timestamp of the object.
            - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
            - `id` string, uuid4, required — The ID of the price.
            - `source` 'catalog' | 'ad_hoc', required
            - `amount_type` 'seat_based', required
            - `price_currency` string, required — The currency in which the customer will be charged.
            - `tax_behavior` 'location' | 'inclusive' | 'exclusive', required
            - `is_archived` boolean, required — Whether the price is archived and no longer available.
            - `product_id` string, uuid4, required — The ID of the product owning the price.
            - `seat_tiers` ProductPriceSeatTiersOutput, required — List of pricing tiers for seat-based pricing. The minimum and maximum seat limits are derived from the tiers: - minimum_seats = first tier's min_seats - maximum_seats = last tier's max_seats (None for unlimited)
              - …
          - ProductPriceMeteredUnit — A metered, usage-based, price for a product, with a fixed unit price.
            - `created_at` string, date-time, required — Creation timestamp of the object.
            - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
            - `id` string, uuid4, required — The ID of the price.
            - `source` 'catalog' | 'ad_hoc', required
            - `amount_type` 'metered_unit', required
            - `price_currency` string, required — The currency in which the customer will be charged.
            - `tax_behavior` 'location' | 'inclusive' | 'exclusive', required
            - `is_archived` boolean, required — Whether the price is archived and no longer available.
            - `product_id` string, uuid4, required — The ID of the product owning the price.
            - `unit_amount` string, required — The price per unit in cents.
            - `cap_amount` integer, nullable, required — The maximum amount in cents that can be charged, regardless of the number of units consumed.
            - `meter_id` string, uuid4, required — The ID of the meter associated to the price.
            - `meter` ProductPriceMeter, required — A meter associated to a metered price.
              - …
    - `benefits` BenefitPublic[], required — List of benefits granted by the product.
      - `id` string, uuid4, required — The ID of the benefit.
      - `created_at` string, date-time, required — Creation timestamp of the object.
      - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
      - `type` 'custom' | 'discord' | 'github_repository' | 'downloadables' | 'license_keys' | 'meter_credit' | 'feature_flag' | 'slack_shared_channel', required
      - `description` string, required — The description of the benefit.
      - `selectable` boolean, required — Whether the benefit is selectable when creating a product.
      - `deletable` boolean, required — Whether the benefit is deletable.
      - `is_deleted` boolean, required — Whether the benefit is deleted.
      - `organization_id` string, uuid4, required — The ID of the organization owning the benefit.
    - `medias` ProductMediaFileRead[], required — List of medias associated to the product.
      - `id` string, uuid4, required — The ID of the object.
      - `organization_id` string, uuid4, required
      - `name` string, required
      - `path` string, required
      - `mime_type` string, required
      - `size` integer, required
      - `storage_version` string, nullable, required
      - `checksum_etag` string, nullable, required
      - `checksum_sha256_base64` string, nullable, required
      - `checksum_sha256_hex` string, nullable, required
      - `last_modified_at` string, date-time, nullable, required
      - `version` string, nullable, required
      - `service` 'product_media', required
      - `is_uploaded` boolean, required
      - `created_at` string, date-time, required
      - `size_readable` string, required
      - `public_url` string, required
    - `organization` CustomerOrganization, required
      - `created_at` string, date-time, required — Creation timestamp of the object.
      - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
      - `id` string, uuid4, required — The ID of the object.
      - `name` string, required — Organization name shown in checkout, customer portal, emails etc.
      - `slug` string, required — Unique organization slug in checkout, customer portal and credit card statements.
      - `avatar_url` string, nullable, required — Avatar URL shown in checkout, customer portal, emails etc.
      - `proration_behavior` 'invoice' | 'prorate' | 'next_period' | 'reset', required
      - `allow_customer_updates` boolean, required — Whether customers can update their subscriptions from the customer portal.
      - `customer_portal_settings` OrganizationCustomerPortalSettings, required
        - `usage` CustomerPortalUsageSettings, required
          - `show` boolean, required
        - `subscription` CustomerPortalSubscriptionSettings, required
          - `update_seats` boolean, required
          - `update_plan` boolean, required
          - `pause` boolean
        - `customer` CustomerPortalCustomerSettings
          - `allow_email_change` boolean
      - `organization_features` CustomerOrganizationFeatureSettings — Feature flags exposed to the customer portal.
        - `member_model_enabled` boolean — Whether the member model is enabled for this organization.
        - `checkout_localization_enabled` boolean — Whether localization is enabled for this organization.
  - `subscription` CustomerOrderSubscription, required
    - `created_at` string, date-time, required — Creation timestamp of the object.
    - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
    - `id` string, uuid4, required — The ID of the object.
    - `amount` integer, required — The amount of the subscription.
    - `currency` string, required — The currency of the subscription.
    - `recurring_interval` 'day' | 'week' | 'month' | 'year', required
    - `recurring_interval_count` integer, required — Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
    - `status` 'incomplete' | 'incomplete_expired' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'paused', required
    - `current_period_start` string, date-time, required — The start timestamp of the current billing period.
    - `current_period_end` string, date-time, required — The end timestamp of the current billing period.
    - `current_meter_period_start` string, date-time, nullable, required — The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.
    - `current_meter_period_end` string, date-time, nullable, required — The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.
    - `trial_start` string, date-time, nullable, required — The start timestamp of the trial period, if any.
    - `trial_end` string, date-time, nullable, required — The end timestamp of the trial period, if any.
    - `cancel_at_period_end` boolean, required — Whether the subscription will be canceled at the end of the current period.
    - `canceled_at` string, date-time, nullable, required — The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
    - `started_at` string, date-time, nullable, required — The timestamp when the subscription started.
    - `ends_at` string, date-time, nullable, required — The timestamp when the subscription will end.
    - `ended_at` string, date-time, nullable, required — The timestamp when the subscription ended.
    - `past_due_at` string, date-time, nullable — The timestamp when the subscription entered `past_due` status.
    - `pause_at_period_end` boolean, required — Whether the subscription will be paused at the end of the current period.
    - `paused_at` string, date-time, nullable, required — The timestamp when the subscription was paused.
    - `resumes_at` string, date-time, nullable, required — The timestamp when a paused subscription is scheduled to automatically resume, if set.
    - `customer_id` string, uuid4, required — The ID of the subscribed customer.
    - `product_id` string, uuid4, required — The ID of the subscribed product.
    - `discount_id` string, uuid4, nullable, required — The ID of the applied discount, if any.
    - `checkout_id` string, uuid4, nullable, required
    - `seats` integer, nullable — The number of seats for seat-based subscriptions. None for non-seat subscriptions.
    - `customer_cancellation_reason` 'customer_service' | 'low_quality' | 'missing_features' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused' | 'other', required
    - `customer_cancellation_comment` string, nullable, required
  - `items` OrderItemSchema[], required — Line items composing the order.
    - `created_at` string, date-time, required — Creation timestamp of the object.
    - `modified_at` string, date-time, nullable, required — Last modification timestamp of the object.
    - `id` string, uuid4, required — The ID of the object.
    - `label` string, required — Description of the line item charge.
    - `amount` integer, required — Amount in cents, before discounts and taxes.
    - `tax_amount` integer, required — Sales tax amount in cents.
    - `proration` boolean, required — Whether this charge is due to a proration.
    - `product_price_id` string, uuid4, nullable, required — Associated price ID, if any.
  - `description` string, required — A summary description of the order.
  - `refundable_amount` integer, required — Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.
  - `refundable_tax_amount` integer, required — Sales tax in cents that would be refunded if the full refundable amount is refunded.

## Other responses

- `404` — Order not found.
- `422` — Validation Error

---

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