It’s telling you “Hey, your payload should be form-url encoded. Is it?”
And indeed, it’s not. (Your Body type is set to JSON. Change that.)
This error message is super clear and helpful. Are people just afraid of error messages or something? They almost always tell you exactly what the problem is.
(The exception is the General API failure… Which is usually caused by not having set a content-type at all.)
It’s true, sometimes you have the need to create your own call, but I think in this case you can stick with the plugin – Trial end is supported on stripe.js.
Here’s a shot of how I’m using it, which is to grab the trial days (not trial end) from the plan, and convert it to what is needed for trail end on a subscription:
But maybe you really do need your own api call. If so, definitely get the content-type stuff straightened out as Keith suggests, but also take a look at the authorization – you should only need either HTTP Basic Auth OR The Authorization key with Bearer – I don’t think you need both. If setting the Authorization key, your Authentication can be set to None or self-handled.
Here’s an example:
Auth (no password needed since the key in username is everything stripe needs)
Thank you. This helped in terms of getting me one step closer, but I’m still getting an error.
I did see what you’re showing there, but that is when creating the subscription for the Platform. My system requires that I create it for the Seller, which is why it seems I need to do my own API Call…
What you provided was very helpful - I’m getting a different error, which is I believe related to the fact that the I’m trying to do it on behalf of a Connected account (a Platform Seller).
Do you have any idea of how to do this on behalf of a Connected account? (I see the error message, but I’m not sure specifically what to do about it…)
Thanks in advance,
Side note: @keith, I think the problem is that I find the API Connector a little difficult to use, as it’s not as clear to figure things out as other things in Bubble…
When it says to “check that your POST contest type is application/x-www-form-urlencoded”, I get that that’s the error, but I don’t have a clear idea of exactly what to change (which field) to get it to conform to that…