---
title: "Update payment settings"
description: "Update a deep partial of the canonical payment settings. Full and partial are stable kind selectors."
url: https://docs.stoqapp.com/v2-reference/preorders-offers/update-payment-settings/
api: "API v2 reference"
method: PATCH
path: "/preorders/offers/{id}/payments"
---

# Update payment settings

`PATCH https://app.stoqapp.com/api/v2/external/preorders/offers/{id}/payments`

Update a deep partial of the canonical payment settings. Full and partial are stable kind selectors.

**Note:** Omitted fields stay unchanged. Null clears copy or price_adjustment. Explicit options_offered adds/removes kinds. Choose full or partial for ambiguous billing copy. Read-only and unknown fields are rejected. Invalid patches write nothing locally; publication runs after commit.

## Path parameters

- `id` (string, required): The offer's ID, from [`GET /preorders/offers`](https://docs.stoqapp.com/v2-reference/preorders-offers/list-offers/).

## Headers

- `Idempotency-Key` (string): A fresh unique key for every write (a new UUID, say); reuse it only to retry that write. Keys are remembered for 1 hour: the same key and the same request within that hour returns the first result, with `Idempotent-Replayed: true`, without running again; the same key with a different method, path or body is refused (422 `idempotency_key_reused`); a retry while the first is still running gets 409 `idempotency_key_in_progress`. Keys are per store. Server errors and rate limits are not kept, so their retry runs.

## Request body

- `options_offered` (string): Explicitly add or remove full/partial payment kinds. Omitted kinds remain offered. Mode changes initialize payment widget and cart attributes. One of: `full`, `partial`, `full_and_partial`.
- `default_option` (string): Select an offered, synced full or partial kind as the default. One of: `full`, `partial`.
- `full` (object): Settings for the full-payment option, where shoppers pay everything at checkout.
  - `option_title` (string, nullable): Billing Title for full payment.
  - `option_description` (string, nullable): Billing Description for full payment.
  - `discount_text` (string, nullable): Discount copy for full payment.
  - `price_adjustment` (object, nullable)
    - `adjustment_type` (string, nullable): Percentage or fixed amount discount. Null clears the discount. One of: `percentage`, `fixed_amount`, `null`.
    - `adjustment_amount` (number, nullable): Discount amount; an omitted type uses the saved type.
- `partial` (object): Settings for the partial-payment option, where shoppers pay a deposit at checkout and the balance later.
  - `option_title` (string, nullable): Billing Title for partial payment.
  - `option_description` (string, nullable): Billing Description for partial payment.
  - `discount_text` (string, nullable): Discount copy for partial payment.
  - `price_adjustment` (object, nullable)
    - `adjustment_type` (string, nullable): Percentage or fixed amount discount. Null clears the discount. One of: `percentage`, `fixed_amount`, `null`.
    - `adjustment_amount` (number, nullable): Discount amount; an omitted type uses the saved type.
  - `checkout_charge` (object)
    - `charge_type` (string): Deposit as percentage or price. One of: `percentage`, `price`.
    - `charge_amount` (number): Checkout deposit; percentage must not exceed 100. 0 is the editor's &quot;No upfront payment&quot;: nothing is charged at checkout.
  - `remaining_balance` (object)
    - `charge_trigger` (string): Collect at an exact time or days after checkout. One of: `exact_time`, `time_after_checkout`.
    - `charge_exact_time` (string, nullable): ISO 8601 datetime, required for exact_time; otherwise null.
    - `days_after_checkout` (integer, nullable): Positive days, required for time_after_checkout; otherwise null.
- `collection_schedule` (string): Collect the remaining balance manually, on its scheduled date, or on fulfillment. A balance due date alone charges nothing: &quot;charge the rest after N days&quot; also needs scheduled, and while it stays manual say the merchant collects it. One of: `manual`, `scheduled`, `on_fulfillment`.
- `show_payment_widget` (boolean): Show payment &amp; discount savings. Also turns the payment cart attribute (advanced.cart_attributes.show_payment) on or off, as the editor does.
- `show_discounted_price` (boolean): Show discounted price.
- `locale` (string): Language the translated fields are written in, such as 'fr' or 'pt-BR'. Omitted: the shop's default language. Untranslated fields ignore it.

## Returns

- `options_offered` (string): Payment options the offer has. One of: `full`, `partial`, `full_and_partial`.
- `default_option` (string): Payment option selected by default at checkout. One of: `full`, `partial`.
- `partial` (object): The partial-payment option, where shoppers pay a deposit at checkout and the balance later. Absent when the offer has no partial-payment option.
  - `selling_plan_id` (string, nullable): This option's Shopify selling plan, as gid://shopify/SellingPlan/&lt;id&gt;. Null until it exists in Shopify.
  - `checkout_charge` (object): The deposit charged at checkout.
    - `charge_type` (string): percentage charges charge_amount percent of the price; price charges charge_amount in the shop's currency. One of: `percentage`, `price`.
    - `charge_amount` (number): The deposit: a percent from 0 to 100 when charge_type is percentage, or an amount in the shop's currency (not minor units) when it is price. 0 charges nothing at checkout.
  - `remaining_balance` (object): When the remaining balance is charged.
    - `charge_trigger` (string): exact_time charges the balance on charge_exact_time; time_after_checkout charges it days_after_checkout days after checkout. One of: `exact_time`, `no_remaining_balance`, `time_after_checkout`.
    - `charge_exact_time` (string, nullable): When the balance is due, ISO 8601 in UTC. Null unless charge_trigger is exact_time.
    - `days_after_checkout` (integer, nullable): Days after checkout that the balance is due. Null unless charge_trigger is time_after_checkout.
  - `price_adjustment` (object): Discount on this option's price.
    - `adjustment_type` (string, nullable): percentage takes adjustment_amount percent off; fixed_amount and price take adjustment_amount off in the shop's currency. Null when there is no discount. One of: `percentage`, `price`, `fixed_amount`.
    - `adjustment_amount` (integer, nullable): Discount size: a percent, or an amount in the shop's currency (not minor units), per adjustment_type. Null when there is no discount.
  - `option_title` (string): Title of the partial-payment option in the payment widget.
  - `option_description` (string): Description of the partial-payment option in the payment widget. Null when not set.
  - `discount_text` (string): Text describing the partial-payment discount.
- `collection_schedule` (string): How the remaining balance is collected: manual by the merchant, scheduled on its due date, or on_fulfillment. One of: `manual`, `scheduled`, `on_fulfillment`.
- `show_payment_widget` (boolean): Whether the payment and discount savings widget shows on the product page.
- `show_discounted_price` (boolean, nullable): Whether the discounted price shows. Null when never set.
- `currency_code` (null): The shop's currency, as an ISO 4217 code such as USD. Amounts in this section are in it.
- `full` (object): The full-payment option, where shoppers pay everything at checkout. Absent when the offer has no full-payment option.
  - `selling_plan_id` (string, nullable): This option's Shopify selling plan, as gid://shopify/SellingPlan/&lt;id&gt;. Null until it exists in Shopify.
  - `checkout_charge` (object): What is charged at checkout. Always 100 percent for full payment.
    - `charge_type` (string): Always percentage for full payment. One of: `percentage`, `price`.
    - `charge_amount` (integer): Always 100 for full payment.
  - `remaining_balance` (object): When the remaining balance is charged. Nothing remains on full payment.
    - `charge_trigger` (string): Always no_remaining_balance for full payment. One of: `exact_time`, `no_remaining_balance`, `time_after_checkout`.
    - `charge_exact_time` (null): Always null for full payment.
    - `days_after_checkout` (null): Always null for full payment.
  - `price_adjustment` (object): Discount on this option's price.
    - `adjustment_type` (string, nullable): percentage takes adjustment_amount percent off; fixed_amount and price take adjustment_amount off in the shop's currency. Null when there is no discount. One of: `percentage`, `price`, `fixed_amount`.
    - `adjustment_amount` (integer, nullable): Discount size: a percent, or an amount in the shop's currency (not minor units), per adjustment_type. Null when there is no discount.
  - `option_title` (string): Title of the full-payment option in the payment widget.
  - `option_description` (string, nullable): Description of the full-payment option in the payment widget. Null when not set.
  - `discount_text` (string): Text describing the full-payment discount.
- `also_changed` (array of objects): Settings this write changed on its own because they depend on what you changed (turning one option off can reset another). Absent when nothing else changed.
  - `field_path` (string): Dotted path of the changed field in this response, when it is one.
  - `setting` (string): The setting that changed, as the dashboard names it.
  - `from` (boolean, nullable): Its value before the write.
  - `to` (string): Its value after the write.
  - `reason` (string): Why it changed.

Rate limit: this call costs 2 points ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Example request

```sh
curl -X PATCH "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments" \
  -H "X-Auth-Token: $STOQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "options_offered": "full_and_partial",
    "partial": {
      "checkout_charge": {
        "charge_type": "percentage",
        "charge_amount": 25
      },
      "remaining_balance": {
        "charge_trigger": "exact_time",
        "charge_exact_time": "2026-09-15T12:00:00-04:00"
      }
    },
    "collection_schedule": "scheduled"
  }'
```

## 202

Success: example response shown.

```json
{
  "options_offered": "full_and_partial",
  "default_option": "full",
  "full": {
    "selling_plan_id": "gid://shopify/SellingPlan/101",
    "checkout_charge": {
      "charge_type": "percentage",
      "charge_amount": 100
    },
    "remaining_balance": {
      "charge_trigger": "no_remaining_balance",
      "charge_exact_time": null,
      "days_after_checkout": null
    },
    "price_adjustment": {
      "adjustment_type": null,
      "adjustment_amount": null
    },
    "option_title": "Full payment",
    "option_description": "Pay the full price now",
    "discount_text": "Save {{ discount }}"
  },
  "partial": {
    "selling_plan_id": "gid://shopify/SellingPlan/102",
    "checkout_charge": {
      "charge_type": "percentage",
      "charge_amount": 25
    },
    "remaining_balance": {
      "charge_trigger": "exact_time",
      "charge_exact_time": "2026-09-15T16:00:00Z",
      "days_after_checkout": null
    },
    "price_adjustment": {
      "adjustment_type": null,
      "adjustment_amount": null
    },
    "option_title": "Reserve now, pay later",
    "option_description": "Pay {{ payment }} now and the remaining will be charged when your product is shipped.",
    "discount_text": "Save {{ discount }}"
  },
  "collection_schedule": "scheduled",
  "show_payment_widget": true,
  "show_discounted_price": null,
  "currency_code": "USD",
  "also_changed": [
    {
      "field_path": "payments.show_payment_widget",
      "setting": "show_payment_widget",
      "from": false,
      "to": true,
      "reason": "Initialized by the payment mode change."
    },
    {
      "field_path": "advanced.cart_attributes.show_payment",
      "setting": "Payment cart attribute",
      "from": false,
      "to": true,
      "reason": "Enabled for partial payment."
    }
  ]
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 404

The resource does not exist for this shop, or the action path is not registered.

```json
{
  "errors": [
    "Offer not found"
  ],
  "code": "not_found",
  "details": [
    {
      "code": "not_found",
      "message": "Offer not found",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 409

An earlier request with the same Idempotency-Key is still running. Wait, then resend the same request with the same key.

```json
{
  "errors": [
    "A request with this Idempotency-Key is still running"
  ],
  "code": "idempotency_key_in_progress",
  "details": [
    {
      "code": "idempotency_key_in_progress",
      "message": "A request with this Idempotency-Key is still running",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

Invalid fields: one `details` entry per field error, its `path` the canonical section path. Nothing was saved.

```json
{
  "errors": [
    "widget.button.text_color must be a hex color"
  ],
  "code": "invalid_params",
  "details": [
    {
      "code": "invalid_params",
      "message": "must be a hex color",
      "path": "widget.button.text_color",
      "value": "blue",
      "expected": {
        "type": "string"
      }
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

