Cancel a Payment Plan
curl --request PUT \
--url https://api.flutterwave.com/v3/payment-plans/{id}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.flutterwave.com/v3/payment-plans/{id}/cancel"
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'}
};
fetch('https://api.flutterwave.com/v3/payment-plans/{id}/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.flutterwave.com/v3/payment-plans/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$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.flutterwave.com/v3/payment-plans/{id}/cancel"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.flutterwave.com/v3/payment-plans/{id}/cancel")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flutterwave.com/v3/payment-plans/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Payment plan cancelled",
"data": {
"id": 3807,
"name": "the akhlm postman plan 2",
"plan_token": "rpp_12d2ef3d5ac1c13b9d30",
"status": "cancelled",
"currency": "NGN",
"amount": 5000,
"duration": 48,
"interval": "monthly",
"created_at": "2020-01-16T18:08:19.000Z"
}
}{
"status": "error",
"message": "No payment plan found",
"data": null
}Payment Plans
Cancel a Payment Plan
Cancel a payment plan
PUT
/
payment-plans
/
{id}
/
cancel
Cancel a Payment Plan
curl --request PUT \
--url https://api.flutterwave.com/v3/payment-plans/{id}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.flutterwave.com/v3/payment-plans/{id}/cancel"
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'}
};
fetch('https://api.flutterwave.com/v3/payment-plans/{id}/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.flutterwave.com/v3/payment-plans/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$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.flutterwave.com/v3/payment-plans/{id}/cancel"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.flutterwave.com/v3/payment-plans/{id}/cancel")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flutterwave.com/v3/payment-plans/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Payment plan cancelled",
"data": {
"id": 3807,
"name": "the akhlm postman plan 2",
"plan_token": "rpp_12d2ef3d5ac1c13b9d30",
"status": "cancelled",
"currency": "NGN",
"amount": 5000,
"duration": 48,
"interval": "monthly",
"created_at": "2020-01-16T18:08:19.000Z"
}
}{
"status": "error",
"message": "No payment plan found",
"data": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
application/json Example:
"application/json"
Path Parameters
Response
OK
Show child attributes
Show child attributes
Example:
{
"id": 3807,
"name": "the akhlm postman plan 2",
"amount": 5000,
"interval": "monthly",
"duration": 48,
"status": "active",
"currency": "NGN",
"plan_token": "rpp_12d2ef3d5ac1c13b9d30",
"created_at": "2020-01-16T18:08:19.000Z"
}
Was this page helpful?
⌘I