# Create a card token

Creates a single-use token that represents a credit card’s details. You can use this token in place of a credit card dictionary with any v1 API method. You can only use these tokens once by [creating a new Charge object](https://docs.stripe.com/api/tokens/create_card.md#create_charge) or by attaching them to a [Customer object](https://docs.stripe.com/api/tokens/create_card.md#create_customer).

To use this functionality, you need to [enable access to the raw card data APIs](https://support.stripe.com/questions/enabling-access-to-raw-card-data-apis). In most cases, you can use our recommended [payments integrations](https://docs.stripe.com/payments.md) instead of using the API.

## Request

```curl
curl https://api.stripe.com/v1/tokens \
  -u "<<YOUR_SECRET_KEY>>" \
  -d "card[number]=4242424242424242" \
  -d "card[exp_month]=5" \
  -d "card[exp_year]=2026" \
  -d "card[cvc]=314"
```

### Response

```json
{
  "id": "tok_1N3T00LkdIwHu7ixt44h1F8k",
  "object": "token",
  "card": {
    "id": "card_1N3T00LkdIwHu7ixRdxpVI1Q",
    "object": "card",
    "address_city": null,
    "address_country": null,
    "address_line1": null,
    "address_line1_check": null,
    "address_line2": null,
    "address_state": null,
    "address_zip": null,
    "address_zip_check": null,
    "brand": "Visa",
    "country": "US",
    "cvc_check": "unchecked",
    "dynamic_last4": null,
    "exp_month": 5,
    "exp_year": 2026,
    "fingerprint": "mToisGZ01V71BCos",
    "funding": "credit",
    "last4": "4242",
    "metadata": {},
    "name": null,
    "tokenization_method": null,
    "wallet": null
  },
  "client_ip": "52.35.78.6",
  "created": 1683071568,
  "livemode": false,
  "type": "card",
  "used": false
}
```

## Returns

Returns the created card token if it’s successful. Otherwise, this call raises [an error](https://docs.stripe.com/api/tokens/create_card.md#errors).

## Parameters

- [`card`](https://docs.stripe.com/api/tokens/create_card.md?query=card) (object | string, optional)
  The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user’s credit card details, with the options described below.
