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

# Get all cards

> This endpoint retrieves the card details associated with a specific customer ID. The customerId is passed as a path parameter in the URL.

### Headers

**X-API-Version** `string` *required* (default: 1.2)

The API version to use. Supported versions are `1.1` and `1.2`.

### Path Parameters

**customer\_id** `string` *required*

The unique identifier of the customer.

### Query Parameters

**limit** `number`

A limit on the number of cards to be returned. Default is 10. Max is 100.

**starting\_after** `string`

A cursor for pagination: an object ID defining your place in the list.

### Response Body

The response is in JSON format and contains:

| Field | Type | Description |
| - | - | - |
| `message` | string | A string containing information about the request. |
| `current_page` | number | The current page number. |
| `total_pages` | number | The total number of pages. |
| `total_items` | number | The total number of cards. |
| `page_size` | number | The number of cards returned per page. |
| `cards` | array | An array of card objects associated with the customer. |
| ↳`card_id` | string | Unique identifier for the card. |
| ↳`status` | string | Consent status (e.g. 'VERIFIED'). |
| ↳`is_default` | boolean | Indicates if this is the default payment card. |
| ↳`card` | object | Card details container. |
| ↳`expiry_month` | string | Card expiry month (e.g. '04'). |
| ↳`expiry_year` | string | Card expiry year (e.g. '2044'). |
| ↳`last4` | string | Last 4 digits of the card (e.g. '1003'). |
| ↳`brand` | string | Card brand (e.g. 'visa'). |
| ↳`card_type` | string | Card type (e.g. 'CREDIT'). |
| ↳`fingerprint` | string | Unique card signature fingerprint. |
| ↳`issuer_name` | string | Name of the card issuer. |
| ↳`is_commercial` | boolean | Indicates if the card is commercial. |
| ↳`number_type` | string | Card number type (e.g. 'PAN'). |
| ↳`isDefault` | boolean | Indicates if the card is default. |

### Response Codes

| Code | Description |
| - | - |
| 200 | If the request is successful, the card details associated with the customer are returned. |
| 401 | Unauthorized. Missing or invalid credentials. |
| 404 | Not Found. Customer ID not found. |
| 500 | Internal Server Error. |

```bash cURL theme={null}
curl -X GET https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json"
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q", {
  method: "GET",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
});

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

```python Python theme={null}
import requests

response = requests.get(
    "https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "X-API-Version": "1.2",
        "Content-Type": "application/json",
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q")
request = Net::HTTP::Get.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"

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

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

public class Example {
    public static void main(String[] args) throws Exception {
        String credentials = Base64.getEncoder()
            .encodeToString("YOUR_UUID:YOUR_SECRET".getBytes());

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q"))
            .header("Authorization", "Basic " + credentials)
            .header("X-API-Version", "1.2")
            .header("Content-Type", "application/json")
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

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

func main() {
	req, err := http.NewRequest("GET", "https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q", nil)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("X-API-Version", "1.2")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```

```csharp .NET theme={null}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Get, "https://qa-payments.mygigsters.com.au/api/v1/customer/cards/cus_hkdmn5lcqh5enc37sp6?limit=1&starting_after=cst_hkdm54ctjhaatgv0i7q");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("X-API-Version", "1.2");

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

```json Response theme={null}
{
  "message": "Card details found",
  "current_page": 1,
  "total_pages": 1,
  "total_items": 2,
  "page_size": 10,
  "cards": [
    {
      "card_id": "cst_hkdmgcfzjhhmn3g97t3",
      "status": "VERIFIED",
      "card": {
        "expiry_month": "12",
        "expiry_year": "2028",
        "name": "",
        "bin": "40355010",
        "last4": "0008",
        "brand": "visa",
        "issuer_country_code": "US",
        "card_type": "DEBIT",
        "fingerprint": "ex6pgQ3YR8Gyn7Jae3K8WNinlhQ=",
        "issuer_name": "SOCIETE GENERALE S.A.",
        "is_commercial": false,
        "number_type": "PAN"
      },
      "is_default": true
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.