code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.PromotionCode.create(coupon="Z4OV52SU")
  '''Response {
    "id": "promo_1HMxuf2eZvKYlo2CmGXSyhRx",
    "object": "promotion_code",
    "active": true,
    "code": "TS0EQJHH",
    "coupon": "Z4OV52SU",
    "created": 1599060617,
    "customer": null,
    "expires_at": null,
    "livemode": false,
    "max_redemptions": null,
    "metadata": {
      "order_id": "1"
    },
    "restrictions": {
      "first_time_transaction": false,
      "minimum_amount": null,
      "minimum_amount_currency": null
    },
    "times_redeemed": 0
  }'''
nl: Create a promotion codeA promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.Parameters coupon required The coupon for this promotion code. code optional The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. 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.More parametersExpand all  active optional   customer optional   expires_at optional   max_redemptions optional   restrictions optional dictionary ReturnsReturns the promotion code object