curl --request GET \
--url https://api.bachs.io/v1/subscriptions/{subscription_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/subscriptions/{subscription_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/subscriptions/{subscription_id}"
req, _ := http.NewRequest("GET", 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": "sub_1a2b3c4d5e6f",
"payment_method_id": "pm_7h8i9j0k",
"status": "active",
"collection_method": "charge_automatically",
"currency": "USD",
"amount": "10.00",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"quantity": 1,
"seats": 1,
"current_period_start": "2026-07-13T12:00:00Z",
"current_period_end": "2026-08-13T12:00:00Z",
"previously_billed_at": "2026-07-13T12:00:00Z",
"next_billed_at": "2026-08-13T12:00:00Z",
"trial_end": null,
"cancel_at_period_end": false,
"canceled_at": null,
"created_at": "2026-07-13T12:00:00Z",
"product": {
"id": "prod_abc123",
"name": "Pro plan",
"description": "Everything in Pro.",
"status": "active",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
},
"items": [
{
"id": "si_11aa22bb",
"status": "active",
"quantity": 1,
"seats": 1,
"recurring": true,
"price_type": "fixed",
"unit_amount": "10.00",
"currency": "USD",
"previously_billed_at": "2026-07-13T12:00:00Z",
"next_billed_at": "2026-08-13T12:00:00Z",
"price": {
"id": "price_pro_usd",
"product_id": "prod_abc123",
"price_type": "fixed",
"currency": "USD",
"unit_amount": "10.00",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"seat_tiers": null,
"is_archived": false,
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
},
"product": {
"id": "prod_abc123",
"name": "Pro plan",
"status": "active",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
},
"created_at": "2026-07-13T12:00:00Z",
"updated_at": "2026-07-13T12:00:00Z"
}
],
"customer": {
"customer_id": "cust_xyz789",
"email": "customer@example.com",
"name": "Jane Doe",
"phone_number": "+2348012345678",
"metadata": {},
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
}
}{
"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"
}{
"detail": "Rate limit exceeded. Please retry after a few seconds.",
"error_code": "TOO_MANY_REQUESTS"
}{
"detail": "An unexpected error occurred. Please try again later.",
"error_code": "INTERNAL_SERVER_ERROR"
}Retrieve a subscription
Retrieve a single subscription with its product, price, items, and billing dates.
curl --request GET \
--url https://api.bachs.io/v1/subscriptions/{subscription_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bachs.io/v1/subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/subscriptions/{subscription_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/subscriptions/{subscription_id}"
req, _ := http.NewRequest("GET", 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": "sub_1a2b3c4d5e6f",
"payment_method_id": "pm_7h8i9j0k",
"status": "active",
"collection_method": "charge_automatically",
"currency": "USD",
"amount": "10.00",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"quantity": 1,
"seats": 1,
"current_period_start": "2026-07-13T12:00:00Z",
"current_period_end": "2026-08-13T12:00:00Z",
"previously_billed_at": "2026-07-13T12:00:00Z",
"next_billed_at": "2026-08-13T12:00:00Z",
"trial_end": null,
"cancel_at_period_end": false,
"canceled_at": null,
"created_at": "2026-07-13T12:00:00Z",
"product": {
"id": "prod_abc123",
"name": "Pro plan",
"description": "Everything in Pro.",
"status": "active",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
},
"items": [
{
"id": "si_11aa22bb",
"status": "active",
"quantity": 1,
"seats": 1,
"recurring": true,
"price_type": "fixed",
"unit_amount": "10.00",
"currency": "USD",
"previously_billed_at": "2026-07-13T12:00:00Z",
"next_billed_at": "2026-08-13T12:00:00Z",
"price": {
"id": "price_pro_usd",
"product_id": "prod_abc123",
"price_type": "fixed",
"currency": "USD",
"unit_amount": "10.00",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"seat_tiers": null,
"is_archived": false,
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
},
"product": {
"id": "prod_abc123",
"name": "Pro plan",
"status": "active",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
},
"created_at": "2026-07-13T12:00:00Z",
"updated_at": "2026-07-13T12:00:00Z"
}
],
"customer": {
"customer_id": "cust_xyz789",
"email": "customer@example.com",
"name": "Jane Doe",
"phone_number": "+2348012345678",
"metadata": {},
"created_at": "2026-07-01T09:00:00Z",
"updated_at": "2026-07-01T09:00:00Z"
}
}{
"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"
}{
"detail": "Rate limit exceeded. Please retry after a few seconds.",
"error_code": "TOO_MANY_REQUESTS"
}{
"detail": "An unexpected error occurred. Please try again later.",
"error_code": "INTERNAL_SERVER_ERROR"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Response
The subscription
Status of the subscription. Set automatically by Bachs as payments succeed or fail. trialing: In a free trial. No payment has been collected yet. trial_end marks when billing begins. active: Active and paid. Bachs is billing this subscription automatically each cycle. past_due: A cycle payment failed. Bachs is retrying the payment while access continues. unpaid: Payment retries have been exhausted. Access should be restricted. canceled: Canceled and will not renew. This is a terminal state. paused: Temporarily suspended. Billing is halted until the subscription resumes.
trialing, active, past_due, unpaid, canceled, paused "active"

