code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.PaymentLink.modify(
    "plink_1LSdsx2eZvKYlo2CdmenOg9N",
    active=False,
  )
  '''Response {
    "id": "plink_1LSdsx2eZvKYlo2CdmenOg9N",
    "object": "payment_link",
    "active": false,
    "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: Update a payment linkUpdates a payment link.Parameters active optional Whether the payment link’s url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated. line_items optional array of hashes 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. Pass an empty string to enable automatic payment methods that use your payment method settings.Possible enum valuescard affirm promptpay bacs_debit bancontact blik boleto Show 17 moreMore parametersExpand all  after_completion optional dictionary   allow_promotion_codes optional   automatic_tax optional dictionary   billing_address_collection optional enum   customer_creation optional enum   shipping_address_collection optional dictionary ReturnsUpdated payment link