#kitkat - billing portal configuration

1 messages ยท Page 1 of 1 (latest)

fair quiver
#

I think so. You need to specify what products the user can swap between when they update their subscriptions.

#

What is your intended behavior here?

split moth
#

Sure, but I'm also specifying that they should not be able to update that.

#

I can definitely add the product ids, but I found it strange that i'd need to specify which product ids I don't want to allow the user to update.

fair quiver
#

Oh right update = false

#

Sorry I misread that. Let me double check on this

split moth
#

Sure, thank you ๐Ÿ™‚

fair quiver
#

Do you have a request ID (req_123) on hand from a time where you got this error?

split moth
#

Is that easily accessible from the stripe website? I executed this via Stripe CLI

#

Found it, ID req_O1vcgwjxBNFYVp

fair quiver
#

Thank you

fair quiver
#

Is there a reason you want to specifically pass in false?

#

If you don't pass in a features.subscription_update hash, the default is that updating subscriptions is not possible

split moth
#

Sorry was distracted but I just got this to work. We wanted to create a customer center page specifically for updating only the billing address and nothing else. I solved it by specifying an empty value for both the features.subscription_update.products and features.subscription_update.default_allowed_updates.

  -d "features[subscription_update][enabled]"=false \
  -d "features[subscription_update][products]=" \
  -d "features[subscription_update][default_allowed_updates]="
#

On the converse, we also want to create a specific customer center configuration for only changing the pricing option of a product subscription, and I'm not sure how to structure the parameter to form a valid product object via the CLI, do you happen to have an example of this?

fair quiver
#

Nice! Good job figuring that one out

#

Checking in to that

#

What have you tried so far for the product ID?

split moth
#

I may just not be used to this syntax:
-d "features[subscription_update][products][]"="product=prod_***" \
would create something like:

"products": [
        "product=prod_***"
      ],

when I would like it to form as:

"products": {
        "product": "prod_***"
      },
#

Just a matter of me not knowing this syntax I think.

fair quiver
#

Gotcha. For curl I think you need to specify an index in that first line if you are not already:
-d "features[subscription_update][products][0]"="product=prod_***" \

split moth
#

Specifying:

-d "features[subscription_update][products][0]"="product=prod_***" \

Structures the array as:

      "products": {
        "product": "prod_***"
      },

However the I'll get as a response:

  "error": {
    "message": "Invalid object",
    "param": "features[subscription_update][products][0]",
    "type": "invalid_request_error"
  }
#

Maybe it also just needs the price ids that are valid too.

#

Looks like I'm getting the hang of it, it did indeed need both the product id and price ids associated with it. Sorry for all the trouble ๐Ÿ™‚

fair quiver
#

No worries. I really appreciate that you keep pushing and making progress. Does that mean you are good for the moment or is this request still erroring for you?

split moth
#

Yes, I've been successful!

#

Thanks!

fair quiver
#

Nice! Let us know if you run in to anything else