Stripe API Connector: “unit_amount cannot be empty” even when input has value

Hi everyone,
I’m struggling to connect Stripe’s Price API with my Bubble app.
No matter what I try, I keep getting the following error when sending a value to Stripe:

Error:
Stripe - Prices error: the parameter unit_amount cannot be empty

My setup:

  • I have a number input field for price (monthly plan, yearly plan, etc).
  • Content format is set to integer.
  • When I input a value (e.g. 6980), it definitely appears in a Text element, so the value exists.
  • In the API Connector, my POST body includes:
    unit_amount=<Input ¥6,980's value:converted to number>&currency=jpy&recurring[interval]=month&product_data[name]=月額プラン
  • Body type is Raw and Content-Type is application/x-www-form-urlencoded.
  • I tried both direct referencing (<Input ... value>) and using a custom state (unit_amount=<unit_amount>), but both failed.
  • Even when I enter a hardcoded value (e.g. unit_amount=1234), it works. But dynamic values from the input never get through.
  • I also tried using :formatted as number and checked that no commas or non-numeric characters are present.

What I’ve already tried:

  • Confirmed the Input field’s value is not empty and is a pure integer.
  • Added :converted to number for the value in the API call.
  • Checked with Text element to confirm the value is present on screen before submission.
  • Removed all plugins (like Toolbox Expression) that might interfere.
  • Refreshed and even rebuilt the Input box.
  • Reinitialized API calls.
  • Changed API Connector Body type (Raw, Form-data, etc).
  • Hardcoded value works, dynamic input does not.

Screenshots

(see attached: workflow, API Connector settings, input config, error, and value displa


y)


If anyone has faced a similar issue or has any ideas, I’d appreciate your advice! Thank you.



The string of search parameters needs to go into the field with the URL.

/v1/prices/<params go here>

You’ve currently put them where you would put JSON or other structured data.

For testing the endpoint, I’d recommend creating a test string first, and initialising the endpoint with that.

unit_amount=100&currency=jpy&recurring[interval]=month&product_data[name]=xyz

Once you’ve got it working, you can focus on passing the right data :slight_smile:

Better yet, copy the curl from Stripe’s docs and create the endpoint from that

curl https://api.stripe.com/v1/prices \
  -u "sk_test_CGGvfNiIPwLXiDwaOfZ3oX6Y:" \
  -d currency=usd \
  -d unit_amount=1000 \
  -d "recurring[interval]"=month \
  -d "product_data[name]"="Gold Plan"

Then you can use the structured JSON.

That said, I always just default to this plugin anyway, since it’s all included and they handle the boilerplate-y stuff for me.

Thank you so much!
I tried them, I couldn’t succeed it…
Can you see where the problem lies?


![スクリーンショット 2025-06-07 6.32.12|690x227]


(upload://rhOI4aHwicrAIJEzSyTwopyPVTl.png)