Get account details
GET
/api/account
Returns the user's payment method and per-app subscription list.
Responses
200
Account details
Name
Type
Description
paymentMethod
object
id
string
Stripe payment method ID
Example:
pm_1abc2def3ghi
brand
string
Card brand (e.g. visa, mastercard, amex)
Example:
visa
last4
string
Last four digits of the card number
Example:
4242
expMonth
integer
Card expiration month (1–12)
Example:
12
expYear
integer
Card expiration year
Example:
2027
subscriptions
object[]
appId
string
Unique identifier for the app
Example:
-NtestApp123
appName
string
Display name of the app
Example:
My Weather App
planType
string
monthlyyearly
status
string
noneactivepast_duecanceled
cancelAtPeriodEnd
boolean
Whether the subscription is scheduled for cancellation at period end
currentPeriodEnd
integer
Unix timestamp of the current billing period end
401
Missing, invalid, or expired authentication token
Name
Type
Description
errorrequired
object
coderequired
string
Machine-readable error code
UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired
string
Human-readable error description
docUrl
string (uri)
Link to relevant API documentation for this error
Example:
https://orbitkit.io/api/errors/#unauthorized
details
object[]
Additional validation details (Zod errors)
404
Resource not found
Name
Type
Description
errorrequired
object
coderequired
string
Machine-readable error code
UNAUTHORIZEDFORBIDDENNOT_FOUNDVALIDATION_FAILEDRATE_LIMITEDSLUG_TAKENSLUG_RESERVEDDOMAIN_IN_USEAPP_LIMIT_REACHEDSUBSCRIPTION_REQUIREDSUBSCRIPTION_EXISTSNO_PAYMENT_METHODNO_ACTIVE_SUBSCRIPTIONNOT_CANCELINGALREADY_CANCELINGSUBSCRIPTION_CANCELINGSAME_PLANCARD_ERRORPAYMENT_ERRORNO_STRIPE_CUSTOMERCERT_CREATION_FAILEDDEPLOY_FAILEDAPI_KEY_LIMIT_REACHEDINVALID_IDEMPOTENCY_KEYIDEMPOTENCY_KEY_REUSEINTERNAL_ERROR
messagerequired
string
Human-readable error description
docUrl
string (uri)
Link to relevant API documentation for this error
Example:
https://orbitkit.io/api/errors/#unauthorized
details
object[]
Additional validation details (Zod errors)
Language
URL
GET
https://api.orbitkit.io/api/account
curl -X GET "https://api.orbitkit.io/api/account" \
-H "Authorization: Bearer $ORBITKIT_API_KEY"
const response = await fetch("https://api.orbitkit.io/api/account", {
method: "GET",
headers: {
"Authorization": "Bearer " + apiKey,
},
});
const data = await response.json();
console.log(data);
var request = URLRequest(url: URL(string: "https://api.orbitkit.io/api/account")!)
request.httpMethod = "GET"
request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
let (data, _) = try await URLSession.shared.data(for: request)
let json = try JSONSerialization.jsonObject(with: data)
print(json)
200
{
"paymentMethod": {
"id": "pm_1abc2def3ghi",
"brand": "visa",
"last4": "4242",
"expMonth": "12",
"expYear": "2027"
},
"subscriptions": [
{
"appId": "-NtestApp123",
"appName": "My Weather App",
"planType": "monthly",
"status": "none",
"cancelAtPeriodEnd": true,
"currentPeriodEnd": 0
}
]
}
401
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token",
"docUrl": "https://orbitkit.io/api/errors/#unauthorized"
}
}
404
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"docUrl": "https://orbitkit.io/api/errors/#not-found"
}
}