Recover current cycle
If the current cycle of the recurring plan is pending to cancelled on the cycle's next billing date after calling Cancel Recurring Plan API or Add Recurring Plan Cycles API, you may use this API to recover the current original cycle's billings. All subsequent cycles will be cancelled.
Recover current cycle
PUT /svc/payment/api/v1/openapi/recurring_payments/plan/:id/recover
If the current cycle of the recurring plan is pending to cancelled on the cycle's next billing date after calling Cancel Recurring Plan API or Add Recurring Plan Cycles API, you may use this API to recover the current original cycle's billings. All subsequent cycles will be cancelled.
Request
Path Parameters
id stringrequired
plan_id
Responses
- 200
Response Headers
-
application/json
-
Schema
-
Example (auto)
Schema
code integerrequired
message stringrequired
data objectrequired
plan objectrequired
id stringrequired
name string
reference_number string
default_payment_token string
default_collection_method string
payment_retry_count number
payment_retry_day_period number
grace_period numbernullable
credit number
redirect_url string
note string
timeout object
timer integerrequired
url string
description stringnullable
created_at stringrequired
updated_at stringrequired
deleted_at stringnullable
recurring_cycles object[]required
Array [
id string
state stringrequired
recurring_plan_id stringrequired
billing_count integer
billing_count_created integerrequired
recurring_billing_config objectrequired
id stringrequired
billing_interval stringrequired
billing_type string
billing_month integer
billing_day_of_month integer
billing_proration_enabled booleanrequired
description string
created_at string
updated_at string
deleted_at stringnullable
recurring_items object[]required
Array [
id stringrequired
label string
price numberrequired
quantity integerrequired
currency stringrequired
reference_id string
description string
created_at stringrequired
updated_at string
deleted_at stringnullable
]
billing_amount number
discount_amount number
discount_type string
previous_cycle stringnullable
next_cycle stringnullable
estimated_start_date string
start_date stringnullable
estimated_end_date stringnullable
end_date stringnullable
next_execute_time stringnullable
description stringnullable
created_at stringrequired
updated_at stringrequired
deleted_at stringnullable
]
customer object
name string
email string
phone string
reference_number stringrequired
default_payment_method string
uuid stringrequired
current_order object
amount number
paid_total number
currency string
order_number string
reference_number string
state string
correspondence_state string
auth_code string
default_payment_token string
default_collection_method string
note string
redirect_url string
timeout object
timer string
url string
current_payment_link string
{
"code": 0,
"message": "string",
"data": {
"plan": {
"id": "string",
"name": "string",
"reference_number": "string",
"default_payment_token": "string",
"default_collection_method": "string",
"payment_retry_count": 0,
"payment_retry_day_period": 0,
"grace_period": 0,
"credit": 0,
"redirect_url": "string",
"note": "string",
"timeout": {
"timer": 0,
"url": "string"
},
"description": "string",
"created_at": "string",
"updated_at": "string",
"deleted_at": "string",
"recurring_cycles": [\
{\
"id": "string",\
"state": "string",\
"recurring_plan_id": "string",\
"billing_count": 0,\
"billing_count_created": 0,\
"recurring_billing_config": {\
"id": "string",\
"billing_interval": "string",\
"billing_type": "string",\
"billing_month": 0,\
"billing_day_of_month": 0,\
"billing_proration_enabled": true,\
"description": "string",\
"created_at": "string",\
"updated_at": "string",\
"deleted_at": "string"\
},\
"recurring_items": [\
{\
"id": "string",\
"label": "string",\
"price": 0,\
"quantity": 0,\
"currency": "string",\
"reference_id": "string",\
"description": "string",\
"created_at": "string",\
"updated_at": "string",\
"deleted_at": "string"\
}\
],\
"billing_amount": 0,\
"discount_amount": 0,\
"discount_type": "string",\
"previous_cycle": "string",\
"next_cycle": "string",\
"estimated_start_date": "string",\
"start_date": "string",\
"estimated_end_date": "string",\
"end_date": "string",\
"next_execute_time": "string",\
"description": "string",\
"created_at": "string",\
"updated_at": "string",\
"deleted_at ": "string"\
}\
],
"customer": {
"name": "string",
"email": "string",
"phone": "string",
"reference_number": "string",
"default_payment_method": "string",
"uuid": "string"
},
"current_order": {
"amount": 0,
"paid_total": 0,
"currency": "string",
"order_number": "string",
"reference_number": "string",
"state": "string",
"correspondence_state": "string",
"auth_code": "string",
"default_payment_token": "string",
"default_collection_method": "string",
"note": "string",
"redirect_url": "string",
"timeout": {
"timer": "string",
"url": "string"
}
},
"current_payment_link": "string"
}
}
}-
csharp
-
curl
-
dart
-
go
-
http
-
java
-
javascript
-
kotlin
-
c
-
nodejs
-
objective-c
-
ocaml
-
php
-
powershell
-
python
-
r
-
ruby
-
rust
-
shell
-
swift
-
HTTPCLIENT
-
RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://developer.wonder.today/svc/payment/api/v1/openapi/recurring_payments/plan/:id/recover");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Request Collapse all
Parameters
id — pathrequired