Prices

Create a Price

Create a new Price with the provided details

post/prices

Request body

metadataobject nullable

Metadata used by merchants to store additional information about the entity.

namestring required

Price name

type'one_time' | 'recurring' required

Price type

amountnumber

Payment amount in minor units (e.g., cents). For recurring prices, this is the amount charged each billing cycle. 0 makes the price free: it can be bundled alongside a paid item, and a free recurring price renews every cycle without ever reaching a payment provider.

quantitynumber

Number of units this price represents. The amount covers all of them, so referencing this price creates a line item of this quantity with a per-unit amount of amount / quantity. Defaults to 1.

currency'usd' | 'eur' | 'gbp' | 'cad' | 'aud' | 'pln' | 'czk' | 'sek' | 'dkk' required

Payment currency

productstring required

Product ID

Example request

{
  "metadata": {
    "orderId": "12345",
    "notes": "Urgent delivery"
  },
  "name": "Some price",
  "type": "one_time",
  "amount": 1500,
  "quantity": 4,
  "currency": "usd",
  "product": "prod_2QGNGy637hJ9MnD5cK7thAjSvPV",
  "recurringSchedule": {
    "intervalUnit": "month",
    "intervalCount": 1,
    "trial": {
      "intervalUnit": "day",
      "intervalCount": 7,
      "amount": 199
    }
  }
}

Response

OK

createdAtstring date-time required

The date and time when the entity was created.

updatedAtstring date-time nullable required

The date and time when the entity was last updated.

metadataobject nullable

Metadata used by merchants to store additional information about the entity.

idstring required

ID of the price

type'one_time' | 'recurring' required

Type of the price

activeboolean required

Indicates if the price is currently active. Inactive prices will be hidden from the dashboard, but can still be used in the API.

namestring

Name of the price. Only available from the dashboard or the API using a secret key.

amountnumber required

Amount of the price in minor units (e.g., cents)

quantitynumber required

Number of units this price represents. The amount covers all of them, so a line item referencing this price gets this quantity at a per-unit amount of amount / quantity.

currency'usd' | 'eur' | 'gbp' | 'cad' | 'aud' | 'pln' | 'czk' | 'sek' | 'dkk' required

Currency of the price

Example response

{
  "createdAt": "2024-02-18T12:00:00Z",
  "updatedAt": "2024-02-21T12:15:00Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "id": "price_2R4e2xDqbww8ewmkIYWE1A6Zcfp",
  "type": "recurring",
  "active": true,
  "name": "My Digital Subscription",
  "amount": 1500,
  "quantity": 1,
  "currency": "usd",
  "product": {
    "createdAt": "2024-02-18T12:00:00Z",
    "updatedAt": "2024-02-21T12:15:00Z",
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    },
    "id": "prod_2QC7PqoUeOxQEWscJJt6B3PkvyL",
    "active": true,
    "name": "My product",
    "description": "Best selling product",
    "statementDescriptor": "Face Yoga subscription",
    "category": "digital",
    "sku": "FY-YOGA-MAT-01"
  },
  "billingSchedule": {
    "createdAt": "2024-02-18T12:00:00Z",
    "updatedAt": "2024-02-21T12:15:00Z",
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    },
    "id": "bsch_2QC7PqoUeOxQEWscJJt6B3PkvyL",
    "currency": "usd",
    "cycleDefinitions": [
      {
        "createdAt": "2024-02-18T12:00:00Z",
        "updatedAt": "2024-02-21T12:15:00Z",
        "metadata": {
          "key1": "value1",
          "key2": "value2"
        },
        "position": 1,
        "amount": 1500,
        "currency": "usd"
      }
    ]
  },
  "recurringSchedule": {
    "intervalUnit": "month",
    "intervalCount": 1,
    "trial": {
      "intervalUnit": "day",
      "intervalCount": 7,
      "amount": 199
    }
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.