> ## Documentation Index
> Fetch the complete documentation index at: https://docs.easner.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a price

> A price on one of your products. Honours `Idempotency-Key`. `interval`, `interval_count` and `trial_days` make it recurring. Leave `interval` out, or send `none`, for a one-time price.



## OpenAPI

````yaml /openapi.yaml post /v1/prices
openapi: 3.2.0
info:
  title: Easner API
  version: '1'
  summary: Banking, Checkout, Connect and platform routes on the Easner v1 API.
  description: >
    Every route and method under `/v1`. The paths, scopes and fields are taken
    from the route handlers and their

    validators. Amounts are integers in the smallest currency unit (cents).
    Every list uses one cursor shape:

    `limit`, `starting_after`, `ending_before`, and `created[gte]` /
    `created[lte]` where the endpoint is dated.


    Authenticate with a secret key (`easner_sk_test_…` or `easner_sk_live_…`) as
    a bearer token. One key works for

    Banking, Checkout and Connect; scopes decide what each key can call. See
    [Authentication](/authentication) and

    [API keys and scopes](/api-keys). Webhook payloads are described under
    `webhooks`.
  termsOfService: https://www.easner.com
  contact:
    name: Easner support
    url: https://www.easner.com
servers:
  - url: https://api.easner.com
    description: Production (live and test, chosen by the key)
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: Banking customers (`cus_`). Create, list, retrieve and start verification.
  - name: Accounts
    description: Banking accounts (`acct_`), deposit details and card onramp sessions.
  - name: Payment methods
    description: The catalogue of ways to send and receive money.
  - name: Destinations
    description: Where money is sent (`dest_`).
  - name: Quotes
    description: Priced quotes for a send (`qt_`).
  - name: Transfers
    description: Sends of money (`tr_`), with customer authorization.
  - name: Transactions
    description: The ledger of banking movements (`txn_`).
  - name: Checkout sessions
    description: Hosted, overlay and inline checkout sessions (`cs_`).
  - name: Payments
    description: Settled checkout payments.
  - name: Refunds
    description: Refunds of checkout payments (`re_`).
  - name: Subscriptions
    description: Recurring checkout subscriptions (`sub_`).
  - name: Checkout customers
    description: Checkout customers (UUID ids). Not the banking customers above.
  - name: Customer portal
    description: Signed links to the customer portal.
  - name: Products
    description: Products for checkout and payment links.
  - name: Prices
    description: 'Prices on products. A price is immutable: only `active` changes.'
  - name: Promotion codes
    description: >-
      Codes customers type at checkout. A code is immutable: only `active`
      changes.
  - name: Discounts
    description: A discount granted to one email. It applies when that email checks out.
  - name: Publishable keys
    description: Browser check for a publishable key. Not for your server.
  - name: Connect
    description: >-
      Payees (`pye_`), credits, payouts and the ledger. Pay the people on your
      platform into their own Easner accounts.
  - name: API keys
    description: Keys of this mode. Creating a key stays in Console.
  - name: Webhook endpoints
    description: Where Easner sends events. The signing secret is shown once, on create.
  - name: Webhooks
    description: >-
      Events Easner sends to your endpoints. Each is a POST with an
      `easner-signature` header.
paths:
  /v1/prices:
    post:
      tags:
        - Prices
      summary: Create a price
      description: >-
        A price on one of your products. Honours `Idempotency-Key`. `interval`,
        `interval_count` and `trial_days` make it recurring. Leave `interval`
        out, or send `none`, for a one-time price.
      operationId: createPrice
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product
                - unit_amount
              properties:
                product:
                  type: string
                  format: uuid
                  description: A product id of this mode.
                unit_amount:
                  type: integer
                  minimum: 1
                  description: Whole cents, above zero.
                currency:
                  type: string
                  pattern: ^[A-Za-z]{3}$
                  default: USD
                interval:
                  type: string
                  enum:
                    - day
                    - week
                    - month
                    - year
                    - none
                interval_count:
                  type: integer
                  minimum: 1
                  description: >-
                    Every N periods. Up to 365 days, 52 weeks, 12 months, or 1
                    year.
                trial_days:
                  type: integer
                  minimum: 0
                  maximum: 730
                per_seat:
                  type: boolean
                  default: false
                  description: >-
                    Recurring only. True makes unit_amount the price for each
                    seat.
                min_quantity:
                  type: integer
                  minimum: 1
                  maximum: 10000
                  description: Per-seat only. The fewest seats a customer can have.
                max_quantity:
                  type: integer
                  minimum: 1
                  maximum: 10000
                  description: >-
                    Per-seat only. The most seats a customer can buy. Default
                    10,000.
                tiers_mode:
                  type: string
                  enum:
                    - graduated
                    - volume
                  description: >-
                    Per-seat only, with tiers. graduated bills each seat at the
                    price of its own band. volume bills every seat at the price
                    of the band the whole team lands in.
                tiers:
                  type: array
                  minItems: 2
                  maxItems: 8
                  description: >-
                    Per-seat only. The price per seat by team size. Send these
                    instead of unit_amount. The last band has up_to null.
                  items:
                    type: object
                    required:
                      - up_to
                      - unit_amount
                    properties:
                      up_to:
                        type:
                          - integer
                          - 'null'
                        description: The last seat in the band. null for the last band.
                      unit_amount:
                        type: integer
                        description: Whole cents for one seat in this band.
                active:
                  type: boolean
                  default: true
      responses:
        '200':
          description: The price made by an earlier call with the same Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Price'
        '201':
          description: The price.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Price'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Up to 255 characters. Keys are scoped to your business and mode. Longer
        is `400` `invalid_idempotency_key`. Honoured only on the operations
        marked idempotent.
      schema:
        type: string
        maxLength: 255
  schemas:
    Price:
      type: object
      required:
        - object
        - id
        - livemode
        - product
        - currency
        - unit_amount
        - mode
        - interval
        - interval_count
        - trial_days
        - per_seat
        - min_quantity
        - active
        - created
      properties:
        object:
          const: price
        id:
          type: string
          format: uuid
        livemode:
          type: boolean
        product:
          type: string
          format: uuid
        currency:
          type: string
        unit_amount:
          type: integer
          description: Whole cents for one unit.
        mode:
          type: string
          enum:
            - one_time
            - subscription
        interval:
          type:
            - string
            - 'null'
          enum:
            - day
            - week
            - month
            - year
            - null
        interval_count:
          type:
            - integer
            - 'null'
        trial_days:
          type:
            - integer
            - 'null'
        per_seat:
          type: boolean
          description: >-
            A per-seat price: the seats are the quantity, and the customer can
            change them.
        min_quantity:
          type:
            - integer
            - 'null'
          description: The fewest seats a per-seat price is billed for.
        max_quantity:
          type:
            - integer
            - 'null'
          description: >-
            The most seats a per-seat price can be bought for. null: up to
            10,000.
        tiers_mode:
          type:
            - string
            - 'null'
          enum:
            - graduated
            - volume
            - null
          description: Set on a tiered price.
        tiers:
          type:
            - array
            - 'null'
          description: The price per seat by team size. unit_amount is the first band.
          items:
            type: object
            properties:
              up_to:
                type:
                  - integer
                  - 'null'
              unit_amount:
                type: integer
        active:
          type: boolean
        created:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - type
        - code
        - message
      properties:
        type:
          type: string
          enum:
            - authentication
            - permission
            - invalid_request
            - rate_limit
            - api_error
          description: >-
            authentication is 401. permission is 403. invalid_request is 400,
            404 or 409. rate_limit is 429. api_error is 5xx.
        code:
          type: string
          description: >-
            The stable code, for example invalid_api_key, key_forbidden,
            invalid_amount or rate_limit.
        message:
          type: string
        fields:
          type: array
          description: The fields that are wrong, on validation errors.
          items:
            type: object
            required:
              - name
              - message
            properties:
              name:
                type: string
              message:
                type: string
  responses:
    Error:
      description: >-
        An error. Branch on `error.type` and `error.code`. Do not parse
        `error.message`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: easner_sk_test_…
      description: >-
        A secret key, easner_sk_test_… or easner_sk_live_…, as Authorization:
        Bearer. Each key has one business, one mode and fixed scopes. Transfer
        routes also accept a transfer's easner_ta_… secret for the customer.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.