#rodney_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1331325124716265582
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! For your first question, I think the closest thing we have is the ability to limit a Promotion Code to Customers without any successful transactions: https://docs.stripe.com/api/promotion_codes/object#promotion_code_object-restrictions-first_time_transaction
Continuation for question 2:
We offer a free tier of our subscription that we'd like to programmatically sign users up for, however our accounting department needs an address for customers who spend money on the platform for tax purposes. I can create the subscription fine with automatic tax disabled and it does work, but when a user goes to the customer portal to manage their subscription (upgrade to a paid tier, for example), I cannot figure out how to prompt for billing address details at that point. The payment method collection will collect postal code and country, but not a full billing address. Is there a way to configure the customer portal to always prompt for billing address when collecting a payment method?
For your second question I don't think there's a way to force the Portal to collect a full address if it's not required by the underlying Subscription. Have you tried updating the Subscription to enable automatic tax after it's created, but before the Customer updates it via the Portal?
For the first question, could we credit/deduct from the amount paid on the product? E.g. user signs up for the subscription, charge is made for the full price. We detect on our end that this is the first time this customer has signed up for this product, apply a coupon/promotion to credit back the discount amount?
You could do a partial refund, or you could add funds to the Customer's balance which would automatically be used on the next Invoice.
Neither of those options would involve a Coupon or Promotion Code.
I guess you could also apply a Coupon to the Subscription which would impact later Invoices.
Oh a partial refund would probably work. Are the implications on stripe processing fees/account standing for issuing partial refunds?
Yeah I think applying the coupon to later invoices would probably work too
We can't help with fee questions here. You'd need to consult the docs or ask support: https://support.stripe.com/contact
no problem, would probably be my 2nd choice anyways
I guess the only way to get the "intended" behavior of first invoice is discounted would be to not use Checkout correct?
I'm less concerned about the second question since we can just configure the checkout element to always collect billing details and I don't think needing to put in an address is a huge barrier/point of friction
but figured I'd ask just in case
Hm, not sure I fully understand your situation, to be honest. Can you describe an example of the ideal behavior you're trying to accomplish, from your customer's perspective?
For the initial Subscription creation I mean?
For example, I'm not sure I understand why you can't apply a Discount to the Checkout Session when you create it? https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-discounts
Yep!
We have a new product offering with 4 tiers. This is modeled with 4 separate products, each denoting the tier of the subscription and containing a licensed price. 2 of the tiers contain a metered price for overage as well.
We want to apply a 50% discount to the licensed price the first time a customer signs up for a specific tier. So the flow would either be:
- Our frontend calls our backend to setup a checkout session to sign up a user for the discounted tier. We can actually solve this case with https://docs.stripe.com/billing/subscriptions/coupons?dashboard-or-api=api#using-coupons-in-checkout and detect on our end if this is the first time this customer has signed up for this specific tier of subscription
- The customer is already signed up for some tier of the subscription. They upgrade/downgrade using the customer portal to the discounted tier and we'd like to apply the discount in this case as well
Ah, okay, so for case #2 you'd need to listen for Events related to the change being made and apply the desired change to the Subscription (e.g., switching from one Price to another, applying a Coupon, updating the Customer's balance, etc.).
Gotcha, I think that makes sense. In the upgrade/downgrade case the cleanest solution would probably be to just apply the discount to their next invoice
well, we'd just apply the coupon in the customer.subscription.updated event and presumably it would go through on the next invoice
we've already got a webhook listener and everything set up so it would be an easy lift
Sounds like a plan!
I think that should all work, thanks for going through everything with me. Ya'll are great!
Happy to help!