# Get all Cards

<mark style="color:green;">`POST`</mark> {{base\_url}}/business/getcards

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | SECRET\_KEY |

{% hint style="danger" %}
Your secret keys are to be kept secret and only stored on your servers. Do not pass your secret key to the front-end language where it can be exploited.
{% endhint %}

Take a look at how you might do this:

{% tabs %}
{% tab title="cURL" %}

```php
curl --location '{{base_url}}/business/getcards' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SECRET_KEY' \
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: '{{base_url}}/business/getcards'
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer SECRET_KEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '{{base_url}}/business/getcards',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer SECRET_KEY'
  ),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Dart" %}

```dart
var headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer SECRET_KEY'
};
var request = http.Request('POST', Uri.parse('{{base_url}}/business/getcards'));
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

{% endtab %}
{% endtabs %}

## Sample response

{% tabs %}
{% tab title="Successful" %}

```json
{
    "status": true,
    "message": "Card List Retrieved",
    "mycards": [
        {
            "currency": "USD",
            "cardid": "xfa2ae52b0b9-4b-a7fe3800e-3-9",
            "holdername": "JOHN DOE",
            "card_type": "Virtual",
            "exp": "04/28",
            "pan": "5088********2829",
            "cardicon": "https://oacloud.oneappgo.com/media_library/oneapp-personal/65b0dc7a31f253.37195213.png",
            "cardstatus": "active",
            "cardbrand": "VISA",
            "cardtype": "Virtual",
            "cardpan": "5088********2829",
            "expiryyr": "28",
            "expirymnt": "04",
            "customerid": "BLD2085440568",
            "created_at": "Fri, 14-03-2025 02:58 pm",
            "cvv": "890"
        },
        {
            "currency": "USD",
            "cardid": "0f7293bf9283a4-0-aeaeebx5b-0",
            "holdername": "JOHN DOE",
            "card_type": "Virtual",
            "exp": "04/28",
            "pan": "5088********2829",
            "cardicon": "https://oacloud.oneappgo.com/media_library/oneapp-personal/65b0db7ee31931.79462866.png",
            "cardstatus": "freezed",
            "cardbrand": "MASTERCARD",
            "cardtype": "Virtual",
            "cardpan": "5088********2829",
            "expiryyr": "28",
            "expirymnt": "04",
            "customerid": "BLD2085440568",
            "created_at": "Fri, 14-03-2025 02:58 pm",
            "cvv": "890"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
