Stripe - Invalid URL: Non-ASCII characters in URLs

Hi there,

I am using the Stripe plugin by Bubble. When I ran a payment workflow orginally everything worked fine but when I have the slugs set up with Non-ASCII characters, I get the following error message:

Stripe error: Invalid URL: Non-ASCII characters in URLs must be percent-encoded in order for the URL to be valid.

I cannot find any information about this particular error on the Bubble forum. May you please help me.

Thank you very much!

you need to URL encode those characters as they are not valid characters to use in a url for stripe

How should I do this URL encode?

There are plugins that can do it

Hi,

You can convert the URL using JS, here is the code:

const text = "Тестирование преобразователя";
const encodedURL = encodeURIComponent(text);
return encodedURL;

In text, you should insert your URL, so your workflow will look something like this:


image

Then, in Stripe, you reference the JS result:
image

You should use the Toolbox plugin to access the Server script option.

(There must be some plugin that does this without needing JavaScript, as Boston mentioned, but I didn’t search for it)

Many thanks for your advice! I will test it and let you know how it worked!

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