Cancel member plan
curl --request POST \
--url https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancelimport requests
url = "https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"billingType": "one_off",
"id": "<string>",
"createdAt": "<string>",
"clientId": "<string>",
"plan": {
"planTemplateId": "<string>",
"name": "<string>",
"discountRate": 123,
"discountAmount": 123,
"items": [
{
"id": "<string>",
"createdAt": "<string>",
"clientPlanId": "<string>",
"planTemplateItemId": "<string>",
"appointmentTypeId": "<string>",
"providerId": "<string>",
"billableItemId": "<string>",
"basePrice": 123,
"price": 123,
"taxRate": 123,
"currency": "<string>",
"name": "<string>"
}
]
},
"client": {
"id": "<string>",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"memberId": "memb_38JiySr0Z0ePjHpqvosimyLQuUC",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "<string>",
"mobileNumber": "<string>",
"email": "<string>",
"pmsPatientId": "<string>",
"pmsCreatedAt": "2023-11-07T05:31:56Z",
"profileImageUrl": "<string>"
},
"organisation": {
"id": "org_31XEcUshz1ymodA14HALnyP48g1",
"name": "Acme Healthcare",
"slug": "acme-healthcare",
"createdAt": "2023-01-15T10:30:00Z",
"bookingsEnabled": true,
"brandImageUrl": "https://example.com/brand-image.png",
"wordmarkImageUrl": "https://example.com/wordmark-image.png",
"websiteUrl": "https://example.com"
},
"bookingCredits": [
{
"id": "<string>",
"clientPlanId": "<string>",
"clientPlanItemId": "<string>",
"appointmentTypeId": "<string>",
"price": 123,
"currency": "<string>",
"paidAt": "2023-11-07T05:31:56Z",
"bookedAt": "2023-11-07T05:31:56Z",
"redeemedAt": "2023-11-07T05:31:56Z",
"isPaid": true,
"isBooked": true
}
],
"charges": [
{
"id": "<string>",
"clientPlanId": "<string>",
"cycleNumber": 123,
"amount": 123,
"currency": "<string>",
"businessTransactionId": "<string>"
}
],
"organisationId": "<string>",
"subscription": {
"startsAt": "<string>",
"cyclesCompleted": 123,
"billingCycleCount": 123,
"endsAt": "<string>",
"nextBillingAt": "2023-11-07T05:31:56Z"
}
}Member Client Plan
Cancel member plan
Cancel a subscription and stop future recurring charges
POST
/
v1
/
members
/
{memberId}
/
plans
/
{clientPlanId}
/
cancel
Cancel member plan
curl --request POST \
--url https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancelimport requests
url = "https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halth.com/v1/members/{memberId}/plans/{clientPlanId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"billingType": "one_off",
"id": "<string>",
"createdAt": "<string>",
"clientId": "<string>",
"plan": {
"planTemplateId": "<string>",
"name": "<string>",
"discountRate": 123,
"discountAmount": 123,
"items": [
{
"id": "<string>",
"createdAt": "<string>",
"clientPlanId": "<string>",
"planTemplateItemId": "<string>",
"appointmentTypeId": "<string>",
"providerId": "<string>",
"billableItemId": "<string>",
"basePrice": 123,
"price": 123,
"taxRate": 123,
"currency": "<string>",
"name": "<string>"
}
]
},
"client": {
"id": "<string>",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"memberId": "memb_38JiySr0Z0ePjHpqvosimyLQuUC",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "<string>",
"mobileNumber": "<string>",
"email": "<string>",
"pmsPatientId": "<string>",
"pmsCreatedAt": "2023-11-07T05:31:56Z",
"profileImageUrl": "<string>"
},
"organisation": {
"id": "org_31XEcUshz1ymodA14HALnyP48g1",
"name": "Acme Healthcare",
"slug": "acme-healthcare",
"createdAt": "2023-01-15T10:30:00Z",
"bookingsEnabled": true,
"brandImageUrl": "https://example.com/brand-image.png",
"wordmarkImageUrl": "https://example.com/wordmark-image.png",
"websiteUrl": "https://example.com"
},
"bookingCredits": [
{
"id": "<string>",
"clientPlanId": "<string>",
"clientPlanItemId": "<string>",
"appointmentTypeId": "<string>",
"price": 123,
"currency": "<string>",
"paidAt": "2023-11-07T05:31:56Z",
"bookedAt": "2023-11-07T05:31:56Z",
"redeemedAt": "2023-11-07T05:31:56Z",
"isPaid": true,
"isBooked": true
}
],
"charges": [
{
"id": "<string>",
"clientPlanId": "<string>",
"cycleNumber": 123,
"amount": 123,
"currency": "<string>",
"businessTransactionId": "<string>"
}
],
"organisationId": "<string>",
"subscription": {
"startsAt": "<string>",
"cyclesCompleted": 123,
"billingCycleCount": 123,
"endsAt": "<string>",
"nextBillingAt": "2023-11-07T05:31:56Z"
}
}Query Parameters
Available options:
client, organisation, bookingCredits, charges Response
200 - application/json
Whether the plan is billed as a one-off or on a recurring basis. Recurring when the plan has a subscription.
Available options:
one_off, recurring Example:
"one_off"
Available options:
created, active, inactive, cancelled, past_due, completed Available options:
pay_later, prepaid Show child attributes
Show child attributes
Expandable field
Show child attributes
Show child attributes
Expandable field
Show child attributes
Show child attributes
Expandable field
Show child attributes
Show child attributes
Expandable field
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
