Skip to main content

Update proration policy

PUT 

/subscriptions/proration-policies/:proration_policy_uuid

You can update a proration policy at any time. For any subscriptions that are using the updated proration policy, the changes are also applied. Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the proration policy is not updated.

When updating proration policies:

  • You can change the name of an existing policy.
  • You can update rounding.
  • You can update external_ref as long as external_ref is still unique in your store.
  • You can remove external_ref as this attribute is optional.
  • You cannot remove any required attributes, such as name or rounding.

Request

Path Parameters

    proration_policy_uuid UUIDrequired

    The unique identifier of a proration policy.

Body

    data ProrationPolicyUpdaterequired
    id UUID (string)required

    The unique identifier.

    type ProrationPolicyType (string)required

    Possible values: [subscription_proration_policy]

    attributes ProrationPolicyUpdateAttributesrequired
    external_ref ExternalRefUpdate (string)nullable

    Possible values: <= 2048 characters

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

    name string

    Possible values: >= 3 characters and <= 1024 characters

    The name of the proration policy.

    rounding string

    Possible values: [up, down, nearest]

    Whether to round up or down

Responses

Success. The proration policy details are updated.

Schema
    data ProrationPolicy
    id UUID (string)

    The unique identifier.

    type ProrationPolicyType (string)required

    Possible values: [subscription_proration_policy]

    attributes ProrationPolicyAttributesrequired
    name stringrequired

    Possible values: >= 3 characters and <= 1024 characters

    A name for the proration policy.

    rounding stringrequired

    Possible values: [up, down, nearest]

    When rounding in proration, you must decide how to round the units of time used to calculate the charges.

    • round up to the next unit, ensuring subscribers are charged slightly more to cover any partial use.
    • round down to the previous whole unit, providing subscribers with a slight benefit by not charging for partial use.
    • round to the nearest whole unit, whether up or down, based on standard rounding rules. For example, rounding 0.5 up and rounding 0.5 down.
    external_ref ExternalRef (string)

    Possible values: <= 2048 characters

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

    meta ProrationPolicyMetarequired
    owner stringrequired

    The owner of a resource, either store or organization.

    timestamps Timestampsrequired
    updated_at stringrequired

    The date and time a resource was updated.

    created_at stringrequired

    The date and time a resource was created.

Loading...