#edutomesco
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
you can put GB in the price name
but there isn't a unit description
thank you
let me know if you need any more help
one thing
I have a subscription with a threshold just when it have yearly prices, but when I downgrade to a monthly prices I want to remove the threshold. When it applies the downgrade I didn't see that the threshold billing disapear
I'm not sure I follow, would you mind elaborating more? and what do you mean by threshold?
what language are you using?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
golang
Nice
๐
but it says to me to pass a *SubscriptionBillingThresholdsParams
how I pass then an empty string
thank you
did you try ""
yes
it's needed a *SubscriptionBillingThresholdsParams object
I can't pass an empty string
could you try nil
sorry I'm not really proficient in golang
@floral estuary do you know if there's a special struct/enum or something to say it's an empty param? or does nil work?
nil maybe
in the API itself it's "". You're using Golang I take it?
I think we have some kind of special enum value for this, looking
I wasn't able to find it ๐คฆ
i'm trying with nil reference let me check
with nil reference doesn't work
maybe you didn't adapt this for golang yet?
I wait for that, thanks
can't find right now, I'd suggest writing to https://support.stripe.com/?contact=true for a guaranteed response
as a workaround though, you can do this :
params := &stripe.SubscriptionUpdateParams{ .... }
params.AddExtra("billing_thresholds", "")
does that make sense? you can use AddExtra to add any parameter with any value even if the library doesn't directly support it
actually I'm using this object
&stripe.SubscriptionSchedulePhaseParams
becaue I schedule the plan
This object doesn't have the AddExtra function
it does, all Param objects have that
or rather, maybe not SubscriptionSchedulePhaseParams as that's a sub-param, but you're using that inside another param, like SubscriptionScheduleUpdateParams, right?
you set it on that param object, the one you pass to the service. I could show you easily if you posted your code.
right!!!
"{"code":"parameter_unknown","doc_url":"https://stripe.com/docs/error-codes/parameter-unknown\",\"status\":400,\"message\":\"Received unknown parameter: billing_thresholds","param":"billing_thresholds","request_id":"req_gbqZ2GlYzLlyms","type":"invalid_request_error"}"
i got this error
can you share the exact Go code you wrote?
but ok that field exists in https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-billing_thresholds and not the top level
so I was wrong, you do need to use AddExtra on the SubscriptionSchedulePhaseParams
yes! but i can't because doesn't have this function
do phases[0].billing_thresholds instead in the AddExtra line as the string for the first key argument
that should work
I've try and nothing
and i want to be the second phase so it should be phases[1].billing_threshols
doesn't work
did you get an error?
could you post it?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
you have a typo
as the error message implies, you likely wrote AddExtra("phases[1][.billing_thresholds]", "") in your code instead of AddExtra("phases[1][billing_thresholds]", "")
right
does that mean you tried again and it works now?