> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.littglobal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.littglobal.com/_mcp/server.

# Get Credit Cards

POST TBD/api/v2/users/credit-cards
Content-Type: application/json

This API endpoint retrieves all details relating to a user's stored credit cards. Information provided includes the credit card ID, token, last 4 digit numbers, holder name, expiry date, and card type.

### Request Body

The request does not require a body.

### Response

The response is an array of objects where each object represents a credit card. Each card includes the following information:

- `credit_card_id` (string): The unique ID of the credit card.
    
- `parent_user_id` (null): No data provided in this field.
    
- `external_id` (string): The card's id on the external platform.
    
- `order_id` (null): No data is provided in this field.
    
- `credit_card_token` (string): An empty string, no data provided.
    
- `bsb` (null): No data provided in this field.
    
- `account_number` (null): No data provided in this field.
    
- `last_4_digits` (string): The last four digits of the credit card.
    
- `holder_name` (string): The name of the credit card holder.
    
- `expiry_date` (null): No data is provided in this field.
    
- `label` (string): An empty string, no label provided.
    
- `type` (string): The type of credit card (Visa, MasterCard, etc.).
    
- `user_type` (string): The type of user.
    
- `is_default` (integer): A flag to indicate whether the card is the default card, 0 not default, 1 is default.
    
- `created_at` (string): The timestamp when this record was created.
    
- `updated_at` (string): The timestamp when this record was last updated.
    
- `ppan` (string): An empty string, no data provided.
    
- `contact_info` (null): No data provided in this field.
    
- `payment_gateway` (object): Contains information about the payment gateway including payment_gateway_id, name, and status.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/digital-wallet/get-credit-cards

## Request

### Query parameters

- `api_token` (string, optional)

### Body (application/json)

This endpoint expects an object.

- `api` (string, optional)
- `data` (ApiV2UsersCreditCardsPostRequestBodyContentApplicationJsonSchemaData, optional)

## Response

### 200

Get Credit Cards

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (list of ApiV2UsersCreditCardsPostResponsesContentApplicationJsonSchemaDataItems, optional)

## Types

### ApiV2UsersCreditCardsPostRequestBodyContentApplicationJsonSchemaData

### ApiV2UsersCreditCardsPostResponsesContentApplicationJsonSchemaDataItems

- `credit_card_id` (string, optional)
- `parent_user_id` (any, optional, nullable)
- `external_id` (string, optional)
- `order_id` (any, optional, nullable)
- `credit_card_token` (string, optional)
- `bsb` (any, optional, nullable)
- `account_number` (any, optional, nullable)
- `last_4_digits` (string, optional)
- `holder_name` (string, optional)
- `expiry_date` (any, optional, nullable)
- `label` (string, optional)
- `type` (string, optional)
- `user_type` (string, optional)
- `is_default` (integer, optional)
- `created_at` (string, optional)
- `updated_at` (string, optional)
- `ppan` (string, optional)
- `contact_info` (any, optional, nullable)
- `payment_gateway` (ApiV2UsersCreditCardsPostResponsesContentApplicationJsonSchemaDataItemsPaymentGateway, optional)

### ApiV2UsersCreditCardsPostResponsesContentApplicationJsonSchemaDataItemsPaymentGateway

- `payment_gateway_id` (string, optional)
- `name` (string, optional)
- `supports_teen_card` (any, optional, nullable)
- `kyc_support_email` (any, optional, nullable)
- `pin_ivr` (any, optional, nullable)
- `customer_service_number` (any, optional, nullable)
- `status` (string, optional)
- `created_at` (any, optional, nullable)
- `updated_at` (any, optional, nullable)

## Examples

**Request**

```json
{
  "api": "credit-cards"
}
```

**Response**

```json
{
  "message": "Successfully retrieved credit cards",
  "api": "credit-cards",
  "status": "success",
  "data": [
    {
      "credit_card_id": "5c36a329-2646-4826-b9be-d4892da1622c",
      "parent_user_id": null,
      "external_id": "card_1OmQeJC8A4ClNu7aXGzhMPgr",
      "order_id": null,
      "credit_card_token": "",
      "bsb": null,
      "account_number": null,
      "last_4_digits": "4242",
      "holder_name": "John Smith",
      "expiry_date": null,
      "label": "",
      "type": "Visa",
      "user_type": "User",
      "is_default": 0,
      "created_at": "2024-02-22 01:00:33",
      "updated_at": "2024-02-22 01:00:33",
      "ppan": "",
      "contact_info": null,
      "payment_gateway": {
        "payment_gateway_id": "5d0b56883093a",
        "name": "stripe",
        "supports_teen_card": null,
        "kyc_support_email": null,
        "pin_ivr": null,
        "customer_service_number": null,
        "status": "active",
        "created_at": null,
        "updated_at": null
      }
    }
  ]
}
```

**SDK Code**

```python Digital Wallet_getCreditCards_example
import requests

url = "https://tbd/api/v2/users/credit-cards"

querystring = {"api_token":"{{token}}"}

payload = { "api": "credit-cards" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Digital Wallet_getCreditCards_example
const url = 'https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"credit-cards"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Digital Wallet_getCreditCards_example
package main

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

func main() {

	url := "https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D"

	payload := strings.NewReader("{\n  \"api\": \"credit-cards\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Digital Wallet_getCreditCards_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"api\": \"credit-cards\"\n}"

response = http.request(request)
puts response.read_body
```

```java Digital Wallet_getCreditCards_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"credit-cards\"\n}")
  .asString();
```

```php Digital Wallet_getCreditCards_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D', [
  'body' => '{
  "api": "credit-cards"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Digital Wallet_getCreditCards_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api\": \"credit-cards\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digital Wallet_getCreditCards_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["api": "credit-cards"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/users/credit-cards?api_token=%7B%7Btoken%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```