code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.Token.create(
    card={
      "number": "4242424242424242",
      "exp_month": 8,
      "exp_year": 2023,
      "cvc": "314",
    },
  )
  '''Response {
    "id": "tok_1LSdru2eZvKYlo2C20SinvF6",
    "object": "token",
    "card": {
      "id": "card_1LSdru2eZvKYlo2CdGVYqYZs",
      "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": "pass",
      "dynamic_last4": null,
      "exp_month": 8,
      "exp_year": 2023,
      "fingerprint": "Xt5EWLLDS7FJjR1c",
      "funding": "credit",
      "last4": "4242",
      "metadata": {},
      "name": null,
      "redaction": null,
      "tokenization_method": null
    },
    "client_ip": null,
    "created": 1659518878,
    "livemode": false,
    "redaction": null,
    "type": "card",
    "used": false
  }'''
nl: Create a card tokenCreates a single-use token that represents a credit card’s details.
  This token can be used in place of a credit card dictionary with any API method.
  These tokens can be used only once:
  by creating a new Charge object,
  or by attaching them to a Customer object.
  In most cases, you should use our recommended
  payments integrations instead of using the API.Parameters card optional dictionary 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.Show child parametersMore parametersExpand all  customer optional Connect only ReturnsReturns the created card token if successful. Otherwise, this call raises an error