Create Plan
curl --request POST \
--url https://mapi.zbx.boomfi.xyz/v1/plan \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"amount": "<string>",
"currency": "<string>",
"description": "<string>",
"intervalCount": 123,
"metadata": {},
"name": "<string>",
"reference": "<string>",
"trial_period": "<string>"
}
'import requests
url = "https://mapi.zbx.boomfi.xyz/v1/plan"
payload = {
"amount": "<string>",
"currency": "<string>",
"description": "<string>",
"intervalCount": 123,
"metadata": {},
"name": "<string>",
"reference": "<string>",
"trial_period": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
currency: '<string>',
description: '<string>',
intervalCount: 123,
metadata: {},
name: '<string>',
reference: '<string>',
trial_period: '<string>'
})
};
fetch('https://mapi.zbx.boomfi.xyz/v1/plan', 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://mapi.zbx.boomfi.xyz/v1/plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<string>',
'currency' => '<string>',
'description' => '<string>',
'intervalCount' => 123,
'metadata' => [
],
'name' => '<string>',
'reference' => '<string>',
'trial_period' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mapi.zbx.boomfi.xyz/v1/plan"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"intervalCount\": 123,\n \"metadata\": {},\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"trial_period\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mapi.zbx.boomfi.xyz/v1/plan")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"intervalCount\": 123,\n \"metadata\": {},\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"trial_period\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mapi.zbx.boomfi.xyz/v1/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"intervalCount\": 123,\n \"metadata\": {},\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"trial_period\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"available_quantity": 123,
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"deleted_at": "<string>",
"enabled": true,
"expires_at": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"org_id": "<string>",
"payment_link": {
"created_at": "<string>",
"created_by": "<string>",
"customer_ident_collection": true,
"deleted_at": "<string>",
"enabled": true,
"id": "<string>",
"invoice_id": "<string>",
"metadata": {},
"plan_id": "<string>",
"properties": {},
"shipping_address_collection": true,
"tax_ident_collection": true,
"updated_at": "<string>",
"updated_by": "<string>"
},
"price": "<string>",
"properties": {},
"recurring_interval_count": 123,
"reference": "<string>",
"trial_period": "<string>",
"updated_at": "<string>"
},
"error": true,
"message": "<string>"
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}Plans
Create Plan
Create plan.
POST
/
plan
Create Plan
curl --request POST \
--url https://mapi.zbx.boomfi.xyz/v1/plan \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"amount": "<string>",
"currency": "<string>",
"description": "<string>",
"intervalCount": 123,
"metadata": {},
"name": "<string>",
"reference": "<string>",
"trial_period": "<string>"
}
'import requests
url = "https://mapi.zbx.boomfi.xyz/v1/plan"
payload = {
"amount": "<string>",
"currency": "<string>",
"description": "<string>",
"intervalCount": 123,
"metadata": {},
"name": "<string>",
"reference": "<string>",
"trial_period": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
currency: '<string>',
description: '<string>',
intervalCount: 123,
metadata: {},
name: '<string>',
reference: '<string>',
trial_period: '<string>'
})
};
fetch('https://mapi.zbx.boomfi.xyz/v1/plan', 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://mapi.zbx.boomfi.xyz/v1/plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<string>',
'currency' => '<string>',
'description' => '<string>',
'intervalCount' => 123,
'metadata' => [
],
'name' => '<string>',
'reference' => '<string>',
'trial_period' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mapi.zbx.boomfi.xyz/v1/plan"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"intervalCount\": 123,\n \"metadata\": {},\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"trial_period\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mapi.zbx.boomfi.xyz/v1/plan")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"intervalCount\": 123,\n \"metadata\": {},\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"trial_period\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mapi.zbx.boomfi.xyz/v1/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"intervalCount\": 123,\n \"metadata\": {},\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"trial_period\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"available_quantity": 123,
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"deleted_at": "<string>",
"enabled": true,
"expires_at": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"org_id": "<string>",
"payment_link": {
"created_at": "<string>",
"created_by": "<string>",
"customer_ident_collection": true,
"deleted_at": "<string>",
"enabled": true,
"id": "<string>",
"invoice_id": "<string>",
"metadata": {},
"plan_id": "<string>",
"properties": {},
"shipping_address_collection": true,
"tax_ident_collection": true,
"updated_at": "<string>",
"updated_by": "<string>"
},
"price": "<string>",
"properties": {},
"recurring_interval_count": 123,
"reference": "<string>",
"trial_period": "<string>",
"updated_at": "<string>"
},
"error": true,
"message": "<string>"
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}Authorizations
Body
application/json
Create Plan Request
Price amount in major units (for example "9.99"), as a decimal string.
ISO 4217 or crypto currency code for the price (for example "USD", "USDC").
Human-readable plan description shown to customers.
Billing interval unit for recurring plans. One of Minute, Hour, Day, Week, Month, Year.
Available options:
Unknown, Minute, Hour, Day, Week, Month, Year Number of interval units between billings. Defaults to 1. For Month: 1, 2, 3, 4, or 6. For Year: 1, 2, or 3.
Arbitrary key-value metadata to attach to the plan.
Show child attributes
Show child attributes
Display name of the plan.
Optional merchant-defined reference for this plan.
Optional trial period duration before the first charge (for example "P7D" for 7 days).
⌘I