curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/payments/stripe/prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "prod_T7mK2p9Q4r6S8v",
"unit_amount": 2500,
"currency": "usd",
"recurring_interval": "month",
"recurring_interval_count": 1,
"metadata": {
"tier": "standard"
}
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/payments/stripe/prices"
payload = {
"product_id": "prod_T7mK2p9Q4r6S8v",
"unit_amount": 2500,
"currency": "usd",
"recurring_interval": "month",
"recurring_interval_count": 1,
"metadata": { "tier": "standard" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: 'prod_T7mK2p9Q4r6S8v',
unit_amount: 2500,
currency: 'usd',
recurring_interval: 'month',
recurring_interval_count: 1,
metadata: {tier: 'standard'}
})
};
fetch('https://app.base44.com/api/apps/{app_id}/payments/stripe/prices', 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://app.base44.com/api/apps/{app_id}/payments/stripe/prices",
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([
'product_id' => 'prod_T7mK2p9Q4r6S8v',
'unit_amount' => 2500,
'currency' => 'usd',
'recurring_interval' => 'month',
'recurring_interval_count' => 1,
'metadata' => [
'tier' => 'standard'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.base44.com/api/apps/{app_id}/payments/stripe/prices"
payload := strings.NewReader("{\n \"product_id\": \"prod_T7mK2p9Q4r6S8v\",\n \"unit_amount\": 2500,\n \"currency\": \"usd\",\n \"recurring_interval\": \"month\",\n \"recurring_interval_count\": 1,\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.base44.com/api/apps/{app_id}/payments/stripe/prices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"prod_T7mK2p9Q4r6S8v\",\n \"unit_amount\": 2500,\n \"currency\": \"usd\",\n \"recurring_interval\": \"month\",\n \"recurring_interval_count\": 1,\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/payments/stripe/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"prod_T7mK2p9Q4r6S8v\",\n \"unit_amount\": 2500,\n \"currency\": \"usd\",\n \"recurring_interval\": \"month\",\n \"recurring_interval_count\": 1,\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "price_1T7mK2Q4r6S8v9Ab",
"product": "prod_T7mK2p9Q4r6S8v",
"unit_amount": 2500,
"currency": "usd",
"active": true,
"metadata": {
"tier": "standard"
},
"recurring": {
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
},
"livemode": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Stripe price
Creates a one-time or recurring price for the product identified by product_id.
Uses the Stripe account selected by the app’s stored credentials. Live keys select the live catalog and test keys select the test catalog. Products and prices belong to that Stripe account, so multiple apps configured with the same account share the same catalog. Check livemode on each returned product or price to see which catalog the call used.
Requires write access to the app. Workspace viewers cannot call this operation.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/payments/stripe/prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "prod_T7mK2p9Q4r6S8v",
"unit_amount": 2500,
"currency": "usd",
"recurring_interval": "month",
"recurring_interval_count": 1,
"metadata": {
"tier": "standard"
}
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/payments/stripe/prices"
payload = {
"product_id": "prod_T7mK2p9Q4r6S8v",
"unit_amount": 2500,
"currency": "usd",
"recurring_interval": "month",
"recurring_interval_count": 1,
"metadata": { "tier": "standard" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: 'prod_T7mK2p9Q4r6S8v',
unit_amount: 2500,
currency: 'usd',
recurring_interval: 'month',
recurring_interval_count: 1,
metadata: {tier: 'standard'}
})
};
fetch('https://app.base44.com/api/apps/{app_id}/payments/stripe/prices', 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://app.base44.com/api/apps/{app_id}/payments/stripe/prices",
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([
'product_id' => 'prod_T7mK2p9Q4r6S8v',
'unit_amount' => 2500,
'currency' => 'usd',
'recurring_interval' => 'month',
'recurring_interval_count' => 1,
'metadata' => [
'tier' => 'standard'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.base44.com/api/apps/{app_id}/payments/stripe/prices"
payload := strings.NewReader("{\n \"product_id\": \"prod_T7mK2p9Q4r6S8v\",\n \"unit_amount\": 2500,\n \"currency\": \"usd\",\n \"recurring_interval\": \"month\",\n \"recurring_interval_count\": 1,\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.base44.com/api/apps/{app_id}/payments/stripe/prices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"prod_T7mK2p9Q4r6S8v\",\n \"unit_amount\": 2500,\n \"currency\": \"usd\",\n \"recurring_interval\": \"month\",\n \"recurring_interval_count\": 1,\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/payments/stripe/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"prod_T7mK2p9Q4r6S8v\",\n \"unit_amount\": 2500,\n \"currency\": \"usd\",\n \"recurring_interval\": \"month\",\n \"recurring_interval_count\": 1,\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "price_1T7mK2Q4r6S8v9Ab",
"product": "prod_T7mK2p9Q4r6S8v",
"unit_amount": 2500,
"currency": "usd",
"active": true,
"metadata": {
"tier": "standard"
},
"recurring": {
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
},
"livemode": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the Base44 app.
Body
Request to create a Stripe price.
Stripe product ID to price.
"prod_T7mK2p9Q4r6S8v"
Amount in the currency's smallest unit. For USD, 2500 represents $25.00.
2500
Three-letter ISO 4217 currency code. Converted to lowercase before sending to Stripe. Defaults to usd.
"usd"
Billing interval. Use day, week, month, or year. Omit it or send null for a one-time price. Defaults to null.
"month"
Number of billing intervals between charges. Used only when a recurring interval is supplied. Defaults to 1.
1
Metadata to store, as string key-value pairs. Stripe's metadata rules limit it to 50 keys, 40 characters per key, and 500 characters per value. Defaults to null.
{ "tier": "standard" }
Response
The operation result.
A price in the Stripe account configured for the app.
Stripe price ID.
"price_1T7mK2Q4r6S8v9Ab"
Stripe product ID this price belongs to.
"prod_T7mK2p9Q4r6S8v"
Amount in the currency's smallest unit, or null for pricing without a fixed integer unit amount.
2500
Currency as a lowercase three-letter ISO 4217 code.
"usd"
Whether the price is active.
true
Metadata stored on the price.
{ "tier": "standard" }
Billing schedule, or null for a one-time price.
Show child attributes
Show child attributes
{
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
}
true when the price is in the live catalog, false when it's in the test catalog.
false
Was this page helpful?