#Phartsandwich-checkout
1 messages · Page 1 of 1 (latest)
When you say "update the description" are you referring to create a Checkout Session and setting line item descriptions, or are you actually trying to update an already created Checkout Session?
The former
Hypothetically, we have "Red Team" and "Blue Team" subscriptions (they get the exact same benefits, and we want to be able to swap users between them internally), I just want to change the description for the subscription being purchased from "1 month subscription" to "1 month subscription (Blue Team)" so that the users can be reassured they clicked the right things on the previous page.
Gotcha
So I believe you want something like this instead:
$line_items = [
[
'price' => $plan->stripe_price_id,
'quantity' => 1,
'description' => 'NEW DESCRIPTION'
],
]
If it's that simple I'm going to slap myself 🤣
Hmm, no that doesn't seem to have any effect. I no longer get an error of unknown parameter line_items[0][data], but nothing on the resulting checkout page has changed.
Do you have the request ID?
cs_test_b1OJ7vXZ0bkYYb9Rn1LA6B8kZsMDQWyoTAmtdtkhQf0T9OJdQx50JbvMZo
If you find it, please ignore the childishness of my test description string 🙂
Ah, I think the issue here is that for subscriptions we don't surface the line item description anywhere - we only display them in payment mode
Hmm... any way to achieve this off the top of your head? My bosses are real sticklers for this small bit of text being there and option B is to create subscriptions for each of the different "Teams" and there are about 16 of them, which I don't want to have to manage just to add a bit of flavor text on checkout.
Can a "Payment" be converted into a subscription programmatically after the fact? E.g., could I use the "Payment" mode and then apply that to a subscription invoice?
Let me think through some options...
Please do, it is much appreciated.
In my opinion, your best option would really be to create the different products with the different descriptions if having this text be correct is important for your integration. Technically, you could do something like take the initial payment in a "payment" mode Checkout Session and create a Subscription that is trialing until it's time for the next recurring payment but the Checkout UI wouldn't reflect that subsequent future payments are going to be collected and it would look different