Delete Plan
Endpoint for deleting a Plan.
info
Please be aware that this endpoint requires a Manage Transactions API Key.
DELETE /api/v1/groups/{group_id}/revere_pay/{linked_account_id}/recurring/plans/{plan_id}
Response
Code | Description |
---|---|
204 | Success |
400 | Bad Request / Validation error |
500 | Internal Error |
Example Usage
- JavaScript
- Python
- Go
plans.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');
var requestOptions = {
method: 'DELETE',
headers: headers,
redirect: 'follow'
};
const group_id = '';
const linked_account_id = '';
const plan_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/revere_pay/${linked_account_id}/recurring/plans/${plan_id}`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
plans.py
import requests
group_id = ""
linked_account_id = ""
plan_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/"+group_id+"/revere_pay/"+linked_account_id+"/recurring/plans/"+plan_id
headers = {
'Authorization': 'API_KEY'
}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
plans.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
const group_id = ""
const linked_account_id = ""
const plan_id = ""
url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/recurring/plans/" + plan_id
client := &http.Client{}
req, _ := http.NewRequest("DELETE", url)
req.Header.Add("Authorization", "API_KEY")
res, _ := client.Do(req)
defer res.Body.Close()
bytes, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(string(bytes))
}
Example Success Response
No response body