# GET /products — List All Product

> Product: **Pabbly Subscription Billing** (v1)
> Base URL: `https://payments.pabbly.com/api/v1`
> Auth: Basic via `Authorization` header
> Canonical: `/subscription-billing/product/list-all-product`

This API is used to retrieve a list of all the available products.

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| limit | string | No | Integer, default=10, min=1, max=100 The number of resources to be returned. |
| page | string | No | By default first page will be listed. For navigating through pages, use the page parameter. |

**Response (200)** — List All Product:

```json
{
    "status": "success",
    "message": "Product data",
    "data": [
        {
            "createdAt": "2020-03-03T06:24:39.250Z",
            "updatedAt": "2020-03-03T06:24:39.250Z",
            "id": "5e5df827815f5442a4208cd7",
            "product_name": "My Product",
            "description": "Product Description",
            "notification_email": null,
            "redirect_url": "https://www.exampledomain.com"
        },
        {
            "createdAt": "2020-02-19T08:10:36.009Z",
            "updatedAt": "2020-02-19T08:10:36.009Z",
            "id": "5e4ced7c548afb4ab1c76497",
            "product_name": "Product 3",
            "description": "Product Desc 3",
            "notification_email": null,
            "redirect_url": null
        },
        {
            "createdAt": "2020-02-18T07:25:26.860Z",
            "updatedAt": "2020-02-18T07:25:26.860Z",
            "id": "5e4b9166f492d74aabef7b52",
            "product_name": "Shopify Integration",
            "description": "product description",
            "notification_email": null,
            "redirect_url": ""
        },
        {
            "createdAt": "2020-02-07T07:37:34.495Z",
            "updatedAt": "2020-02-07T07:37:34.495Z",
            "id": "5e3d13bedb854627602966bf",
            "product_name": "Product 2",
            "description": null,
            "notification_email": null,
            "redirect_url": null
        },
        {
            "createdAt": "2020-02-05T10:12:36.805Z",
            "updatedAt": "2020-02-05T10:12:36.805Z",
            "id": "5e3a95143c92e44b424b6d47",
            "product_name": "Product 1",
            "description": null,
            "notification_email": null,
            "redirect_url": "#"
        }
    ]
}
```

**Code examples:**

_cURL_

```curl
curl https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}} \
  -u {{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}')
request = Net::HTTP::Get.new(uri)
request.basic_auth '{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(request)
end

data = JSON.parse(response.body)
```

_Python_

```python
import requests
from requests.auth import HTTPBasicAuth

response = requests.get(
    'https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}',
    auth=HTTPBasicAuth('{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'),
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, '{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}');

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

String credentials = Base64.getEncoder().encodeToString("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}".getBytes());

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}"))
    .header("Authorization", "Basic " + credentials)
    .GET();

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const credentials = Buffer.from('{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}').toString('base64');

const response = await fetch('https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}', {
  method: 'GET',
  headers: {
    'Authorization': `Basic ${credentials}`,
  },
});

const data = await response.json();
```

_Go_

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}", nil)
    req.SetBasicAuth("{{YOUR_API_KEY}}", "{{YOUR_SECRET_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}"));

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://payments.pabbly.com/api/v1/products?limit={{limit}}&page={{page}}");
request.Headers.TryAddWithoutValidation("Authorization", $"Basic {credentials}");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Product:**

- [POST /product/create — Create Product](/subscription-billing/product/create-product)
- [GET /product/{{product_id}} — Get Single Product By Product ID](/subscription-billing/product/get-single-product-by-product-id)
- [PUT /product/update/{{product_id}} — Update Product](/subscription-billing/product/update-product)
- [DELETE /products/{{product_id}} — Delete Product](/subscription-billing/product/delete-product)

