Welcome to Xendit’s latest documentation. For legacy content, access the previous documentation here or the previous API reference here.

Get List of Subscription Cycles

Prev Next
Get
/recurring/plans/{id}/cycles

Retrieves all cycles for 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

The ID of the recurring plan.

Responses
200

Successfully retrieved the recurring cycles.

Array of object
object
id
string

Xendit-generated recurring cycle ID.

plan_id
string

ID of the associated recurring plan.

status
string

Status of the recurring cycle.

Valid values[ "PENDING", "RETRYING", "FAILED", "SUCCEEDED" ]
amount
number

Amount charged in the cycle.

400

Validation errors occurred. Safe to retry.

API_VALIDATION_ERROR

Fields or values in the payload body does not comply with our API specification.

{
  "error_code": "API_VALIDATION_ERROR",
  "message": "Check the specific error message for debugging."
}
object
error_code
string

Error code identifying the issue.

message
string

Description of the error.

401

Invalid API key or unauthorized access. Safe to retry.

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

Resource not found. Safe to retry.

DATA_NOT_FOUND

Customer not found.

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

Unsupported content type. Safe to retry.

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