Skip to main content

Find with ID

Returns a single price by id.

Examples

\SureCart\Models\Price::with([
'product'
])->find('8ba8d60f-5277-4e6b-807c-dee8166446d5');

Parameters

id string

Response Attributes

id string

The UUID of the specific object.

object string

A string describing the object type returned.

ad_hoc boolean

Whether or not this price accepts ad hoc amounts – also known as custom or user-defined amounts.

ad_hoc_max_amount integer

The maximum ad hoc amount in cents to be allowed, represented as a whole integer. For example `9900` is equivalent to `$99`.

ad_hoc_min_amount integer

The minimum ad hoc amount in cents to be allowed, represented as a whole integer. For example `9900` is equivalent to `$99`. If left blank, this will be interpreted as `0`.

amount integer

The amount in cents to be charged, represented as a whole integer. For example `9900` is equivalent to `$99`. If `ad_hoc=true` the `amount` is optional.

archived boolean

Whether or not this price is archived.

currency string

Three-letter ISO currency code, in lowercase. If not set, this value will fallback to the default `Account` currency.

recurring_interval string

The frequency at which a subscription is billed. One of `day`, `week`, `month`, or `year`.

recurring_interval_count integer

The number of intervals (specified in the `recurring_interval` attribute) between subscription billings. For example, `recurring_interval=month` and `recurring_interval_count=3` bills every 3 months. The total duration of a billing cycle is not allowed to exceed 1 year.

recurring_period_count integer

The number of periods a subscription with this price will renew for. After this amount of periods, the subscription will move to the `completed` state.

recurring_end_behavior string

The behavior of a subscription after it's final renewal period. This is only applicable to prices that have `recurring_period_count` defined. One of `cancel` or `complete`.

tax_behavior string

Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive` or `exclusive`.

trial_duration_days integer

The default number of trial days when subscribing a customer to this price.

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.

archived_at integer

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

full_amount integer

The full amount to be charged across all periods, represented as a whole integer. For prices without a `recurring_period_count` defined this is the same as `amount`. For finite prices, this is equal to `amount` * `recurring_period_count`. For example, a price that has an amount of $25 and is set to recur over 4 periods, will have a `full_amount` of $100.

current_version boolean

Whether or not this object represents the current version of this Price. (This will only be `false` if this `Price` is associated with a `LineItem` prior to it being changed. In this case we will lookup the version of the `Price` at the time it was associated.)

product expandable

The associated product.

created_at integer

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

updated_at integer

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