post https://api.reepay.com/v1/subscription//on_hold
Put subscription instantly on hold. Subscription must be active and not in trial. A subscription on hold can later be reactivated. An optional argument can be given describing how to compensate for the current period if already paid for with settled invoice. If compensation is used the subscription must have a settled invoice for the current billing period.
Returns the Subscription object, with state on_hold
.
Errors
The operation can generate the following errors beside the generic HTTP error codes described here.
Error code | HTTP code | Description |
---|---|---|
12 | 404 | Subscription not found |
13 | 400 | Subscription expired, must be active |
95 | 400 | Subscription on-hold, must be active |
96 | 400 | Subscription is in trial, not allowed to put on hold |
64 | 400 | Refund compensation is used but the current billing period invoice is not in required state settled |
65 | 400 | Refund compensation is used but the refund amount exceeds the refundable amount on the current billing period invoice. The refundable amount is the setlled invoice amount minus already refunded and credited amounts. |
82 | 400 | Credit compensation is used but the current billing period invoice is not in required state pending , dunning or settled |
120 | 400 | Credit compensation is used but credit amount exceeds the creditable amount on the current billing period invoice. The creditable amount is the invoice amount minus already refunded and credited amount. |
81 | 400 | Refund compensation is not allowed for asynchronous refund payment method |
66 | 500 | The refund compensation failed because of error at the acquirer. See transaction_error See transaction errors. |