Skip to main content
POST
/
v1
/
prices
/
{id}
Update a price
curl --request POST \
  --url https://api.yorlet.com/v1/prices/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "active": true,
  "default_tax_rate": "<string>",
  "default_transfer_destination": "<string>",
  "description": "<string>",
  "metadata": {},
  "tax_behavior": "inclusive",
  "transfer_behavior": "owner",
  "name": "<string>"
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "price",
  "active": true,
  "amount": 123,
  "currency": "gbp",
  "default_tax_rate": "<string>",
  "default_transfer_destination": "<string>",
  "description": "<string>",
  "product": "<string>",
  "recurring": {
    "interval": "month",
    "interval_count": 123
  },
  "transfer_behavior": "owner",
  "type": "recurring",
  "account": "<string>",
  "deleted": false,
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Body

application/json
active
boolean

Whether the price is active.

default_tax_rate
string

The default tax rate for the price.

Pattern: ^[a-zA-Z0-9_]+$
default_transfer_destination
string

The default transfer destination for the price.

Pattern: ^[a-zA-Z0-9_]+$
description
string

The description of the price.

metadata
object

The metadata for the price.

tax_behavior
enum<string>

The tax behavior for the price.

Available options:
inclusive,
exclusive,
unspecified
transfer_behavior
enum<string>

The transfer behavior for the price.

Available options:
owner,
none
name
string

The name of the price.

Response

200 - application/json

Returns the price object if the update succeeded.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
price
active
boolean
required

Whether the price is active.

amount
integer
required

The amount of the price, represented as a whole integer.

currency
enum<string>
required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

Available options:
gbp,
usd,
eur,
sek
Example:

"gbp"

default_tax_rate
required

The default tax rate for the price.

default_transfer_destination
required

The default transfer destination for the price.

description
string | null
required

The description of the price.

product
required

The product the price belongs to.

recurring
object
required

The recurring interval for the price.

transfer_behavior
enum<string> | null
required

The transfer behavior for the price.

Available options:
owner,
none,
null
type
enum<string>
required

The type of the price.

Available options:
recurring,
one_time
account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.