For archived content, access the previous documentation here or the previous API reference here.

Update Subscription Schedule

Prev Next
Patch
/recurring/schedules/{id}

Updates the schedule configuration of a specific subscription plan.

Header parameters
for-user-id
string

The sub-account user-id to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information.

Path parameters
id
stringRequired

Xendit-generated recurring schedule ID, with prefix resc-xxx.

Body parameters

JSON object containing the schedule configuration to update.

object
interval
string

Interval type between consecutive recurring cycles. Supported values: DAY, WEEK, MONTH. - WEEK: Anchor date determines the weekday. - MONTH: Anchor date determines the day of the month.

Valid values[ "DAY", "WEEK", "MONTH" ]
interval_count
integer

Number of units for the specified interval. For example, an interval of MONTH with an interval_count of 3 means cycles occur every 3 months.

total_recurrence
integer | null

Total number of cycles for the schedule. Default = NULL, meaning the schedule runs indefinitely.

anchor_date
string (date-time)

Start date for the schedule (ISO 8601 format). Supported values: Timestamps between 1st and 28th of a month. If set to 29–31, defaults to 1st of the next month.

retry_interval
string

Interval type between retry attempts for failed cycles.

Valid values[ "DAY" ]
retry_interval_count
integer

Number of retry intervals between consecutive retries.

total_retry
integer

Maximum number of retry attempts allowed.

failed_attempt_notifications
Array of integer

Specifies which retry attempts trigger failure notifications to the end user. Values must not exceed total_retry and must be unique.

integer
Responses
200

Successfully updated the schedule configuration.

object
reference_id
string

Merchant-provided identifier for the schedule.

interval
string

Frequency of the recurring cycles.

Valid values[ "DAY", "WEEK", "MONTH" ]
interval_count
integer

Number of intervals between consecutive cycles.

total_recurrence
integer | null

Total number of cycles (optional; runs indefinitely if null).

anchor_date
string (date-time)

Start date for the recurring schedule (ISO 8601 format).

retry_interval
string

Interval between retry attempts for failed payments.

Valid values[ "DAY" ]
retry_interval_count
integer

Number of retry intervals between consecutive retries.

total_retry
integer

Maximum number of retries for failed cycles.

failed_attempt_notifications
Array of integer

Notifications triggered at specific retry attempts.

integer
400

Validation error, such as invalid schedule fields or unsupported values.

object
Example{ "error_code": "API_VALIDATION_ERROR", "message": "Values in failed_attempt_notifications array cannot be duplicated or greater than total_retry." }
error_code
string
message
string
401

Invalid API key or unauthorized access.

object
Example{ "error_code": "INVALID_API_KEY", "message": "API key format is invalid." }
error_code
string
message
string
404

Recurring schedule not found.

object
Example{ "error_code": "DATA_NOT_FOUND", "message": "Recurring schedule ID not found. Please check your query again." }
error_code
string
message
string
415

Unsupported content type.

object
Example{ "error_code": "UNSUPPORTED_CONTENT_TYPE", "message": "The content type requested is not supported." }
error_code
string
message
string
500

Server error.

object
Example{ "error_code": "SERVER_ERROR", "message": "An unexpected error occurred. Our team has been notified and will troubleshoot the issue." }
error_code
string
message
string