> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unibee.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Make Billing API calls

> Integrate UniBee into your business by making direct API calls

All API calls to the UniBee service require an API key included in the request header.

You can find and configure the UniBee Base URL in the UniBee Admin Portal at Configuration->Integrations->UniBee Base URL. Use one of the following hosts as your `$UniBee_API_Host`:

* Production API Host: [https://api.unibee.dev](https://api.unibee.dev)
* Sandbox API Host: [https://api-sandbox.unibee.top](https://api-sandbox.unibee.top)

```shell theme={null}
curl --location --request POST "$UniBee_API_Host/merchant/merchant_metric/merchant_metric_event" \
  --header "Authorization: Bearer $UNIBEE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "metricCode": "folder_count_limit", // code needs to be configured in advance in the UniBee portal
    "externalUserId": "$YOUR_USER_ID",
    "externalEventId": "string", // string, __unique__, e.m. [folderId]
    "metricProperties": {}
  }'
```

You can go to UniBee Admin Portal (Configuration->Integrations->UniBee API Key) to create or regenerate the API key, the current key will still be valid within 1 hour after creating a new key.

Go to our [API docs](/api-reference) for further detail.

### API object definitions

| Resource                                                                                                                                                 | Definition                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Product <mark style={{ background: "#ffd700", padding: "2px 6px", borderRadius: "4px", fontSize: "8px" }}>API</mark>](/api-reference/product)           | A good or service that your business sells. A service product can include one or more features.                                                                                                                                                                                                      |
| [Plan <span style={{ background: "#ffd700", padding: "2px 6px", borderRadius: "4px", fontSize: "8px" }}>API</span>](/api-reference/plan)                 | Defines the unit price, currency, and billing cycle for a product.                                                                                                                                                                                                                                   |
| [User   <mark style={{ background: "#ffd700", padding: "2px 6px", borderRadius: "4px", fontSize: "8px" }}>API</mark>](/api-reference/user)               | Represents a customer who purchases a subscription. Use the Customer object associated with a subscription to make and track recurring charges and to manage the products that they subscribe to.                                                                                                    |
| [Invoice <span style={{ background: "#ffd700", padding: "2px 6px", borderRadius: "4px", fontSize: "8px" }}>API</span>](/api-reference/invoice)           | A statement of amounts a customer owes that tracks payment statuses from draft through paid or otherwise finalized. Subscriptions automatically generate invoices.                                                                                                                                   |
| [Payment <span style={{ background: "#ffd700", padding: "2px 6px", borderRadius: "4px", fontSize: "8px" }}>API</span>](/api-reference/payment)           | A way to build dynamic payment flows. A PaymentIntent tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods. Invoices automatically create PaymentIntents. |
| [Subscription <span style={{ background: "#ffd700", padding: "2px 6px", borderRadius: "4px", fontSize: "8px" }}>API</span>](/api-reference/subscription) | Represents a customer’s scheduled recurring purchase of a product. Use a subscription to collect payments and provide repeated delivery of or continuous access to a product.                                                                                                                        |
