Pause an order
Experimental

Request

Pauses an order with a specified ID.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Pause resource.

orderIdstring, <= 50 charactersrequired

ID of the paused order.

Example:"ord_01HVKA5975PJBSQ1SX72G3MSZC"
pausedBystring

Specifies who initiated the pause.

Default:"customer"
Enum:"merchant""customer"
descriptionstring or null, <= 255 characters

Description of the pause reason in free form.

effectiveTimestring or null, (date-time)

Date and time when the service period pauses.

This time must be later than the current time. If this time is earlier then the current time, the current time is used.

If this field is omitted, this value defaults to the current time.

endTimestring or null, (date-time)

Date and time when the pause ends and the order resumes billing.

To resume a order from this point in time, use the current time or an earlier time. If endTime is earlier then the current time, the current time is used. If this field is empty, the order is indefinitely paused.

timeRemainingstring or null

Amount of time between the pause end time and the renewal time in ISO-8601 durations format. By default, this value is computed as the time between the pause and the renewal.

Example: A $30 per month subscription on a 30-day month is paused on day 20 of the order. There are 10 unused days on the order. Therefore, the order renews in 10 days after it is resumed. The upcoming invoice does not change the amount for the invoiced period, it remains at $30. If the order uses a billing anchor, the renewal time after a pause shift behaves as though the renewal time is moved forward by an Order API operation, and the billing anchor is ignored for that period.

Example:"P3600S"
curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/order-pauses \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "orderId": "ord_01HVKA5975PJBSQ1SX72G3MSZC",
    "pausedBy": "merchant",
    "description": "string",
    "effectiveTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "timeRemaining": "P3600S"
  }'

Responses

Pause created.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the order pause.

Example:"sub_pau_01H085J3ZR1WKD120D73D7N4C9"
orderIdstring, <= 50 charactersrequired

ID of the paused order.

Example:"ord_01HVKA5975PJBSQ1SX72G3MSZC"
statusstringread-only

Status of the order pause.

Enum:"pending""ongoing""revoked""finished"
pausedBystring

Specifies who initiated the pause.

Default:"customer"
Enum:"merchant""customer"
descriptionstring or null, <= 255 characters

Description of the pause reason in free form.

effectiveTimestring or null, (date-time)

Date and time when the service period pauses.

This time must be later than the current time. If this time is earlier then the current time, the current time is used.

If this field is omitted, this value defaults to the current time.

endTimestring or null, (date-time)

Date and time when the pause ends and the order resumes billing.

To resume a order from this point in time, use the current time or an earlier time. If endTime is earlier then the current time, the current time is used. If this field is empty, the order is indefinitely paused.

timeRemainingstring or null

Amount of time between the pause end time and the renewal time in ISO-8601 durations format. By default, this value is computed as the time between the pause and the renewal.

Example: A $30 per month subscription on a 30-day month is paused on day 20 of the order. There are 10 unused days on the order. Therefore, the order renews in 10 days after it is resumed. The upcoming invoice does not change the amount for the invoiced period, it remains at $30. If the order uses a billing anchor, the renewal time after a pause shift behaves as though the renewal time is moved forward by an Order API operation, and the billing anchor is ignored for that period.

Example:"P3600S"
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

Response
{ "id": "sub_pau_01H085J3ZR1WKD120D73D7N4C9", "orderId": "ord_01HVKA5975PJBSQ1SX72G3MSZC", "status": "pending", "pausedBy": "merchant", "description": "string", "effectiveTime": "2019-08-24T14:15:22Z", "endTime": "2019-08-24T14:15:22Z", "timeRemaining": "P3600S", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }