#OptimalSurprise-connect-product
1 messages · Page 1 of 1 (latest)
Hey, can you share the ID of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Yes sure
method=post path=https://api.stripe.com/v1/products/prod_KnD9TylKJp4fbs
i'm using the python sdk
I needed the request ID, but the Product ID works
ah sorry, i couldnt find that on the logs
ah interesting, so i'm using the default test api key
So that Product exists on acct_1K7cbi2fXqerCuJx
yep
Which is a connected account of this platform: acct_1K2h8TKEANZ5OMar
yep
Here's the request ID: https://dashboard.stripe.com/test/logs/req_llJrJwZPTw7ynf
i'm passing stripe_account_id with as this: acct_1K7cbi2fXqerCuJx
which is what's confusing me
So you're using the API keys of the platform, but no Stripe-Account header (according to the logs)
Can you share the full code snippet which makes this API call
yep
this is for the create
i'll send the modify which is the core issue
basically the tier id here is the stripe product id
Where are you passing the stripe_account parameter? They need to be sent on a per request basis: https://stripe.com/docs/connect/authentication#stripe-account-header
stripe.Product.modify(self.tier_id, name=self.name, stripe_account="acct_xxx")
OH
ok this explains a lot
i'm not passing this because i was under the assumption that giving the product id was enough
and that stripe would do the rest
but this makes sense
my mistake, i've made the change and check it works
Perfect! Yep, needs to passed on a per request basis with stripe-python (and any of our server libraries)
Np!
hi just another quick question
what is the best approach to modifying the unit amount decimal of a price?
i would like to change the price of a price object
from the docs, this does not look posslbe
It's not, no. Only via the Dashboard
Generally Price objects are immutable once they've been used
Depends on the 'type' of Price, but generally with unit_amount: https://stripe.com/docs/api/prices/create#create_price-unit_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
np!
btw, is there a reason prices are immutable?
Prevents some unexpected behaviours where those Price objects are used in an existing subscription for example
You might increase the price, and then your users wind up paying more unexpectedly
ah that makes sense
how does price changing work in practice?
e.g. say i have users paying $40/month
and want to upgrade to $50/month
does stripe force existing users to the new pricing?
Well those would be 2 separate Price objects. And any pre-existing subscriptions would be locked in to the older Price object
You'd need to upgrade them manually
ah ok, that makes sense
how does the manual upgrading work?
is this via the dashboard or can it be done programmatically?
Customer's can do this too via the Billing Portal: https://stripe.com/docs/billing/subscriptions/integrating-customer-portal