> 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.

# Tokenise Credit Card

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

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

## Request

### Query parameters

- `api_token` (string, optional)

### Body (application/json)

This endpoint expects an object.

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

## Types

### ApiV2UsersCreditCardTokenisePostRequestBodyContentApplicationJsonSchemaData

- `card` (ApiV2UsersCreditCardTokenisePostRequestBodyContentApplicationJsonSchemaDataCard, optional)

### ApiV2UsersCreditCardTokenisePostRequestBodyContentApplicationJsonSchemaDataCard

- `name` (string, optional)
- `number` (string, optional)
- `exp_month` (string, optional)
- `exp_year` (string, optional)
- `cvc` (string, optional)

## Examples

**Request**

```json
{
  "api": "new-credit-card",
  "data": {
    "card": {
      "name": "Robo Cop",
      "number": "5327803310355401",
      "exp_month": "01",
      "exp_year": "2030",
      "cvc": "339"
    }
  }
}
```

**SDK Code**

```python Digital Wallet_tokeniseCreditCard_example
import requests

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

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

payload = {
    "api": "new-credit-card",
    "data": { "card": {
            "name": "Robo Cop",
            "number": "5327803310355401",
            "exp_month": "01",
            "exp_year": "2030",
            "cvc": "339"
        } }
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Digital Wallet_tokeniseCreditCard_example
const url = 'https://tbd/api/v2/users/credit-card/tokenise?api_token=%7B%7Btoken%7D%7D';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"new-credit-card","data":{"card":{"name":"Robo Cop","number":"5327803310355401","exp_month":"01","exp_year":"2030","cvc":"339"}}}'
};

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

```go Digital Wallet_tokeniseCreditCard_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"api\": \"new-credit-card\",\n  \"data\": {\n    \"card\": {\n      \"name\": \"Robo Cop\",\n      \"number\": \"5327803310355401\",\n      \"exp_month\": \"01\",\n      \"exp_year\": \"2030\",\n      \"cvc\": \"339\"\n    }\n  }\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_tokeniseCreditCard_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/users/credit-card/tokenise?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\": \"new-credit-card\",\n  \"data\": {\n    \"card\": {\n      \"name\": \"Robo Cop\",\n      \"number\": \"5327803310355401\",\n      \"exp_month\": \"01\",\n      \"exp_year\": \"2030\",\n      \"cvc\": \"339\"\n    }\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/users/credit-card/tokenise?api_token=%7B%7Btoken%7D%7D")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"new-credit-card\",\n  \"data\": {\n    \"card\": {\n      \"name\": \"Robo Cop\",\n      \"number\": \"5327803310355401\",\n      \"exp_month\": \"01\",\n      \"exp_year\": \"2030\",\n      \"cvc\": \"339\"\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/users/credit-card/tokenise?api_token=%7B%7Btoken%7D%7D', [
  'body' => '{
  "api": "new-credit-card",
  "data": {
    "card": {
      "name": "Robo Cop",
      "number": "5327803310355401",
      "exp_month": "01",
      "exp_year": "2030",
      "cvc": "339"
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Digital Wallet_tokeniseCreditCard_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/credit-card/tokenise?api_token=%7B%7Btoken%7D%7D");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api\": \"new-credit-card\",\n  \"data\": {\n    \"card\": {\n      \"name\": \"Robo Cop\",\n      \"number\": \"5327803310355401\",\n      \"exp_month\": \"01\",\n      \"exp_year\": \"2030\",\n      \"cvc\": \"339\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digital Wallet_tokeniseCreditCard_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "api": "new-credit-card",
  "data": ["card": [
      "name": "Robo Cop",
      "number": "5327803310355401",
      "exp_month": "01",
      "exp_year": "2030",
      "cvc": "339"
    ]]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/users/credit-card/tokenise?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()
```