Skip to main content

Create a Proration Policy

POST 

/subscriptions/proration-policies

In Subscriptions, you configure proration by creating a proration policy and attaching it to an offering. Once you have attached the policy, the proration policy applies to all subscriptions that use the offering.

Request​

Body

    data ProrationPolicyCreaterequired
    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.

Responses​

Success. The proration policy is created.

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...