For archived 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
api-version
string
Valid values[ "2026-01-01" ]
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.

with-split-rule
string

The XenPlatform split rule ID that will be applied to this transaction. This header is only used if you have access to xenPlatform.

Path parameters
plan_id
stringRequired

The ID of the recurring plan.

id
stringRequired

The ID of the recurring cycle.

Responses
200

Successfully retrieved the recurring cycle.

Expand All
object
id
string

Xendit-generated recurring cycle ID.

Examplerecy_4e66b458-00b7-4ddd-9859-cce153dda097
type
string

Indicates whether the cycle was charged as part of plan creation

Valid values[ "SCHEDULED", "IMMEDIATE" ]
reference_id
string

Inherited from Plan reference_id

plan_id
string

ID of the associated recurring plan.

Examplerepl_4e66b458-00b7-4ddd-9859-cce153dda097
customer_id
string

Xendit-generated customer ID.

cycle_number
integer

The order of the current cycle within the plan

status
string

Status of the recurring cycle.

Valid values[ "SCHEDULED", "PENDING", "RETRYING", "FAILED", "SUCCEEDED", "CANCELLED" ]
attempt_details
Array of object

Details of any attempt actions made on the cycle.

object
attempt_number
integer

Order of the attempt within the cycle. The current action belongs to this attempt.

action_number
integer

Order of the action within an attempt. An attempt can have multiple actions. In general, one action corresponds to one unique payment token within the same attempt.

type
string

The type of payment attempt made on the cycle. INITIAL represents the first system generated attempt on the cycle. RETRY represents all subsequent system generated attempt after first attempt failed. FORCED represents explicit request made by the merchant to perform a payment attempt on the cycle. PAYMENT_LINK represents a payment link sent to the end user to solicit payment.

Valid values[ "INITIAL", "RETRY", "FORCED", "PAYMENT_LINK" ]
created
string (date-time)

The date time that the payment action was performed.

payment_id
string | null

This field used to indicate the payment ID created from cycle

Examplepy-5cd39c23-89da-45f9-b316-f1e865b71b46
payment_token_id
string | null

The payment token ID used for this payment action.

Examplept-f8429206-f3ea-49f0-abb4-eaa89064056e
status
string

The status of the action

Valid values[ "SUCCEEDED", "FAILED", "PENDING" ]
failure_code
string | null

If payment action encounters an error, the failure reason will be shown here.

next_retry_timestamp
string (date-time) | null

The date time that the next RETRY attempt should be created for this cycle.

payment_session
object | null

Contains details of payment links sent to the end user.

session_id
string

Payment session id created when the cycle attempt failed

Exampleps-661f87c614802d6c402cd82d
payment_link_url
string

This URL will lead the end user to a checkout page to complete the payment.

attempt_count
integer

number of attempts made on the cycle so far

forced_attempt_count
integer

number of forced attempts made on the cycle so far

scheduled_timestamp
string (date-time)

The scheduled date and time that the cycle will be executed. Always in UTC zero.

Example2020-11-20T16:23:52Z
currency
string

ISO 4217 currency code (e.g., IDR, PHP).

ExampleIDR
amount
number

Amount charged in the cycle.

Minimum0.0
metadata
object | null
created
string (date-time)

ISO 8601 date time format

Example2017-07-21T17:32:28Z
updated
string (date-time)

ISO 8601 date time format

Example2017-07-21T17:32:28Z
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
403

Request forbidden error. Safe to retry.

object
Example{ "error_code": "REQUEST_FORBIDDEN_ERROR", "message": "The request is forbidden." }
error_code
string
message
string
404

Resource not found. Safe to retry.

DATA_NOT_FOUND

Cycle not found.

{
  "error_code": "DATA_NOT_FOUND",
  "message": "Recurring cycle_id not found. Please check your query again."
}
object
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.

Examplerecy_4e66b458-00b7-4ddd-9859-cce153dda097
type
string

Indicates whether the cycle was charged as part of plan creation

Valid values[ "SCHEDULED", "IMMEDIATE" ]
reference_id
string

Inherited from Plan reference_id

plan_id
string

ID of the associated recurring plan.

Examplerepl_4e66b458-00b7-4ddd-9859-cce153dda097
customer_id
string

Xendit-generated customer ID.

cycle_number
integer

The order of the current cycle within the plan

status
string

Status of the recurring cycle.

Valid values[ "SCHEDULED", "PENDING", "RETRYING", "FAILED", "SUCCEEDED", "CANCELLED" ]
attempt_details
Array of object

Details of any attempt actions made on the cycle.

object
attempt_number
integer Required

Order of the attempt within the cycle. The current action belongs to this attempt.

action_number
integer Required

Order of the action within an attempt. An attempt can have multiple actions. In general, one action corresponds to one unique payment token within the same attempt.

type
string Required

The type of payment attempt made on the cycle. INITIAL represents the first system generated attempt on the cycle. RETRY represents all subsequent system generated attempt after first attempt failed. FORCED represents explicit request made by the merchant to perform a payment attempt on the cycle. PAYMENT_LINK represents a payment link sent to the end user to solicit payment.

Valid values[ "INITIAL", "RETRY", "FORCED", "PAYMENT_LINK" ]
created
string (date-time) Required

The date time that the payment action was performed.

payment_id
string | null Required

This field used to indicate the payment ID created from cycle

Examplepy-5cd39c23-89da-45f9-b316-f1e865b71b46
payment_token_id
string | null

The payment token ID used for this payment action.

Examplept-f8429206-f3ea-49f0-abb4-eaa89064056e
status
string Required

The status of the action

Valid values[ "SUCCEEDED", "FAILED", "PENDING" ]
failure_code
string | null Required

If payment action encounters an error, the failure reason will be shown here.

next_retry_timestamp
string (date-time) | null Required

The date time that the next RETRY attempt should be created for this cycle.

payment_session
object | null

Contains details of payment links sent to the end user.

session_id
string

Payment session id created when the cycle attempt failed

Exampleps-661f87c614802d6c402cd82d
payment_link_url
string

This URL will lead the end user to a checkout page to complete the payment.

attempt_count
integer

number of attempts made on the cycle so far

forced_attempt_count
integer

number of forced attempts made on the cycle so far

scheduled_timestamp
string (date-time)

The scheduled date and time that the cycle will be executed. Always in UTC zero.

Example2020-11-20T16:23:52Z
currency
string

ISO 4217 currency code (e.g., IDR, PHP).

ExampleIDR
amount
number

Amount charged in the cycle.

Minimum0.0
metadata
object | null
created
string (date-time)

ISO 8601 date time format

Example2017-07-21T17:32:28Z
updated
string (date-time)

ISO 8601 date time format

Example2017-07-21T17:32:28Z
Responses
200

OK