Docs/User API/Billing account/Get

Get a billing account

Preview
GET/user/v1/billingAccount

Get the default billing account.

query parameters

  • organizationId

    string

    The identifier of the organization.

    If not specified the billing account for the user is returned.

Returns

  • state

    enum

    The status of the billing account.

    Possible values:
    USER_MANAGEDADMIN_MANAGEDUNMANAGEDBROKENNOT_SETUP
  • displayName

    string

    The human-readable display name of the billing account.

  • email

    string

    The email address of the billing account.

  • phoneNumber

    string

    The E164 phone number for the billing account (e.g. +12125550123).

  • address

    Address

    The billing address for the billing account.

  • currencyCode

    string

    The ISO-4217 currency code for the billing account (e.g. USD).

  • balanceAmount

    string

    The balance amount for the account.

    A negative value indicates an amount which will be subtracted from the next invoice (credit).

    A positive value indicates an amount which will be added to the next invoice (debt).

  • checkouts

    BillingAccountCheckout[]

    The available checkouts.

  • paymentMethods

    PaymentMethod[]

    The default and latest 10 payment methods for the account.

  • subscription

    Subscription

    The subscription for the account.

curl https://api.userhub.com/user/v1/billingAccount?organizationId=org_28seyVGVL1got6 \
  -H "UserHub-Api-Key: $USERHUB_USER_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
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"
  }
}
PreviousThe billing account object
NextUpdate a billing account

Build software thatmonetizes
$

Subscribe to monthly product updates

© 2025 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth