#.abishek
1 messages · Page 1 of 1 (latest)
Can you share what you would like to achieve?
For example, the scenario that "dynamic pricing" should be used
so, I on the product catalog, I have multiple products and each product has multiple prices. Each price is setup on our website to be added to cart and go through stripe checkout. Since our site use Paypal additionally, we do our coupon calculation on the site itself and don't use the Stripe Coupons
so when the coupon is calculated we want to set the discounted price on the checkout session against each price object. How do I go about doing this
does it make sense?
once Stripe starts supporting Paypal in the US, we will want to get rid of this and start using the Stripe coupons instead, but for now we have to use our own coupon system to calculate discounts as customers also use Paypal
?
Thanks for waiting! Discord is busy now
I'm afraid Checkout Session doesn't support discount on individual line item. Discount can only be applied on all the line items.
One way I can think of to use ad-hoc price with price_data, i.e. create new one-time line item in Checkout Session directly. This is the code example: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#redirect-customers
right but on the price_data I cannot set the price_id for which I am trying to charge the customer for, so with this my product stats will be messed up
with the above example, I cannot use the Stripe Product Catalog at all
As Checkout Session doesn't support discount on individual line item with price (with Price ID), only ad-hoc price_data (the price after discount is applied) can be used as a workaround
any alternatives if checkout has this disadvantage?
If you wish to use Stripe product catalog, another alternative will be using Invoicing: https://stripe.com/docs/invoicing/integration
When creating invoice item at Step 5, Stripe coupon can be used to apply discount with discounts.coupon parameter: https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-discounts-coupon
However, Invoicing will incur additional fee.
Payment Intents?
Payment Intent doesn't have the concept of price, coupon or discount. Stripe will look at the final amount your system submits and charge to customer accordingly
who is this?
can't you implement it yourself since you are able to choose the price
This channel is public and open for community discussion
Likely that . is interested in this topic
I am planning to use payment intent for calculating my own coupon codes yes
its not bad practice is it?
@devout bear If you have question, please have it in main channel #dev-help, so that we can create a thread for you to address your concern/query
even with invoice, I cannot use coupons unless invoice allows setting the price_id and a custom amount
as mentioned above, we use our own coupon implementation
that supports both Stripe and Paypal
I'm afraid Stripe doesn't offer any product to customise amount in a specific price_id
ok, then that answers my question
if a product or price is archived, can it still be used to accept payments?
Once the price or product is archived, it can't be used to accept payments
so, I cannot have grandfathered prices and they need to be active
To use prices for payment, they can't be archived and must be active
like if I have active subscriptions and I archive a product, what happens?
From https://stripe.com/docs/api/prices/update#update_price-active:
Whether the price can be used for new purchases.
It will only affect the new purchase, but not the old one
A product can't be deleted if there is price associated to it
ok, that makes sense.
if I use the price_data as you mentioned above and if the product I add are recurring in nature, will stripe still generate proper reports about churn rates etc?