Stripe-account api header call

To take a percentage as a marketplace i need to be able to include the stripe-account header in the call. bubble is however giving this message

There was an issue setting up your call.

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?

It looks like there is no screenshot of the api setup. If you add it it can be useful :slight_smile: (of course remeber to hide sensible data)

1 Like

Indeed!

Are you sure the stripe account is not the platform account or an account belonging to the platform?


i was, i tried a different account to test and now been given this error

is that account connected to the platform?

1 Like

yes! it is

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

Its weird as it makes the call on postman

try adding the header content-type set to application/x-www-form-urlencoded (in the request, not in the shared headers) and see if it works.

1 Like

Didn’t work, is there a way of contacting bubble tec support?

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.

This topic was automatically closed after 70 days. New replies are no longer allowed.