Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage
Subscriptions
• Section: Stripe
Subscriptions
!! IMPORTANT !!
NOTE: this has been deprecated in favor of intents with scheduled reauth.
Old setup, using subscriptions.
create a product/price
product=stripe_client.v1.products.create(params={"name":f"Dare {dare_id}","description":f"flipdare dare with id {dare_id}","tax_code":"txcd_10402300",})price=stripe_client.v1.prices.create(params={"product":product_id,"unit_amount":amount,"currency":currency,"tax_behavior":"inclusive",# account is responsible for tax."recurring":{"interval":"year","interval_count":1,},})subscription=stripe_client.subscription_schedules.create({"customer":customer_id,"start_date":start_date_timestamp,# Start billing in 45 days"end_behavior":"release",# rel. subscription after phases complete"default_settings":{"on_behalf_of":account_id,# Bill on behalf of connected account"application_fee_percent":app_fee,# Apply application fee percentage"automatic_tax":{"enabled":False,"liability":None,},"transfer_data":{"destination":account_id,# Funds go to connected account},},"phases":[{"items":[{"price":price_id,"quantity":1}],"end_date":end_date_timestamp,# Define explicit end date instead of iterations"proration_behavior":"none","currency":currency,},],})
For User A, a Customer, SetupIntent and a EphemeralKey, is created: