curl --request POST \
--url https://api.bachs.io/v1/products/{product_id}/archive \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/products/{product_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/products/{product_id}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/products/{product_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "prod_1a2b3c4d5e6f7g8h",
"organization_id": "acct_7KpQ2mNv4XbR9dLc",
"name": "Pro Plan",
"description": "Full access, billed monthly.",
"price": {
"currency": "USD",
"price_type": "fixed",
"amount": "29.00",
"preset_amount": null,
"minimum_amount": null,
"maximum_amount": null,
"currency_options": []
},
"prices": [
{
"currency": "USD",
"amount": "29.00",
"minimum_amount": null,
"maximum_amount": null,
"is_default": true
}
],
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"status": "archived",
"metadata": {
"tier": "pro"
},
"media": [],
"actor_id": "usr_abc123",
"total_payments": 0,
"total_amount": "0.00",
"created_at": "2026-07-13T14:00:00.000Z",
"updated_at": "2026-07-13T14:00:00.000Z",
"archived_at": "2026-07-13T14:30:00.000Z"
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}Archive a product
Archives a product so it can no longer be used in new checkouts or subscriptions. Existing subscriptions keep billing. This is idempotent: archiving an already-archived product succeeds. Reverse it with Unarchive Product. Requires the products:write scope.
curl --request POST \
--url https://api.bachs.io/v1/products/{product_id}/archive \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/products/{product_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/products/{product_id}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/products/{product_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "prod_1a2b3c4d5e6f7g8h",
"organization_id": "acct_7KpQ2mNv4XbR9dLc",
"name": "Pro Plan",
"description": "Full access, billed monthly.",
"price": {
"currency": "USD",
"price_type": "fixed",
"amount": "29.00",
"preset_amount": null,
"minimum_amount": null,
"maximum_amount": null,
"currency_options": []
},
"prices": [
{
"currency": "USD",
"amount": "29.00",
"minimum_amount": null,
"maximum_amount": null,
"is_default": true
}
],
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"status": "archived",
"metadata": {
"tier": "pro"
},
"media": [],
"actor_id": "usr_abc123",
"total_payments": 0,
"total_amount": "0.00",
"created_at": "2026-07-13T14:00:00.000Z",
"updated_at": "2026-07-13T14:00:00.000Z",
"archived_at": "2026-07-13T14:30:00.000Z"
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Path Parameters
Response
Product archived
Unique identifier for the product, prefixed with prod_.
"prod_1a2b3c4d5e6f"
The account that owns the product.
"acct_7KpQ2mNv4XbR9dLc"
Display name of the product.
"Pro Plan"
Optional description of the product. null when not set.
"Monthly access to all Pro features."
Primary price for the product, in the product's default currency.
Show child attributes
Show child attributes
{
"price_type": "fixed",
"currency": "USD",
"amount": "29.00"
}
Status of the product. active: Live and available for use in checkouts and subscriptions. archived: Retired. Kept for reference but not available for new purchases.
active, archived "active"
Your own key-value data attached to the product, returned unchanged.
{ "order_id": "ORD-9876", "tier": "pro" }
Media items (images) attached to the product. Empty when none are set.
Show child attributes
Show child attributes
Identifier of the user or key that created the product.
"usr_abc123"
ISO 8601 timestamp when the product was created.
"2026-07-13T14:00:00.000Z"
ISO 8601 timestamp when the product was last updated.
"2026-07-13T14:00:00.000Z"
When set, the product is archived and cannot be used in new checkouts. null while the product is active.
null
How often the product bills. Provide a cadence to make the product recurring, or omit it for a one-time product.
Show child attributes
Show child attributes
A free trial before the first charge, given as a duration like { "interval": "day", "frequency": 14 } for 14 days. The customer isn't charged until the trial ends. Only valid on a recurring product. Currently in beta.
Show child attributes
Show child attributes
All prices configured on the product, one per currency. Each has currency, amount, optional minimum_amount and maximum_amount, and is_default.
Running count of completed payments for this product. Starts at 0 and increments as customers pay.
0
Running total collected for this product, as a decimal string in the product currency. Starts at "0.00".
"0.00"

