# Using Stripe.js on iOS fails silently

**URL:** <https://forum.ionicframework.com/t/using-stripe-js-on-ios-fails-silently/103586>\
**Category:** ionic-v3\
**Created:** [August 29, 2017, 12:57pm UTC](https://forum.ionicframework.com/t/using-stripe-js-on-ios-fails-silently/103586 "2017-08-29T12:57:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![baadier1](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@baadier1](https://forum.ionicframework.com/u/baadier1)\
**Post date:** [August 29, 2017, 12:57pm UTC](https://forum.ionicframework.com/t/using-stripe-js-on-ios-fails-silently/103586/1 "2017-08-29T12:57:28Z")

</div>

Hey,

I’m getting a weird bug. We use Stripe.js in our app and it works fine on Android and in the browser but on iOS nothing happens. It fails silently.

Any idea what would stop some JS from running?

We are using Google maps JS and it works without issue when loaded in the same way.

I’ve checked that the JS is added to the HEAD and that the object is available on the window.

---

<div class="post-metadata">

**Author:** ![gary-ws](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gary-ws](https://forum.ionicframework.com/u/gary-ws)\
**Post date:** [September 18, 2017, 8:13am UTC](https://forum.ionicframework.com/t/using-stripe-js-on-ios-fails-silently/103586/2 "2017-09-18T08:13:32Z")

</div>

If your problem is that the form fields are not appearing on the screen, leaving you with just a white box, then the cause of this is that it is blocked by security (you can see an error in the logs in Xcode when you try to mount the element on the page). The Stripe elements renders inside an iframe. You need to add to your `config.xml`:

```auto
<allow-navigation href="https://js.stripe.com/*" />

```

Cheers,  
Gary

---

<div class="post-metadata">

**Author:** ![baadier1](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@baadier1](https://forum.ionicframework.com/u/baadier1)\
**Post date:** [September 18, 2017, 8:56am UTC](https://forum.ionicframework.com/t/using-stripe-js-on-ios-fails-silently/103586/3 "2017-09-18T08:56:04Z")

</div>

That is correct. I updated another thread that this was how i resolved it.

---

<div class="post-metadata">

**Author:** ![urchinK](https://avatars.discourse-cdn.com/v4/letter/u/e47c2d/32.png) [@urchinK](https://forum.ionicframework.com/u/urchinK)\
**Post date:** [September 20, 2018, 10:52pm UTC](https://forum.ionicframework.com/t/using-stripe-js-on-ios-fails-silently/103586/4 "2018-09-20T22:52:02Z")

</div>

It’s funny, I’m using Stripe.js without elements, I just use the js api (`createToken()`) and it did nothing on ios but worked on android, so I tried `allow-navigation` without much faith and it actually solved my problem.

Cheers !
