Hi Bubble Community,
We’ve been working on integrating Stripe Checkout using the API Connector (not the built-in plugin) and we’re stuck at a persistent error when trying to initialize the call.
Our goal is to send a dynamic codigo_identificador field to Stripe via metadata to track the user session with a unique identifier (instead of relying on email), and trigger the webhook on invoice.payment_succeeded.
We followed the instructions from Bubble support to set:
Body type: Raw
Data type: JSON
Headers:
Authorization: Bearer sk_test_…
Content-Type: application/x-www-form-urlencoded as the value
Here’s the exact raw JSON body:
{
“success_url”: “K·ai | Tu Asesor Vocacional”,
“cancel_url”: “K·ai | Tu Asesor Vocacional”,
“mode”: “subscription”,
“line_items”: [
{
“price”: “price_1R2DkIGUhBGKmHEePCnFFCjx”,
“quantity”: 1
}
],
“customer_email”: “customer_email”,
“metadata”: {
“codigo_identificador”: “codigo_identificador”
},
“payment_method_types”: [“card”]
}
We also correctly defined both dynamic fields below the raw body:
customer_email: text
codigo_identificador: text
And none of them are marked as Private.
But every time we try to Initialize the call, we keep getting this error:
Status code 400
{
“error”: {
“code”: “parameter_missing”,
“message”: “Missing required param: success_url.”,
…
}
}
We’ve triple-checked:
Quotes are standard ", not smart quotes.
No trailing commas in JSON.
Correct endpoint: https://api.stripe.com/v1/checkout/sessions
Headers spelled exactly as required.
We even tried different email addresses and static values.
Has anyone encountered this same error when sending JSON via Raw body in the API Connector? Any insights are hugely appreciated!
Thanks so much