# Query syntax Source: https://docs.nadles.com/analytics/query-syntax Nadles analytics allows you to run free-form SQL queries on your API request logs and usage records collected by Nadles metering service. Read the full documentation in the "My Analytics" section in the [Nadles app](https://app.nadles.com/). # Add API Source: https://docs.nadles.com/api-management/add-api You can add a new API either by importing an OpenAPI specification or by filling out the form manually. ## From OpenAPI file Nadles supports importing OpenAPI **v3.0** specifications. It is the easiest way to get your API up and running. * Navigate to **My APIs**. * Click **Import OpenAPI file**. * Choose the subdomain for your API, select the OpenAPI file and click **Submit**. By default, Nadles let's you choose a subdomain for your API, so the URL to access your API looks like `https://.p.nadles.com/` Later, you can configure Nadles API Gateway to use a custom domain for your API, e.g. `https://api.mydomain.com`. [Learn more](/api-management/custom-domain). The OpenAPI definition is imported along with all endpoints. If there are several elements in the "servers" array, the first one is used. After importing the file, please check the correctness of the configuration on the API settings and Endpoints pages. ## Manually ### Adding a new API * Navigate to **My APIs**. * Click **"Add new API"**. * Fill in the details of your API. **Name** The name of your API. This name your customers will see on the checkout page. **Base URL** The base URL for all API endpoints. The full URL to which Nadles API Gateway will proxy users' requests, is formed as `Base URL + Endpoint URL`. If your API has the following endpoints: `https://api.mydomain.com/weather-forecast/` `https://api.mydomain.com/current-weather/` then `https://api.mydomain.com/` is the base URL. Do not add path parameters or query string to the base URL of your API. That can be done using "Transformations". **Short description** Shown to your customers on the checkout page if no full description is provided. **Full description** Shown to your customers on the checkout page. **Link to your Terms of Service** Link to your website page with the Terms of Service for your API. Shown to your customers on the checkout page. **Link to your API documentation** Link to your website page with the API documentation. Shown to your customers on the checkout page. **API subdomain** By default, your API is accessible on Nadles domain and the access URL looks like `https://.p.nadles.com/` Later, you can configure Nadles API Gateway to use a custom domain for your API, e.g. `https://api.mydomain.com` [Learn more](api-management/custom-domains) * Click **Submit**. * After the API is added, you are redirected to the dashboard. * On the dashboard there is now the Nadles API URL that should be used by your customers to make requests to the API. To attach a custom domain to your API, check out [this page](api-management/custom-domains). ### Adding endpoints * Go to **Endpoints** section in the menu and click **Add new endpoint**. * Choose a HTTP method and enter the endpoint URL relative to the base URL. If your API has the following endpoints: `https://api.mydomain.com/weather-forecast/` `https://api.mydomain.com/current-weather/` then `https://api.mydomain.com` is the base URL and `/weather-forecast/` and `/current-weather/` are the endpoint URLs. * Path parameters can be used in endpoint URLs. These parameters can be used later to configure billable metrics, request transformations and rejection rules. You can specify endpoint URLs like this: `GET /weather-forecast/{city}` In this case, you will be able to later configure Nadles API Gateway to limit access to weather forecast for certain cities or charge different price for different cities. * Click **Submit**. Once all endpoints are added, it's time to [set up user authentication](https://docs.nadles.com/api-management/authentication/). # API key management Source: https://docs.nadles.com/api-management/api-key-management Learn more about [user authentication](/api-management/user-authentication) on Nadles. Nadles issues API keys automatically. When a subscription is activated, a new API key is issued and available to the customer in the self-service portal. Whenever the subscription gets canceled or unpaid, Nadles revokes all API keys automatically. You can always issue additional keys for your customers and revoke the existing ones on the subscription management page. To manage access keys for a subscription, navigate to **My Customers → choose customer → Subscriptions → choose subscription**. # Custom domain Source: https://docs.nadles.com/api-management/custom-domain You can attach a custom domain name to an API accessed via Nadles API Gateway, so that, instead of Nadles domain (`https://.p.nadles.com/`), users access your API by the domain name owned by you. In order to successfully complete the setup, you must be able to edit DNS records of the domain name. ## Setting up a custom domain name To start, navigate to **My APIs → choose API → Settings**. Scroll the page down to the **Custom domain name** section. Here, enter the domain name you'd like to use for your API. By clicking **Submit** you initiate a domain ownership verification process. ## Ownership verification To verify ownership, you need to add two DNS records. * TXT record for the base domain with a unique value generated by Nadles. * CNAME record for the desired subdomain referencing the Nadles API Gateway's domain name, `p.nadles.com`. In this example we're attaching `api.myfirstapi.com`, so the two records to add to `myfirstapi.com` are: | Type | Name | Value | | :---- | ---- | ------------------------------------------ | | TXT | @ | nadles\_verification\_8KcfbFwYGieHpqTY8... | | CNAME | api | p.nadles.com | After you've added the records, click **Check DNS propagation status** and make sure that the records have propagated to the majority of the servers. Then click **Verify DNS records** to make Nadles verify the ownership and issue a SSL certificate. Once the SSL certificate is issued, the status is updated: And your custom domain name is displayed everywhere instead of the standard access URL assigned by Nadles. ## Path prefix If you plan to use the same domain name for several APIs, you need to specify the path prefix. In case several APIs are configured to be served on the same domain name, Nadles API Gateway, just like many other API Gateways, will use the path prefix to distinguish between them. **Example** Let's say, you plan to set up Weather and Currency APIs with Nadles on the same domain, e.g. `api.myapi.com`. You have to set different path prefixes for them in the "Custom domain name" section. **For Weather API:** * Custom domain name: `api.myapi.com` * Path prefix: `/weather/` When the user makes a request to `https://api.myapi.com/weather/*`, the request is forwarded to Weather API. **For currency API:** * Custom domain name: `api.myapi.com` * Path prefix: `/currency/` When the user makes a call to `https://api.myapi.com/currency/*`, the request is proxied to Currency API. The path prefix is stripped from the request URL before Nadles proxies the request to your API backend. **Example** If Weather API from the previous example has a base URL `https://weather.execute-api.eu-central.amazonaws.com/` then the request `GET https://api.myapi.com/weather/current.json` is actually proxied to your API backend as `GET https://weather.execute-api.eu-central.amazonaws.com/current.json` Note that the `/weather` part was removed from the request URL. ## SSL certificate Once the domain ownership verification succeeds, Nadles automatically issues a SSL certificate for the domain name. Nadles takes care of renewing the certificate when it approaches the expiration date. When you connect your custom domain, it takes over as the primary URL for your API. This means your customers will see your own domain across all touchpoints, such as the checkout page and the self-service portal, replacing the standard Nadles URLs. # Additional information Source: https://docs.nadles.com/api-management/nadles-api-gateway ## Service headers Nadles adds the following headers to each authenticated request proxied to your API: * `X-Billing-Subscription-Id` — unique subscription ID. * `X-Billing-Customer-Id` — unique customer ID, this field can have the same value for different subscriptions. * `X-Billing-Request-Id` — unique request ID. You can use these headers for tracing and monitoring purposes. ## Cross-Origin Resource Sharing (CORS) Setting correct CORS headers needs to be done in the API itself. By default, Nadles passes all unauthenticated OPTIONS requests to your API backend. Make sure to return correct headers in response to those requests. ## User IP The actual user IP is the first IP address in the `X-Forwarded-For` header. E.g. if the header looks like ``` X-Forwarded-For: 77.123.24.12,8.8.9.9,31.31.31.31 ``` then `77.123.24.12` is the actual IP of the user making the API call. ## Stored information Nadles stores the following information about each request and response: * Request and response headers * Request URL * Subscription-related IDs * Usage data for quotas * Timings * Response status code It does not store or log request or response bodies. # Securing your backend Source: https://docs.nadles.com/api-management/securing-your-backend Make sure your API accepts requests originating from Nadles. ## Overview Requests from any cloud API gateway to your API are passed through the untrusted internet. It means, you have to expose your API on a public IP address but accept requests only from trusted origins. In order to use Nadles, your API needs to make sure that it only accepts requests coming from Nadles API Gateway. ## Authenticate Nadles API Gateway by API key You can configure Nadles API Gateway to send an API key to your API with each request. If you're already using another API gateway, please refer to its documentation on how to set up API key authentication. After you've set up your API gateway and issued a new API key for Nadles, continue to the next section to find out how to configure Nadles to send the API key with each request. ### Configuring Nadles API Gateway To make Nadles send the API key to your API in a header, you can use the request/response [transformation](/api-management/transformations/) feature. It allows you to add/replace/delete HTTP headers for each proxied request. To make Nadles send the API key with each request: * Navigate to **APIs → choose an API → Transformations**. * Click **Add new request transformation**. * Choose **Target:** `Header`, **Action:** `Replace`. This will add a header with the given name and value, or replace it with the specified value, if the request already has a header with this name. * Enter the name of the header in which Nadles API Gateway should send the API key. In the Nginx example above it's `X-Api-Key`. * Enter the API key in the `Value` field. Please check the screenshot below for an example. * Click **Submit**. That's it: Nadles will now add header `X-Api-Key: ` to each request. ### Nginx If you're using Nginx as a web server, the easiest way to authenticate Nadles by API keys is to use a `map` statement together with an `if` condition as shown below. ``` map $http_x_api_key $is_valid_key { default 0; "key1" 1; } server { location / { if ($is_valid_key = 0) { return 401; # Unauthorized } proxy_pass http://your_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } ``` With this config, Nginx will reject all requests with the `X-Api-Key` header absent or having a different value than `key1`. Replace the `key1` with the API key you generated for Nadles API Gateway and reload Nginx. # API settings Source: https://docs.nadles.com/api-management/settings You can always change the configuration of your API on the Settings page. ## General settings **Name** The name of your API. This name your customers will see on the checkout page. **Base URL** The base URL for all API endpoints. The full URL to which Nadles API Gateway will proxy users' requests, is formed as `Base URL + Endpoint URL`. If your API has the following endpoints: `https://api.mydomain.com/weather-forecast/` `https://api.mydomain.com/current-weather/` then `https://api.mydomain.com/` is the base URL. Do not add path parameters or query string to the base URL of your API. That can be done using "Transformations". **Short description** Shown to your customers on the checkout page if no full description is provided. **Full description** Shown to your customers on the checkout page. **Link to your Terms of Service** Link to your website page with the Terms of Service for your API. Shown to your customers on the checkout page. **Link to your API documentation** Link to your website page with the API documentation. Shown to your customers on the checkout page. ## Nadles Gateway settings ### API subdomain By default, your API is accessible on Nadles domain and the access URL looks like `https://.p.nadles.com/` Later, you can configure Nadles API Gateway to use a custom domain for your API, e.g. `https://api.mydomain.com` [Learn more](api-management/custom-domains) * Click "Submit". * After the API is added, you are redirected to the dashboard. * On the dashboard there is now the Nadles API URL that should be used by your customers to make requests to the API. ### Authentication instructions for API users This is a textual description of how your API users should authenticate when making API calls. The text will be shown to your customers on the checkout and subscription pages. By default, Nadles Gateway expects the access token to be sent in the `Api-Key` header. This behavior can be changed: you can flexibly configure Nadles Gateway to look for the access token in any other header (including the standard `Authorization: Bearer` scheme) or in an arbitrary field in JSON request body. If you decide to configure user authentication differently, make sure to update the **Authentication instructions for API users** field. See the [Authentication](api-management/authentication) chapter of this documentation to learn more. ## Custom domain name Nadles allows attaching custom domain names to your API, so that instead of the default `https://.p.nadles.com/` URL, customers use your own domain name to make API calls. Read more about that in the [Custom domain name](https://docs.nadles.com/api-management/custom-domains/) section of this documentation. # Request and response transformations Source: https://docs.nadles.com/api-management/transformations API-scoped modifications of requests and responses. ## Overview Transformations allow you to dynamically modify requests and responses. That includes headers, query string parameters and body. This section describes API-scoped transformations. Transformations defined on an API level are applied to requests/responses to that API, regardless of the product the customer is subscribed to. Transformations defined on an API level are always applied first. Read about [product-scoped transformations](/products/transformations). One of the use-cases for transformations is to authenticate Nadles API Gateway in your API backend by API key. Learn how to [configure Nadles to send an API key to your backend](/api-management/securing-your-backend). ## How it works ```mermaid theme={null} graph TD input[\"GET /endpoint1"/] apply_api_req_tfs[Apply API-level request transformations] apply_product_req_tfs[Apply product-level request transformations] proxy_and_wait(("Proxy modified request and wait for response")) apply_api_resp_tfs[Apply API-level response transformations] apply_product_resp_tfs[Apply product-level response transformations] send_response[\\Send modified response to the user/] input --> apply_api_req_tfs apply_api_req_tfs --> apply_product_req_tfs apply_product_req_tfs --> proxy_and_wait proxy_and_wait --> apply_api_resp_tfs apply_api_resp_tfs --> apply_product_resp_tfs apply_product_resp_tfs --> send_response ``` To configure transformations, navigate to **APIs → select API → Transformations**. ## Headers The transformation will add/replace/remove headers in a request or response. Header names are **case-insensitive**. ### Add Adds a new header, even if there is already one with the same name. **Example** Original request: ``` GET / HTTP/1.1 X-Some-Header: some-value ``` Transformation: ``` Add header "X-Some-Header" with value "another-value". ``` Transformed request: ``` GET / HTTP/1.1 X-Some-Header: some-value X-Some-Header: another-value ``` ### Replace Replaces header(s) with a new value. If there are several headers with the given name, they're removed and replaced with the new value. **Example** Original request: ``` GET / HTTP/1.1 X-Some-Header: first-value X-Some-Header: second-value ``` Transformation: ``` Replace header "X-Some-Header" with value "third-value". ``` Transformed request: ``` GET / HTTP/1.1 X-Some-Header: third-value ``` ### Remove Removes all headers with the given name. **Example** Original request: ``` GET / HTTP/1.1 X-Some-Header: first-value X-Some-Header: second-value ``` Transformation: ``` Remove header "X-Some-Header". ``` Transformed request: ``` GET / HTTP/1.1 ``` ## Query string parameters The transformation will add/replace/remove query string parameters in a request. Query string parameter names are **case-sensitive**. ### Add Adds a new query string parameter, even if there is already one or more with the same name. **Example** Original request: ``` GET /?param1=100 HTTP/1.1 ``` Transformation: ``` Add query string parameter "param2" with value "test-value". ``` Transformed request: ``` GET /?param1=100¶m2=test-value HTTP/1.1 ``` ### Replace Replaces query string parameter(s) with a new value. If there are several query string parameters with the given name, they're removed and replaced with the new value. **Example** Original request: ``` GET /?param1=100 HTTP/1.1 ``` Transformation: ``` Replace query string parameter "param1" with value 200. ``` Transformed request: ``` GET /?param1=200 HTTP/1.1 ``` ### Remove Removes all query string parameters with the given name. **Example** Original request: ``` GET /?param1=100 HTTP/1.1 ``` Transformation: ``` Remove query string parameter "param1". ``` Transformed request: ``` GET / HTTP/1.1 ``` ## Body The transformation will add/replace/remove request/response body. ### Add Adds a new body. If a request or response already has a body, it's left unchanged. **Example** Original request: ``` POST / HTTP/1.1 ``` Transformation: ``` Add body with value {"testkey": "testvalue"} ``` Transformed request: ``` POST / HTTP/1.1 {"testkey": "testvalue"} ``` ### Replace Replaces the body with a new value. If there is no body yet, it's added. **Example** Original request: ``` POST / HTTP/1.1 {"originalkey": "originalvalue"} ``` Transformation: ``` Replace body with value {"newkey": "newvalue"} ``` Transformed request: ``` POST / HTTP/1.1 {"newkey": "newvalue"} ``` ### Remove Removes the body. **Example** Original request: ``` POST / HTTP/1.1 {"key": "value"} ``` Transformation: ``` Remove body. ``` Transformed request: ``` POST / HTTP/1.1 ``` ## Expressions ### JavaScript You can use JavaScript expressions in your transformations to make them even more dynamic. Expressions must evaluate to a new string value for the header/query string parameter/body. #### Examples **Example — News API** Say, you provide an API endpoint that returns contents of a news article. E.g., ```json theme={null} { "id": "b6355c53-44a3-464b-bc9e-759749cdb3ec", "title": "The title", "content": "Some long article body" } ``` For your "Free" product, you'd like to return only the first 120 characters of article body. With the following transformation added to the "Free" product, you configure Nadles API Gateway to do that: Note that the expression evaluation result is used as the **new value** for the response body. #### Expression variables There are several variables you can use in your expressions. ##### Path parameters `path.params.*` — placeholder values specified in the endpoint URL. **Example** If an endpoint URL is `/resource/{resourceId}` and the HTTP request URL is `/resource/801d49c2-ca05-42b1-97af-baf0ddf36ba3`, then there will be a variable `path.params.resourceId` with value `"801d49c2-ca05-42b1-97af-baf0ddf36ba3"`. ```js theme={null} path.params.resourceId // "801d49c2-ca05-42b1-97af-baf0ddf36ba3" ``` Path parameter names are **case-sensitive**. *** ##### Client IP address `request.remote_addr` — Client IP address. *** ##### Request headers `request.headers['header-name']` — Request header values. **Example** ```javascript theme={null} request.headers['content-type'] == 'application/json' ``` Header names must be in lower case. *** ##### Request query string parameters `request.query['query_string_parameter_name']` — Request query string parameters. **Example** ```javascript theme={null} request.query['page'] > 100 ``` Query string parameter names are **case-sensitive**. *** ##### Request body `request.body` — Request body. **Example** ```javascript theme={null} request.body.length > 1000 ``` *** Response variables are only available in **response** transformations. ##### Response status code `response.statusCode` — HTTP status code of the response from the upstream. **Example** ```javascript theme={null} response.statusCode == 200 ``` *** ##### Response headers `response.headers['header-name']` — Response header values. **Example** ```javascript theme={null} response.headers['content-type'] == 'application/json' ``` Header names must be in lower case. *** ##### Response body `response.body` — Raw response body. **Example** ```javascript theme={null} response.body.length > 0 ``` ### jq You can also use [jq](https://jqlang.github.io/jq/manual/) expressions for transformations. > jq is like sed for JSON data - you can use it to slice and filter and map and transform JSON with the same ease that sed, awk, grep and friends let you play with text. Unlike JavaScript expressions, the result of jq transformation does not necessarily have to be a string. If the expression result is not a string, it's encoded as JSON. #### Examples **Example — News API** Say, you provide an API endpoint that returns contents of a news article. E.g., ```json theme={null} { "id": "b6355c53-44a3-464b-bc9e-759749cdb3ec", "title": "The title", "content": "Some long article body" } ``` For your "Free" product, you'd like to return only the first 120 characters of article body. The following jq expression will do the job: Note that the expression evaluation result is used as the **new value** for the response body. #### Expression input The followind is passed as input (`.`) to your jq expressions: ```json theme={null} { "path": { "params": { // path parameters, e.g. /endpoint/{path_param_1} "path_param_1": "path_param_value_1", "path_param_2": "path_param_value_2" } }, "request": { "remote_addr": "127.0.0.1", // client IP address "headers": { // request headers "request_header_name_1": "header_value_1", "request_header_name_2": ["header_values_2", "header_values_2"] }, "query": { // query string parameters "query_string_param_1": "query_string_param_value_1" }, "body": "request body content" }, } ``` ```json theme={null} { "path": { "params": { // path parameters, e.g. /endpoint/{path_param_1} "path_param_1": "path_param_value_1", "path_param_2": "path_param_value_2" } }, "request": { "remote_addr": "127.0.0.1", // client IP address "headers": { // request headers "request_header_name_1": "header_value_1", "request_header_name_2": ["header_values_2", "header_values_2"] }, "query": { // query string parameters "query_string_param_1": "query_string_param_value_1" }, "body": "request body content" }, "request_transformed": { // request object, after request transformations are applied // ... }, "response": { "statusCode": 200, "headers": { "response_header_name_1": "header_value_1", "response_header_name_2": ["header_values_2", "header_values_2"] }, "body": "response body content" } } ``` # User authentication Source: https://docs.nadles.com/api-management/user-authentication Configure how Nadles authenticates your API consumers. Nadles API Gateway authenticates users by API keys/tokens sent along with each request. When the user activates a new subscription, Nadles issues a unique API key and the user can obtain it on the subscription page in the self-service portal. For the gateway to know where to find the API key in the HTTP request, a token extraction strategy needs to be configured. The strategy consists of one or more steps. In order to configure token extraction strategy, navigate to **My APIs → choose API → Settings → User authentication tab**. If you make changes to the user authentication settings, make sure to update the [authentication instructions](/api-management/settings#authentication-instructions-for-api-users) displayed to your customers in the self-service portal and on the checkout page. ## Default strategy By default, the gateway looks for the API key in the `Api-Key` request header. The header name is chosen to avoid interference with "Authorization" header in cases when the API uses it for internal authentication. ## API key in an arbitrary header If you'd like to use a custom header for the access token (e.g. `X-My-Api-Token: `), configure the token extraction strategy as follows: * Click **Delete step** in order to clear the step list. Click **Get request header value**. * Enter `X-My-Api-Token` as header name. * Click **Save**. Now API users can send the token in `X-My-Api-Token: ` header. ## API key in "Authorization: Bearer" header If you'd like to use `Authorization: Bearer ` scheme, configure the token extraction strategy as follows: * Click **Delete step** in order to clear the step list. * Click **Get request header value**. * Enter `Authorization` as header name. * Click **Split it by delimiter**. * Enter "` `" (space) as delimiter. * Click **Take value by path or apply expression**. * Enter `input[1]` as expression. In the expression you can use the result of the previous step, it's stored in a variable named `input`. * Click **Save**. Now the gateway will look for the token in `Authorization: Bearer ` header. ## API key in JSON body Let's say the request body is a JSON object containing access token: ```json theme={null} { "auth": { "token": "" }, "payload": { // ... actual request payload }, } ``` Nadles API Gateway needs to parse the request body as JSON and take the API key from that JSON object by the specified path. In order to implement that, configure the token extraction strategy as follows: * Click **Delete step** in order to clear the step list. * Click **Get request body**. * Click **Decode it as...**. * Choose `JSON` from the dropdown list. * Click **Take value by path or apply expression**. * Enter `input.auth.token` as expression. * Click **Save**. The gateway will decode the request body as JSON and extract the token value by the specified path. ## API key in query string In some scenarios it's more convenient to pass API keys in a query string parameter. For example, you would like to pass API keys in `apiKey` query string parameters like `/orders/154?apiKey=MmU2YzQ4ODktNzFjMi00OWM1LTlhNTgtZDJhZjZmN2M1ODY1` * Click **Delete step** in order to clear the step list. * Click **Get raw query string**. * Choose `Query string` from the dropdown list. * Click **Take value by path or apply expression**. * Enter `input.apiKey` as expression. In the expression you can use the result of the previous step, it's stored in a variable named `input`. Now the API Gateway will look for API keys in `apiKey` query string parameter. # Create usage events for a subscription Source: https://docs.nadles.com/api/provider/create-usage-events-for-a-subscription /openapi/provider.api.yaml post /subscriptions/{subscriptionId}/usage-events/ # Get customer by ID Source: https://docs.nadles.com/api/provider/get-customer-by-id /openapi/provider.api.yaml get /customers/{customerId} # List access tokens for subscription Source: https://docs.nadles.com/api/provider/list-access-tokens-for-subscription /openapi/provider.api.yaml get /customers/{customerId}/subscriptions/{subscriptionId}/access-tokens/ # List customer subscriptions Source: https://docs.nadles.com/api/provider/list-customer-subscriptions /openapi/provider.api.yaml get /customers/{customerId}/subscriptions/ # List customers Source: https://docs.nadles.com/api/provider/list-customers /openapi/provider.api.yaml get /customers/ # List subsciption billable metrics, quotas and current usage Source: https://docs.nadles.com/api/provider/list-subsciption-billable-metrics-quotas-and-current-usage /openapi/provider.api.yaml get /subscriptions/{subscriptionId}/product/billable-metrics/ # Components Source: https://docs.nadles.com/components ## Purpose-built API Gateway **Access control, API key management and usage control** The Nadles API Gateway sits at the cloud edge, proxying requests to your API backend while managing access, enforcing subscription limits, and automatically tracking usage per customer. With global edge locations, your users are always routed to the nearest Nadles instance—ensuring minimal latency, higher performance, and a seamless API experience. ## Billing engine **Automated billing and subscription management** The Nadles Billing Engine handles the full subscription lifecycle, turning usage data collected by our API gateway into precise, reliable invoices. Your customers are billed accurately based on what they actually use. Built on a flexible and extensible data model, the Nadles Billing Engine supports advanced pricing strategies that go beyond what typical payment providers offer. Even if your payment provider is missing certain features, Nadles fills the gaps to ensure your billing setup works exactly the way you need. Contact [support@nadles.com](mailto:support@nadles.com) to receive assistance in setting up your pricing model. ## Payment provider integration **Seamless payment processing with zero code** Nadles comes with built-in integrations for leading payment providers, so you can start accepting subscription payments from customers worldwide instantly, no coding required. Prefer to stay hands-off? Our Merchant of Record option handles VAT, sales tax, and GST compliance on your behalf. The Nadles Billing Engine ensures timely charges aligned with your configured pricing model, so you can focus on growing your API business. ## User portal **Customer onboarding, subscription management, and checkout in one place** Nadles offers a fully hosted user portal that lets your customers easily subscribe to your APIs, track usage, and manage their subscriptions — all from a single, intuitive interface. With Nadles Checkout Links, you can guide users through a streamlined onboarding process using optimized pages that highlight your API products and drive higher conversions. Tailor the user portal and checkout experience to reflect your brand, ensuring a smooth and professional journey for every customer. ## Admin panel **API and product management** This is your control panel, where you can manage every aspect of your API monetization: from setting pricing models and usage tiers to tracking revenue and usage analytics. Easily configure access policies, monitor performance, and optimize your API offerings to maximize growth and profitability. # Introduction Source: https://docs.nadles.com/introduction **Nadles is the complete platform for API monetization**, built for developers who want usage-based billing, clean customer experiences, and full control without building everything from scratch. Quick links: [API management](/api-management/add-api) · [User portal](/user-portal/getting-started) · [Products](/products/overview) · [Prices](/pricing/overview) · [Payments](/payment-integration/stripe) · [Analytics](/analytics/query-syntax) · [Nadles Provider API](/api/provider/list-customer-subscriptions) Whether you're launching your first public API or scaling a global product, Nadles gives you the tools to handle: 🔐 Access control – Enforce API key authentication and usage limits at the edge. 💳 Billing and metering – Real-time, usage-based pricing with one-time charges, retries, and flexible plans. 🧾 Subscriptions – Hosted customer portal, branded checkout, and subscription management. 🌍 Global delivery – Low-latency, high-throughput API gateway infrastructure. All of it is designed to work out of the box, without locking you into rigid patterns. ## Why Nadles? * Launch faster – Skip the boilerplate and start monetizing in minutes. * Scale confidently – Handle billing, access, and usage at any size. * Focus on product – Let Nadles manage the infrastructure while you build what matters. ## How It Works 1. Set up pricing and usage limits in the control panel. 2. Connect your backend behind the Nadles API Gateway. 3. Share branded checkout links with customers. 4. Track usage, manage subscriptions, and get paid automatically. ## Try It Out Start with one endpoint. Launch a usage-based product. Expand as needed. With Nadles, you don’t need to reinvent billing — you just build. # F.A.Q. Source: https://docs.nadles.com/other/faq ## General ### What do I need to start selling my API with Nadles? In simple words, you only need to develop an API. Then Nadles does the rest. Add the API on Nadles, create a new product and choose the endpoints to be included, set up quotas and other limitations, define the pricing model and get a self-service checkout link for your customers. If you plan to take money for your services, you also need a Stripe or Paddle account. That's it. ### What is the difference between Nadles and other billing solutions (e.g. KillBill, Stripe, ChargeBee)? General-purpose billing solutions focus on the process of issuing a bill. They allow to define pricing models and issue invoices. Stripe and ChargeBee also perform payment processing. Nadles, on the other hand, aims to be a turnkey solution covering all aspects of selling API-based products, so that the only thing an API providers needs to do is to develop an API. Billing is one of these aspects. ### How does Nadles collect payments? Nadles has its own billing engine. You need to define a pricing model for each product and, after a customer subscribes to your product, Nadles tracks per-customer usage, calculates amounts due and issues invoices. Nadles collects payments for your services automatically. Nadles uses Stripe and Paddle for payment processing. Payments initiated by Nadles are made directly to your Stripe or Paddle account, so you're always in control of your funds. ### How can I save on Stripe fees with Nadles? Each transaction processed with Stripe is subject to several fees. The first one is the fee for processing the payment. It varies based on the payment method/country/etc. If additional services are used (invoicing, recurring payments, solution for marketplaces), each of them adds its own fee on the transaction. The more products you use, the bigger the fee. Payments initiated by Nadles use the most basic functionality of Stripe: payment processing and invoices. This ensures the minimum possible fee. ## Products ### Can I combine several APIs into one product? Can I sell API bundles? Yes, that is possible. Nadles Products are extremely flexible: your customers can subscribe to one API, several APIs or any combination of endpoints from any number of APIs. If there are some endpoints which you'd like to be accessible by users with premium subscription, you could, for instance, create two products, e.g. "Basic" and "Premium". The "Basic" product would exclude the premium endpoints, which will only be accessible in "Premium" product. ### Will the same API in different products have different access URLs? No, the URL is assigned to an API, not product. It means, your API is always accessible by the same URL, regardless of what products it's included in. ### Why is it recommended to charge customers based on product-relevant metrics instead of API call volume? **Short answer:** "Number of API calls per month" is too abstract and it's usually hard to tell which subscription plan will fit customer's application. Imagine yourself being a customer. You're developing a mobile weather app. You found an API with several endpoints, which perfectly fits your needs. It returns the current weather, hourly/daily/weekly forecasts, has a location search endpoint, provides access to historical data. Then you open its pricing page and see this: | | Basic | Advanced | Enterprise | | --------- | ---------------- | ---------------- | ---------------- | | API calls | 1000 / month | 10 000 / month | 100 000 / month | | Overages | \$0.05 each call | \$0.05 each call | \$0.05 each call | | Price | \$5 | \$50 | \$100 | Not too informative, right? By looking at the table, it's not easy to approximate, which plan would be the best fit for your application. Especially compared to something like this: | | Basic | Advanced | Enterprise | | ----------------------------- | ----------- | ------------ | ------------ | | Current weather requests | 100 / month | 1000 / month | 5000 / month | | Hourly/daily/weekly forecasts | 10 / week | 100 / week | 200 / week | | Historical data requests | 50 / month | 500 / month | 2000 / month | | Price | \$5 | \$50 | \$100 | With Nadles you can easily implement this pricing model. ## Nadles API Gateway ### I'm already using an API gateway. Is that a problem? It's not a problem. Moreover, we encourage you to use some high-performant API gateway to securely expose your API. That's a flexible setup which allows you to use all capabilities of general-purpose API gateways together with Nadles monetization features. ### Is Nadles an API gateway? A high-performance cloud API gateway is one of the components of Nadles, enabling high levels of automation. Thanks to it, Nadles can automatically authenticate customers, grant access when a subscription is activated, cut access when a hard quota limit is exceeded, impose rate limits, implement premium features, track per-customer usage and turn that data into invoices. Nadles API gateway also serves as a TLS termination proxy for the APIs. It uses SSL certificates from a trusted vendor, so your customers have a secure connection to your API, and it also allows using self-signed certificates on the API side, so you don't have to buy SSL certificates yourself. ### How performant is the engine? Very performant. Internal engine-added latency lies in the millisecond range. Nadles also uses some optimizations in order to minimize the network latency. ### Can I install it on my own server? Nadles is a cloud-based solution. Currently, there is no on-premise version available. However, Nadles team can set up a managed dedicated cluster for you, which will be completely separated from the public infrastructure. ### How can I add my internal API key to authenticate Nadles API Gateway in my API? Use request transformations to make Nadles API Gateway send the API key with each request. Read more on [how to securely expose your API](/api-management/securing-your-backend). ### How can I get the user IP? Check out [this chapter](/api-management/nadles-api-gateway#user-ip). # Paddle Source: https://docs.nadles.com/payment-integration/paddle ## Overview Paddle integration is another option offered by Nadles for payment collection. [Paddle](https://paddle.com/) is a payment solution provider serving as [Merchant of Record](https://www.paddle.com/blog/what-is-merchant-of-record). Using a merchant of record allows you to collect payments internationally without the need to care about different taxation rules between countries. Nadles adds missing usage-based billing functionality to Paddle: it records usage data for each subscription and creates corresponding charges in Paddle, so that customers are correctly billed for the actual usage at the end of each billing period. In contrast to API marketplaces, Nadles doesn't act as a middleman in the payment process. All payments are made directly to your Paddle account. ## Video guide