curl -X POST "https://api.playground.try.be/customers/membership-types" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"brand_id": "00000000-0000-0000-0000-000000000000",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "Membership is non-transferable and subject to a 30-day notice\nperiod for cancellation. See https://example.com/terms for the\nfull agreement.\n",
"private": false,
"visibility": "public",
"offline_payments": false,
"disable_confirmation_email": false,
"minimum_start_date": "2026-01-15T09:30:00+00:00",
"min_members": 2,
"max_members": 4,
"revenue_schedule": "FREQ=DAILY",
"initial_rate": {
"processors": [
"stripe"
],
"amount": 1000,
"currency": "GBP",
"billing_frequency": "P1M",
"default_duration": "P1M"
}
}'
const response = await fetch('https://api.playground.try.be/customers/membership-types', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"brand_id": "00000000-0000-0000-0000-000000000000",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "Membership is non-transferable and subject to a 30-day notice\nperiod for cancellation. See https://example.com/terms for the\nfull agreement.\n",
"private": false,
"visibility": "public",
"offline_payments": false,
"disable_confirmation_email": false,
"minimum_start_date": "2026-01-15T09:30:00+00:00",
"min_members": 2,
"max_members": 4,
"revenue_schedule": "FREQ=DAILY",
"initial_rate": {
"processors": [
"stripe"
],
"amount": 1000,
"currency": "GBP",
"billing_frequency": "P1M",
"default_duration": "P1M"
}
}),
})
if (!response.ok) {
throw new Error(`Trybe API ${response.status}: ${await response.text()}`)
}
const data = await response.json()
import httpx
response = httpx.post(
"https://api.playground.try.be/customers/membership-types",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"brand_id": "00000000-0000-0000-0000-000000000000",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "Membership is non-transferable and subject to a 30-day notice\nperiod for cancellation. See https://example.com/terms for the\nfull agreement.\n",
"private": False,
"visibility": "public",
"offline_payments": False,
"disable_confirmation_email": False,
"minimum_start_date": "2026-01-15T09:30:00+00:00",
"min_members": 2,
"max_members": 4,
"revenue_schedule": "FREQ=DAILY",
"initial_rate": {
"processors": [
"stripe"
],
"amount": 1000,
"currency": "GBP",
"billing_frequency": "P1M",
"default_duration": "P1M"
}
},
)
response.raise_for_status()
data = response.json()
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.playground.try.be/customers/membership-types', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => '00000000-0000-0000-0000-000000000000',
'name' => 'Gold tier',
'description' => 'Enjoy exclusive benefits as part of being a member in our Gold tier',
'terms' => 'Membership is non-transferable and subject to a 30-day notice
period for cancellation. See https://example.com/terms for the
full agreement.
',
'private' => false,
'visibility' => 'public',
'offline_payments' => false,
'disable_confirmation_email' => false,
'minimum_start_date' => '2026-01-15T09:30:00+00:00',
'min_members' => 2,
'max_members' => 4,
'revenue_schedule' => 'FREQ=DAILY',
'initial_rate' => [
'processors' => [
'stripe'
],
'amount' => 1000,
'currency' => 'GBP',
'billing_frequency' => 'P1M',
'default_duration' => 'P1M'
]
],
]);
$data = json_decode($response->getBody(), true);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"brand_id": "00000000-0000-0000-0000-000000000000",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "Membership is non-transferable and subject to a 30-day notice\nperiod for cancellation. See https://example.com/terms for the\nfull agreement.\n",
"private": false,
"visibility": "public",
"offline_payments": false,
"disable_confirmation_email": false,
"minimum_start_date": "2026-01-15T09:30:00+00:00",
"min_members": 2,
"max_members": 4,
"revenue_schedule": "FREQ=DAILY",
"initial_rate": map[string]interface{}{
"processors": []interface{}{
"stripe",
},
"amount": 1000,
"currency": "GBP",
"billing_frequency": "P1M",
"default_duration": "P1M",
},
})
req, _ := http.NewRequest("POST", "https://api.playground.try.be/customers/membership-types", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
}