code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.PaymentLink.create(
    line_items=[
      {
        "price": "price_1LSTX02eZvKYlo2CrKMGl6Dy",
        "quantity": 1,
      },
    ],
  )
  '''Response {
    "id": "plink_1LSdsx2eZvKYlo2CdmenOg9N",
    "object": "payment_link",
    "active": true,
    "after_completion": {
      "hosted_confirmation": {
        "custom_message": null
      },
      "type": "hosted_confirmation"
    },
    "allow_promotion_codes": false,
    "application_fee_amount": null,
    "application_fee_percent": null,
    "automatic_tax": {
      "enabled": false
    },
    "billing_address_collection": "auto",
    "consent_collection": null,
    "currency": "usd",
    "customer_creation": "always",
    "livemode": false,
    "metadata": {},
    "on_behalf_of": null,
    "payment_intent_data": null,
    "payment_method_types": null,
    "phone_number_collection": {
      "enabled": false
    },
    "shipping_address_collection": null,
    "shipping_options": [],
    "submit_type": "auto",
    "subscription_data": null,
    "tax_id_collection": {
      "enabled": false
    },
    "transfer_data": null,
    "url": "https://buy.stripe.com/test_5kAcPyarJaIPaQg4gg"
  }'''
nl: Create a payment linkCreates a payment link.Parameters line_items required The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.Show child parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. Metadata associated with this Payment Link will automatically be copied to checkout sessions created by this payment link. payment_method_types optional enum The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your payment method settings (20+ payment methods supported).Possible enum valuescard affirm promptpay bacs_debit bancontact blik boleto Show 17 moreMore parametersExpand all  after_completion optional dictionary   allow_promotion_codes optional   application_fee_amount optional Connect only   application_fee_percent optional Connect only   automatic_tax optional dictionary   billing_address_collection optional enum   consent_collection optional dictionary   currency optional preview feature   customer_creation optional enum   on_behalf_of optional Connect only   payment_intent_data optional dictionary   phone_number_collection optional dictionary   shipping_address_collection optional dictionary   shipping_options optional array of hashes   submit_type optional enum   subscription_data optional dictionary   tax_id_collection optional dictionary   transfer_data optional dictionary Connect only ReturnsReturns the payment link