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

Get Subscription Cycle

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

Retrieves details of a specific subscription cycle by its ID.

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
plan_id
stringRequired

Xendit-generated recurring plan ID, with prefix repl-xxx

id
stringRequired

Xendit-generated recurring cycle ID, with prefix recy-xxx

Responses
200

Successfully retrieved the recurring cycle.

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 cycle_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
Callbacks
Post
/{merchant defined callback url}
Body parameters

Recurring cycle webhook

Expand All
object

Recurring cycle webhook to indentify status transition of plan

event
string

Webhook event names for recurring cycle status updates.

Valid values[ "recurring.cycle.created", "recurring.cycle.retrying", "recurring.cycle.succeeded", "recurring.cycle.failed" ]
business_id
string

Business ID of Xendit

Example62440e322008e87fb29c1fd0
created
string (date-time)

Timestamp of webhook delivery attempt in ISO 8601 date-time format.

Example2021-12-31T23:59:59Z
data
object (Xendit_Subscriptions_API_RecurringCycle)
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.

Responses
200

OK