Cancel a plan
Cancel all recycling cycles of this recycling plan
Cancel a plan
PUT /svc/payment/api/v1/openapi/recurring_payments/plan/:id/cancel
Cancel all recycling cycles of this recycling plan
Request
Path Parameters
id stringrequired
- application/json
Body
activate_type stringrequired
Immediate: The cycle to be added will start immediately and all previously-active recurring_cycles.state from the recurring plan will be updated to cancelled.
Next Billing Date: The cycle to be added will start on the next billing date of the current recurring cycle. The recurring_cycles.state will be updated to completed, and all the succession recurring_cycles.state of it will be updated to cancelled.
Possible values: [immediate, next_billing_date]
refund_credit booleanrequired
Only applicable for activate_type = immediate. By default, we will refund the current recurring billing's remaining credit back to the customer
Responses
- 200
Response Headers
-
application/json
-
Schema
-
Example (auto)
Schema
code integerrequired
message stringrequired
data objectrequired
object
{
"code": 0,
"message": "string",
"data": {}
}-
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/cancel");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"activate_type\": \"immediate\",\n \"refund_credit\": true\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Request Collapse all
Parameters
id — pathrequired
Body
{
"activate_type": "immediate",
"refund_credit": true
}