Remove a price from a draft
curl --request DELETE \
--url https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}', 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.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}"
req, _ := http.NewRequest("DELETE", url, nil)
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.delete("https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Plans
Remove a price from a draft
Remove a single price from a draft version’s own current slots. The version must be a draft.
DELETE
/
v0
/
plans
/
{id}
/
versions
/
{versionNumber}
/
prices
/
{priceId}
Remove a price from a draft
curl --request DELETE \
--url https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}', 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.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}"
req, _ := http.NewRequest("DELETE", url, nil)
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.delete("https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}/prices/{priceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Headers
Optional optimistic-concurrency precondition — the draft version's updatedAt timestamp as read from a prior GET. If present and it no longer matches the version's current updatedAt, the request is rejected with 412 (draft_modified). Omit to skip the check.
Path Parameters
Unique identifier for a plan
Pattern:
^plan_[a-zA-Z0-9]+$The version number within the plan (1-based).
Required range:
x >= 1Unique identifier for a price
Pattern:
^price_[a-zA-Z0-9]+$Response
Price removed from the draft
Was this page helpful?
⌘I