Create a price

Price is a numerical amount to pay that is associated with a product. Speed intends for its users to be able to create a price, associate that price with a product, associate that product with an invoice, and share it with their customers in order to be paid.

The Speed web application allows you to define multiple prices for a product by creating multiple prices for the same product. Alternatively you can extend the functionality and create price from Price in Speed platform APIs, in addition to the benefits of this no-code option.

Create price via Speed web application

Log in to your account and follow the steps below to create a price.

  1. Go to Products.
  2. Add/Edit product and open the product detail page.
  3. Click Next on the Product detail page.
  4. Fill in the price details like currency and amount.
  5. Click on Add Another Price to add multiple prices for the product and repeat the same process

📘

By adding another price, you can also add the same price in a different currency. It is used to bind price for a customer with a default currency.

For example: Product_1 has one price - Price_1

Price_1 has 3 currency options,

  1. USD - 10
  2. GBP - 8
  3. AUD - 15

Now for a customer if default currency defined is AUD then when user selects [email protected] customer and Product 1, system assigns default price in AUD.

Create price via API

Create a price using the /prices endpoint and basic details such as currency, amount and others.

Make a POST /prices request specifying the following mandatory parameters.

  • currency
  • unit amount
  • product ID or product data

In this example below, we’ll show how you can create a price for an existing product.

{
    "currency":"USD",
    "product":"prod_lkwffs99DcPK5Wqa",
    "unit_amount":10,
		"nickname":"Test price",
		"description":"Test description",
		"metadata":{
			"country":"US"
		}
}

In this example below, we’ll show how you can create a price for a new product.

{
    "currency":"USD",
    "product_data" :{
        "name":"Test Name"
    },
    "unit_amount":5
}

You can also include other optional parameters, for example. nickname, metadata.

Request parameters

Provide the basic information outlined in the table below:

ParameterRequiredTypeDescription
CurrencyStringYou can use this parameter to specify the currency of the price of your product.
Unit AmountStringYou can use this parameter to provide the amount of the price of your product.
Product IDStringYou can use this parameter to specify the ID of the product for which the price is to be added.
Product DataObjectYou can use this object to add a new product with the provided details. If you want to add price for a new product, use this object.
NicknameStringYou can use this as a brief description of the price, hidden from customers.

📘

Any one parameter among “product ID” or “product data” is mandatory.

More information can be found in our API reference.

Response parameters

{
    "id": "price_lkwgtqj4i9AcUlhV",
    "object": "price",
    "active": true,
    "nickname": "Test price",
    "description": "Test description",
    "product": "prod_lkwffs99DcPK5Wqa",
    "type": "one_time",
    "unit_amount": 12,
    "billing_scheme": "per_unit",
    "currency": "USD",
    "currency_options": {
        "USD": {
            "unit_amount": 12
        }
    },
    "metadata": {
        "country": "US"
    },
    "transform_quantity": null,
    "created": 1691146271632,
    "modified": 1691146271632
}

Attributes


id string
Unique identifier for the object.


object string
The type of the object indicates to which entity this response belongs.


active boolean
It can have values true or false. Upon creation, by default, it will be true.


nickname string
This attribute represents nickname of your price.


description string
This attribute represents additional information about your price.


product string
This attribute represents the product ID of the existing product.


type string
This attribute represents the type of price.


unit_amount decimal
This attribute represents the amount of the price.


billing_scheme string
This attribute describes how to compute the price. per_unit indicates charging customer a fixed price for each individual unit of a product or service they consume or acquire.

Under the per_unit billing scheme, the price per unit remains constant, regardless of the total quantity purchased.


currency string
This attribute represents the currency of your price.


currency options string
This attribute represents the amount of the price.


metadata object
You can use this to store additional information about the object in a structured format.


created timestamp
Time at which the price was created.


modified timestamp
Time at which the last modification was made.