Raw response for the API
Status code 400
{
“error”: {
“message”: “Can only apply a subscription application_fee_percent when the Checkout Session is made on behalf of another account (using an OAuth key, the Stripe-Account header, or setting subscription_data.transfer_data.destination).”,
“request_log_url”: “Stripe Login | Sign in to the Stripe Dashboard”,
“type”: “invalid_request_error”
}
}
However as you can see there is the header and it doesn’t work, what have iu done wrong?
That’s strange.
As you can see in the docs that error means that you are not making the request as a Stripe Connect platform.
That can be for some reasons:
you need to setup a Stripe Connect platform
the platfor does not have any connected account
double check that you are using the right credentials, just in case
I manage Stripe Connect requests in live apps without problems and I know that if everything is set correctly it works.
If in postman it’s working and you are sure that the same call (including headers) isn’t working in bubble you can file a bug report here to see if there is a particular issue with your app.
Bubble support usually doesn’t support API issues.
Maybe try setting customer parameter to optional and remove the value. I only suggest this because the error mentions the customer parameter.
It’s easy to get confused when testing and getting errors on initialization, so perhaps the customer ID provided in the customer parameter is for a different stripe account.
You can also check your logs in stripe dashboard to maybe get more info to the issue with the call setup.