#Implicit

1 messages · Page 1 of 1 (latest)

autumn pagodaBOT
kindred snow
#

👋 happy to help

#

are you using Checkout Sessions or your own custom code with Payment Elements?

woven ferry
#

Custom code with payment elements

kindred snow
#

@ruby urchin please don't enter other threads

#

I don't think there's an easy way of doing that if there is one in the first place

woven ferry
#

We would love to, but we have a existing codebase right now with custom code. We will migrate to sessions

#

If there is a workaround that would be great for us, otherwise we would need to delay our release until we convert back to sessions

autumn pagodaBOT
rotund niche
#

to be clear you use the Invoices API today?

#

and you want to add an invoice item that is representing shipping, and have that item excluded from coupons/discounts?

woven ferry
#

We are using subscriptions API, with shipping fee added with add_invoice_items parameter. Then we use subscription.latest_invoice.payment_intent to create a payment element.

Second question almost yes, but we use the invoice generated from subscriptions API.

rotund niche
#

well it's mostly impossible in that context I think.

if not using Subscriptions, you can use https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-discounts to have item-level discounts. So instead of a coupon on the Invoice as a whole, you add coupons to individual items, and don't add it to the ones you don't want a discount on. But that doesn't work for subscriptions, they don't support this item-level discount feature

woven ferry
#

Alright, we might need to convert to sessions API now then. But will we have recurring shipping fees available on subscriptions then? Because I couldn't see it in the demo

#

Another question, if we set customer's address before the checkout session; will it prefill the address?

rotund niche
#

I'm not sure, would have to test it

woven ferry
#

We are motivated to switch to sessions API if we meet these requirements. If you could provide if these are possible we will switch right now.

rotund niche
#

the Discord server is extremely busy , I might get around to it in a while

#

in any case I don't really think the situation is any different with Checkout, discounts are mostly applied to the whole payment in all our integrations

#

but again comes down to you experimenting with the different options, there's many ways of using the API