Plans/Options
Update Price Option
Modify price option information.
AuthorizationBearer <token>
In: header
Path Parameters
plan_idstring
The Plan ID.
Match
^pln_.*$
option_idstring
The Option ID.
Match
^plo_.*$
The details required to update a plan option.
description?string
Detailed description about the option.
unit_price?number
Price per unit.
Format
float
Range
0.01 <= value
billing_interval?number
The number of days for each billing interval. (e.g. 30 for monthly or 365 for yearly)
Range
1 <= value <= 365
trial_period?number
The number of days before the first billable invoice is due.
Range
value <= 365
attributes?object
Custom key-value pairs that can be used for option specific features.
Properties
properties <= 16
Empty Object
Response Body
curl -X PUT "https://api.live.paisr.tech/v2/plans/string/options/string" \
-H "Content-Type: application/json" \
-d '{}'
const body = JSON.stringify({})
fetch("https://api.live.paisr.tech/v2/plans/string/options/string", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.live.paisr.tech/v2/plans/string/options/string"
body := strings.NewReader(`{}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.live.paisr.tech/v2/plans/string/options/string"
body = {}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.live.paisr.tech/v2/plans/string/options/string"))
.header("Content-Type", "application/json")
.PUT(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PutAsync("https://api.live.paisr.tech/v2/plans/string/options/string", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
"success": true,
"message": "string"
}
{
"success": false,
"message": "string"
}
{
"success": false,
"message": "string"
}