code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.PaymentMethod.attach(
    "pm_1LSdci2eZvKYlo2CH68OnHFJ",
    customer="cus_8TEMHVY5moxIPI",
  )
  '''Response {
    "id": "pm_1LSYy32eZvKYlo2CoClVP3wb",
    "object": "payment_method",
    "billing_details": {
      "address": {
        "city": null,
        "country": null,
        "line1": null,
        "line2": null,
        "postal_code": null,
        "state": null
      },
      "email": null,
      "name": null,
      "phone": null
    },
    "card": {
      "brand": "visa",
      "checks": {
        "address_line1_check": null,
        "address_postal_code_check": null,
        "cvc_check": "unchecked"
      },
      "country": "US",
      "exp_month": 8,
      "exp_year": 2023,
      "fingerprint": "Xt5EWLLDS7FJjR1c",
      "funding": "credit",
      "generated_from": null,
      "last4": "4242",
      "networks": {
        "available": [
          "visa"
        ],
        "preferred": null
      },
      "three_d_secure_usage": {
        "supported": true
      },
      "wallet": null
    },
    "created": 1659500040,
    "customer": "cus_8TEMHVY5moxIPI",
    "livemode": false,
    "metadata": {},
    "redaction": null,
    "type": "card"
  }'''
nl: Attach a PaymentMethod to a CustomerAttaches a PaymentMethod object to a Customer.
  To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent
  or a PaymentIntent with setup_future_usage.
  These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
  endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
  future use, which makes later declines and payment friction more likely.
  See Optimizing cards for future payments for more information about setting up
  future payments.
  To use this PaymentMethod as the default for invoice or subscription payments,
  set invoice_settings.default_payment_method,
  on the Customer to the PaymentMethod’s ID.Parameters customer required The ID of the customer to which to attach the PaymentMethod.ReturnsReturns a PaymentMethod object