Sell
How to Sell Guide
API
Memberships
Memberships
List Memberships
Retrieve a Membership
Validate license key
Terminate a membership
Cancel a membership
Products
Pricing Plans
Checkouts
Checkouts
List checkout links
Retrieve a checkout link
Update a checkout link
Create a checkout link
Payments
POST /api/v1/plans/create
curl --request POST \
--url "https://api.hyperaze.com/api/v1/plans/create" \
--header "Authorization: Bearer $API_KEY" \
--data '{
"product_id": “<string>”,
"currency": "<string>",
"name": "<string>",
"price": 10,
"pricing_type": "<string>"
}'
import requests
url = "https://api.hyperaze.com/api/v1/plans/create"
headers = {
"Authorization": "Bearer <API_KEY>",
"Content-Type": "application/json"
}
data = {
"product_id": "<product_id>",
"currency": "USD",
"name": "Test6",
"price": 10,
"pricing_type": "Subscription",
"shuffle_key": True,
"renewal_period": 1,
"renewal_period_unit": "Year",
"trial_duration": 33,
"trial_period_unit": "Day",
"password": "psaopd123asfd",
"initial_fee": 123.34
}
response = requests.post(url, headers=headers, json=data)
# Print response
print(response.status_code)
print(response.json())
fetch("https://api.hyperaze.com/api/v1/plans/create", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
product_id: "<product_id>",
currency: "USD",
name: "Monthly Plan",
price: 100,
pricing_type: "Subscription",
shuffle_key: false,
renewal_period: 1,
renewal_period_unit: "Month",
})
})
.then(res => res.json())
.then(data => console.log("Created plan:", data))
.catch(err => console.error("Error:", err));
<?php
$url = "http://api.hyperaze.com/api/v1/plans/create";
$data = [
"product_id" => "<string>",
"currency" => "<string>",
"name" => "<string>",
"price" => 10,
"pricing_type" => "<string>"
];
$options = [
"http" => [
"header" => "Content-type: application/json\r\nAuthorization: Bearer <API_KEY>\r\n",
"method" => "POST",
"content" => json_encode($data)
]
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response === FALSE) {
die("Error occurred");
}
echo $response;
package main
import (
"bytes"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://api.hyperaze.com/api/v1/plans/create"
jsonData := []byte(`{
"product_id": "<string>",
"currency": "<string>",
"name": "<string>",
"price": 10,
"pricing_type": "<string>"
}`)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <API_KEY>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import kong.unirest.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.JsonNode;
public class Main {
public static void main(String[] args) {
HttpResponse<JsonNode> response = Unirest.post("http://api.hyperaze.com/api/v1/plans/create")
.header("Authorization", "Bearer <API_KEY>")
.header("Content-Type", "application/json")
.body("{\"product_id\": \"<string>\", \"currency\": \"<string>\", \"name\": \"<string>\", \"price\": 10, \"pricing_type\": \"<string>\"}")
.asJson();
System.out.println(response.getBody());
}
}
{
"status": "<string>",
"response": {
"data": {
"pricing_plans": [
{
"id": "<string>",
"name": "<string>",
"pricing_type": "<string>",
"listed": false,
"password": "<string>",
"shuffle_key": true,
"stocks": <int>,
"claimed": <int>,
"users": [
{
"id": "<string>",
"username": "<string>",
"email": "<string>",
"discord": {
"id": "<string>",
"username": "<string>"
}
}
],
"product": "<string>",
"price": <float>,
"renewal_period": <int>,
"renewal_period_unit": "<string>",
"initial_fee": null,
"currency": "<string>",
"trial_duration": null,
"trial_period_unit": "<string>",
"features": [<string>],
"app_links": [
{
"name": "<string>",
"link": "<string>"
}
],
"discord_access": null,
"checkout_links": [
{
"id": "<string>",
"active": false
},
{
"id": "<string>",
"active": false
},
{
"id": "<string>",
"active": false
},
{
"id": "<string>",
"active": true
}
],
"created_date": "<string>"
}
]
}
}
}
curl --request POST \
--url "https://api.hyperaze.com/api/v1/plans/create" \
--header "Authorization: Bearer $API_KEY" \
--data '{
"product_id": “<string>”,
"currency": "<string>",
"name": "<string>",
"price": 10,
"pricing_type": "<string>"
}'
import requests
url = "https://api.hyperaze.com/api/v1/plans/create"
headers = {
"Authorization": "Bearer <API_KEY>",
"Content-Type": "application/json"
}
data = {
"product_id": "<product_id>",
"currency": "USD",
"name": "Test6",
"price": 10,
"pricing_type": "Subscription",
"shuffle_key": True,
"renewal_period": 1,
"renewal_period_unit": "Year",
"trial_duration": 33,
"trial_period_unit": "Day",
"password": "psaopd123asfd",
"initial_fee": 123.34
}
response = requests.post(url, headers=headers, json=data)
# Print response
print(response.status_code)
print(response.json())
fetch("https://api.hyperaze.com/api/v1/plans/create", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
product_id: "<product_id>",
currency: "USD",
name: "Subscription without trial without initial fee w/stock",
price: 100,
pricing_type: "Subscription",
active: true,
shuffle_key: false,
renewal_period: 1,
renewal_period_unit: "Month",
})
})
.then(res => res.json())
.then(data => console.log("Created plan:", data))
.catch(err => console.error("Error:", err));
<?php
$url = "http://api.hyperaze.com/api/v1/plans/create";
$data = [
"product_id" => "<string>",
"currency" => "<string>",
"name" => "<string>",
"price" => 10,
"pricing_type" => "<string>"
];
$options = [
"http" => [
"header" => "Content-type: application/json\r\nAuthorization: Bearer <API_KEY>\r\n",
"method" => "POST",
"content" => json_encode($data)
]
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response === FALSE) {
die("Error occurred");
}
echo $response;
package main
import (
"bytes"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://api.hyperaze.com/api/v1/plans/create"
jsonData := []byte(`{
"product_id": "<string>",
"currency": "<string>",
"name": "<string>",
"price": 10,
"pricing_type": "<string>"
}`)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <API_KEY>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import kong.unirest.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.JsonNode;
public class Main {
public static void main(String[] args) {
HttpResponse<JsonNode> response = Unirest.post("http://api.hyperaze.com/api/v1/plans/create")
.header("Authorization", "Bearer <API_KEY>")
.header("Content-Type", "application/json")
.body("{\"product_id\": \"<string>\", \"currency\": \"<string>\", \"name\": \"<string>\", \"price\": 10, \"pricing_type\": \"<string>\"}")
.asJson();
System.out.println(response.getBody());
}
}
{
"status": "<string>",
"response": {
"data": {
"pricing_plans": [
{
"id": "<string>",
"name": "<string>",
"pricing_type": "<string>",
"listed": false,
"active": true,
"password": "<string>",
"shuffle_key": true,
"stocks": <int>,
"claimed": <int>,
"users": [
{
"id": "<string>",
"username": "<string>",
"email": "<string>",
"discord": {
"id": "<string>",
"username": "<string>"
}
}
],
"product": "<string>",
"price": <float>,
"renewal_period": <int>,
"renewal_period_unit": "<string>",
"initial_fee": null,
"currency": "<string>",
"trial_duration": null,
"trial_period_unit": "<string>",
"features": [<string>],
"app_links": [
{
"name": "<string>",
"link": "<string>"
}
],
"discord_access": null,
"checkout_links": [
{
"id": "<string>",
"active": false
},
{
"id": "<string>",
"active": false
},
{
"id": "<string>",
"active": false
},
{
"id": "<string>",
"active": true
}
],
"created_date": "<string>"
}
]
}
}
}