Update dunning rule set policy
PUT/subscriptions/dunning-rules/:dunning_rule_uuid
Update dunning rule set policy
Request
Path Parameters
The unique identifier of a dunning rule set.
- application/json
Body
- fixed: payments are retried on a fixed schedule as defined by the
payment_retry_unit
andpayment_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)
data DunningRuleUpdaterequired
The unique identifier.
Possible values: [subscription_dunning_rule
]
attributes DunningRuleUpdateAttributesrequired
Possible values: [fixed
, backoff
, tiered
]
The strategy used to make payments.
Possible values: >= 1
and <= 1024
the number of payment_interval_unit
s to wait between each payment attempt (or for the initial repayment attempt for backoff)
Possible values: [day
, week
]
the time units to use for the delays between payments
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.
the number of payment retries that will occur before the action
is taken
Possible values: [none
, pause
, close
, suspend
]
the action taken after all payment attempts for an invoice has failed
if set to true then this rule will be the default for the store
Responses
- 200
- 400
- 403
- 404
- 409
- 500
Success. The dunning rule set has been updated.
- application/json
- Schema
- Example (from schema)
Schema
- fixed: payments are retried on a fixed schedule as defined by the
payment_retry_unit
andpayment_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)
data DunningRule
The unique identifier.
Possible values: [subscription_dunning_rule
]
attributes DunningRuleAttributesrequired
Possible values: [fixed
, backoff
, tiered
]
The strategy used to make payments.
Possible values: >= 1
and <= 1024
the number of payment_interval_unit
s to wait between each payment attempt (or for the initial repayment attempt for backoff)
Possible values: [day
, week
]
the time units to use for the delays between payments
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.
the number of payment retries that will occur before the action
is taken
Possible values: [none
, pause
, close
, suspend
]
the action taken after all payment attempts for an invoice has failed
if set to true then this rule will be the default for the store
meta DunningRuleMetarequired
The owner of a resource, either store
or organization
.
timestamps Timestampsrequired
The date and time a resource was updated.
The date and time a resource was created.
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "subscription_dunning_rule",
"attributes": {
"payment_retry_type": "fixed",
"payment_retry_unit": "day",
"payment_retry_interval": 1,
"payment_retries_limit": 10,
"action": "none"
},
"meta": {
"owner": "store",
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z"
}
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": "400",
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Forbidden. The operation is forbidden on this entity.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Permission denied",
"status": "404",
"detail": "Permission denied: plan tenancy mismatch"
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "No plan found"
}
]
}
Write conflict. Unable to perform the operation at this time.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Write Conflict",
"status": "409"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}