Skip to main content

Create a dunning rule set

POST 

/subscriptions/dunning-rules

Create a dunning rule set

Request

Body

    data DunningRuleCreaterequired
    type SubscriptionDunningRuleType (string)required

    Possible values: [subscription_dunning_rule]

    attributes DunningRuleAttributesrequired
    payment_retry_type stringrequired

    Possible values: [fixed, backoff, tiered]

    The strategy used to make payments.

    • fixed: payments are retried on a fixed schedule as defined by the payment_retry_unit and payment_retry_interval, eg every two days
    • backoff: payments are retried with an increasing delay between each attempt. The initial delay is specified as per the fixed type and the payment_retry_multiplier is applied to increase the delay for each subsequent payment, eg after a day and then two days and then four days etc (currently unsupported)
    • tiered: payments are retried with customised delays between each attempt (currently unsupported)
    payment_retry_interval int64

    Possible values: >= 1 and <= 1024

    the number of payment_interval_units to wait between each payment attempt (or for the initial repayment attempt for backoff)

    payment_retry_unit string

    Possible values: [day, week]

    the time units to use for the delays between payments

    payment_retry_multiplier double

    Possible values: >= 1 and <= 1024

    the multiplier than increases the delay between each payment attempt. Must only be set for backup types. For example, if the initial delay was 2 days and the multiplier was 1.5 then a second repayment attempt would happen 3 days after the first.

    payment_retries_limit int64required

    the number of payment retries that will occur before the action is taken

    action stringrequired

    Possible values: [none, pause, close, suspend]

    the action taken after all payment attempts for an invoice has failed

    default boolean

    if set to true then this rule will be the default for the store

Responses

Success. The dunning rule set is created.

Schema
    data DunningRule
    id UUID (string)

    The unique identifier.

    type SubscriptionDunningRuleType (string)required

    Possible values: [subscription_dunning_rule]

    attributes DunningRuleAttributesrequired
    payment_retry_type stringrequired

    Possible values: [fixed, backoff, tiered]

    The strategy used to make payments.

    • fixed: payments are retried on a fixed schedule as defined by the payment_retry_unit and payment_retry_interval, eg every two days
    • backoff: payments are retried with an increasing delay between each attempt. The initial delay is specified as per the fixed type and the payment_retry_multiplier is applied to increase the delay for each subsequent payment, eg after a day and then two days and then four days etc (currently unsupported)
    • tiered: payments are retried with customised delays between each attempt (currently unsupported)
    payment_retry_interval int64

    Possible values: >= 1 and <= 1024

    the number of payment_interval_units to wait between each payment attempt (or for the initial repayment attempt for backoff)

    payment_retry_unit string

    Possible values: [day, week]

    the time units to use for the delays between payments

    payment_retry_multiplier double

    Possible values: >= 1 and <= 1024

    the multiplier than increases the delay between each payment attempt. Must only be set for backup types. For example, if the initial delay was 2 days and the multiplier was 1.5 then a second repayment attempt would happen 3 days after the first.

    payment_retries_limit int64required

    the number of payment retries that will occur before the action is taken

    action stringrequired

    Possible values: [none, pause, close, suspend]

    the action taken after all payment attempts for an invoice has failed

    default boolean

    if set to true then this rule will be the default for the store

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