#paul.han

1 messages · Page 1 of 1 (latest)

indigo gladeBOT
clever pebble
#

Hello! Not sure I understand this part: "However, when I update a subscription price manually through the Stripe dashboard, a new price gets created that does not appear under the Product listing." Can you provide more details about that piece?

raven pine
#

For example, I just updated the subscription's price to 15.20. A price for 15.20 is not appearing on that product page

#

This is making me second-guess my API implementation where I create a new Price associated with the existing Product and then attach the Price to the subscription

#

When I do this via the API, the new Price shows up on the Product page

#

I can provide the ruby code I'm using to create the Price & update Subscription if that would be helpful

clever pebble
#

Can you show me a screenshot of exactly how you updated the Price? It sounds like you may have selected an existing Price to switch to instead of creating a new Price in the Dashboard.

raven pine
#

sure!

#

the 22.20 I'm inputting manually in the text field, there is no dropdown to select existing price

clever pebble
#

Backing up a bit, can you tell me more about your use case? You said your clients want to update Subscription prices... are they updating to arbitrary amounts each time for each Subscription, or is the goal to get them to update to one of a limited number of preset amounts?

raven pine
#

Occassionally they want to change the subscription's price for certain clients. I'm assuming to either provide a discount for some kind of referral or to prevent them from cancelling the subscription

#

That is, my connected accounts' client's subscriptions

#

Sorry, to answer your question more explicitly, they are updating to arbitrary prices

clever pebble
#

That still creates a Price behind the scenes, but if I recall correctly the Prices created by price_data won't clutter the Dashboard like the ones you explicitly create.

raven pine
#

ah I see! thank you!

#

Does that mean I should null out the existing price field? example:

          stripe_subscription.id,
          {
            proration_behavior: 'none',
            items: [
              {
                id: stripe_subscription.items.data[0].id,
                price: nil,
                quantity: stripe_subscription.items.data[0].quantity,
                price_data: price_data
              }
            ]
          },
          { stripe_account: stripe_merchant.stripe_account_id }
        )```
clever pebble
#

No, you should omit price entirely.

#

price_data should replace it.

#

They're mutually exclusive.

raven pine
#

got it! thank you so much