Get the default billing account.
Get a billing account
PreviewGET
/user/v1/billingAccountquery parameters
Returns
curl https://api.userhub.com/user/v1/billingAccount?organizationId=org_28seyVGVL1got6 \
-H "UserHub-Api-Key: $USERHUB_USER_KEY" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
const res = await userApi.billingAccount.get({
organizationId: "org_28seyVGVL1got6",
});
res, err := userApi.BillingAccount().Get(
context.Background(),
&userapi.BillingAccountGetInput{
OrganizationId: "org_28seyVGVL1got6",
},
)
$res = $userApi->billingAccount->get(
organizationId: 'org_28seyVGVL1got6',
);
res = user_api.billing_account.get(
organization_id="org_28seyVGVL1got6",
)
Response bodyJSON
{
"state": "USER_MANAGED",
"checkouts": [
{
"type": "CHANGE"
},
{
"type": "CHANGE_PAYMENT_METHOD"
},
{
"type": "CANCEL"
}
],
"paymentMethods": [
{
"id": "pm_2kWzaZMKDM1x81",
"type": "CARD",
"displayName": "Visa **** 4242",
"fullName": "Jane Doe",
"address": {
"lines": [
"42 West St"
],
"city": "Brooklyn",
"state": "NY",
"postalCode": "11222",
"country": "US"
},
"default": true,
"card": {
"brand": "VISA",
"expYear": 2030,
"expMonth": 7,
"last4": "4242",
"fundingType": "CREDIT"
},
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}
],
"subscription": {
"id": "sub_UBUqH64iKRBdCD",
"state": "ACTIVE",
"currencyCode": "USD",
"plan": {
"id": "plan_2wnGzPMSrDBYK5:ukfHizos:monthly:usd",
"state": "AVAILABLE",
"uniqueId": "pro:ukfHizos:monthly:usd",
"displayName": "Pro",
"description": "The pro plan.",
"currencyCode": "USD",
"interval": {
"quantity": 1,
"unit": "MONTH"
},
"revision": {
"id": "plan_2wnGzPMSrDBYK5:ukfHizos"
},
"items": [
{
"type": "SEAT",
"product": {
"id": "si_2iLgfJvq",
"uniqueId": "pro-seat",
"displayName": "Pro seat"
},
"price": {
"id": "pr_HFULbg4GRQEkV6",
"currencyCode": "USD",
"billingMode": "FIXED_TERM",
"interval": {
"quantity": 1,
"unit": "MONTH"
},
"fixed": {
"amount": "5"
}
}
}
]
},
"startTime": "2025-05-15T13:00:00Z",
"currentPeriod": {
"startTime": "2025-05-15T13:00:00Z",
"endTime": "2025-06-15T13:00:00Z"
},
"items": [
{
"id": "si_2iLgfJvq",
"product": {
"id": "si_2iLgfJvq",
"uniqueId": "pro-seat",
"displayName": "Pro seat"
},
"price": {
"id": "pr_HFULbg4GRQEkV6",
"currencyCode": "USD",
"billingMode": "FIXED_TERM",
"interval": {
"quantity": 1,
"unit": "MONTH"
},
"fixed": {
"amount": "5"
}
},
"quantity": 1
}
],
"seats": [
{
"state": "PROVISIONABLE",
"product": {
"id": "si_2iLgfJvq",
"uniqueId": "pro-seat",
"displayName": "Pro seat"
},
"currentQuantity": 1,
"assignedQuantity": 1,
"unassignedQuantity": 0,
"totalQuantity": 1
}
],
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}
}