v1

latestOpenAPI 3.1.0MIT2026-07-243952451019.0 KB
Products::Price

Create Price

Create a new price for a given variant. Note that you must set a variant_id in the path.

post/products/variants/{variant_id}/prices

Path parameters

variant_idinteger required

Request body

Example request

{
  "products_price": {
    "products_price": {
      "name": "Example Price",
      "amount": "100.00",
      "cost": "0.00",
      "currency": "USD",
      "duration": null,
      "interval": null,
      "trial_interval": null,
      "trial_duration": null,
      "trial_amount": "0.00",
      "setup_amount": null,
      "self_cancel": true,
      "self_upgrade": true,
      "self_downgrade": true,
      "self_reactivate": true,
      "interval_count": null,
      "payment_type": "one_time",
      "visible": true,
      "compare_at_amount": null,
      "key": null,
      "archived": false
    }
  }
}

Response

Created

idinteger

ID

public_idstring nullable

Price public ID

variant_idinteger nullable

Variant

namestring nullable

Name

amountstring

Amount

coststring nullable

Cost

currencystring

Currency

durationstring

Duration

intervalstring

Interval

trial_intervalstring

Trial interval

trial_durationstring

Trial duration

trial_amountstring

Trial Amount

setup_amountstring nullable

Setup amount

self_cancelboolean nullable

Customer can cancel

self_upgradeboolean nullable

Customer can upgrade

self_downgradeboolean nullable

Customer can downgrade

self_reactivateboolean nullable

Customer can reactivate

interval_countstring

Interval count

payment_type'one_time' | 'subscription' | 'payment_plan' nullable

Defaults to 'one_time' if left blank

visibleboolean nullable

Visible

compare_at_amountstring nullable

Compare at amount

keystring nullable

Key

archivedboolean nullable

Archived

created_atstring date-time nullable

Added

updated_atstring date-time nullable

Updated

Example response

{
  "id": 14,
  "public_id": "WpEGzF",
  "variant_id": 14,
  "name": "Example Price",
  "amount": "100.00",
  "cost": "0.00",
  "currency": "USD",
  "duration": null,
  "interval": null,
  "trial_interval": null,
  "trial_duration": null,
  "trial_amount": "0.00",
  "setup_amount": null,
  "self_cancel": true,
  "self_upgrade": true,
  "self_downgrade": true,
  "self_reactivate": true,
  "interval_count": null,
  "payment_type": "one_time",
  "visible": true,
  "compare_at_amount": null,
  "key": null,
  "archived": false,
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:00:00.000Z"
}