code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.billing_portal.Session.create(
    customer="cus_8TEMHVY5moxIPI",
    return_url="https://example.com/account",
  )
  '''Response {
    "id": "bps_1LSdxb2eZvKYlo2Cugji56Uy",
    "object": "billing_portal.session",
    "configuration": "bpc_1LSdxb2eZvKYlo2CdKPl5uH4",
    "created": 1659519231,
    "customer": "cus_8TEMHVY5moxIPI",
    "livemode": true,
    "locale": null,
    "on_behalf_of": null,
    "return_url": "https://example.com/account",
    "url": "https://billing.stripe.com/session/{SESSION_SECRET}"
  }'''
nl: Create a portal sessionCreates a session of the customer portal.Parameters customer required The ID of an existing customer. configuration optional The ID of an existing configuration to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. locale optional enum The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used.Possible enum valuesauto bg cs da de el en Show 40 more on_behalf_of optional Connect only The on_behalf_of account to use for this session. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account’s branding settings, which the portal displays. return_url optional The default URL to redirect customers to when they click on the portal’s link to return to your website.ReturnsReturns a portal session object