curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/payments/stripe/products \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"name": "Studio membership",
"description": "Access to weekly classes.",
"metadata": {
"tier": "standard"
}
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/payments/stripe/products"
payload = {
"name": "Studio membership",
"description": "Access to weekly classes.",
"metadata": { "tier": "standard" }
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Studio membership',
description: 'Access to weekly classes.',
metadata: {tier: 'standard'}
})
};
fetch('https://app.base44.com/api/apps/{app_id}/payments/stripe/products', 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/products",
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([
'name' => 'Studio membership',
'description' => 'Access to weekly classes.',
'metadata' => [
'tier' => 'standard'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://app.base44.com/api/apps/{app_id}/payments/stripe/products"
payload := strings.NewReader("{\n \"name\": \"Studio membership\",\n \"description\": \"Access to weekly classes.\",\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://app.base44.com/api/apps/{app_id}/payments/stripe/products")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Studio membership\",\n \"description\": \"Access to weekly classes.\",\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/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Studio membership\",\n \"description\": \"Access to weekly classes.\",\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "prod_T7mK2p9Q4r6S8v",
"name": "Studio membership",
"description": "Access to weekly classes.",
"active": true,
"images": [
"https://example.com/membership.jpg"
],
"metadata": {
"category": "membership"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Stripe product
Creates a product. Retrying the request can create another product. Requires write access to the app. Workspace viewers cannot call this operation. 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 apps configured with the same account share its catalog.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/payments/stripe/products \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"name": "Studio membership",
"description": "Access to weekly classes.",
"metadata": {
"tier": "standard"
}
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/payments/stripe/products"
payload = {
"name": "Studio membership",
"description": "Access to weekly classes.",
"metadata": { "tier": "standard" }
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Studio membership',
description: 'Access to weekly classes.',
metadata: {tier: 'standard'}
})
};
fetch('https://app.base44.com/api/apps/{app_id}/payments/stripe/products', 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/products",
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([
'name' => 'Studio membership',
'description' => 'Access to weekly classes.',
'metadata' => [
'tier' => 'standard'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://app.base44.com/api/apps/{app_id}/payments/stripe/products"
payload := strings.NewReader("{\n \"name\": \"Studio membership\",\n \"description\": \"Access to weekly classes.\",\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://app.base44.com/api/apps/{app_id}/payments/stripe/products")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Studio membership\",\n \"description\": \"Access to weekly classes.\",\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/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Studio membership\",\n \"description\": \"Access to weekly classes.\",\n \"metadata\": {\n \"tier\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "prod_T7mK2p9Q4r6S8v",
"name": "Studio membership",
"description": "Access to weekly classes.",
"active": true,
"images": [
"https://example.com/membership.jpg"
],
"metadata": {
"category": "membership"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal API key.
Path Parameters
ID of the Base44 app.
Body
Request to create a Stripe product.
Product name.
"Studio membership"
Product description. Defaults to null.
"Access to weekly classes."
Metadata to store. Use string values accepted by Stripe. Defaults to null. Omitted or null metadata leaves an existing value unchanged on update.
{ "tier": "standard" }
Response
The operation result.
A product in the Stripe account configured for the app.
Stripe product ID.
"prod_T7mK2p9Q4r6S8v"
Product name.
"Studio membership"
Product description, or null when none is set.
"Access to weekly classes."
Whether the product is active.
true
Product image URLs.
["https://example.com/membership.jpg"]
Metadata stored on the product.
{ "category": "membership" }
Was this page helpful?