# The CashAppPay option on the Web Payments SDK seems to be unstoppably spammy

**URL:** <https://developer.squareup.com/forums/t/the-cashapppay-option-on-the-web-payments-sdk-seems-to-be-unstoppably-spammy/6286>\
**Category:** Questions\
**Tags:** web-payments-sdk, cash-app-pay\
**Created:** [June 21, 2022, 11:00pm UTC](https://developer.squareup.com/forums/t/the-cashapppay-option-on-the-web-payments-sdk-seems-to-be-unstoppably-spammy/6286 "2022-06-21T23:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tschnepp](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@tschnepp](https://developer.squareup.com/forums/u/tschnepp)\
**Post date:** [June 21, 2022, 11:00pm UTC](https://developer.squareup.com/forums/t/the-cashapppay-option-on-the-web-payments-sdk-seems-to-be-unstoppably-spammy/6286/1 "2022-06-21T23:00:07Z")

</div>

Greetings,

We’re noticing that when the Square Payment Form loads with the Cash App Pay button, the browser will continually make a request against the cashapp website every second. What’s a bit disturbing is that when the user leaves the page, such that the Payment Form is no longer displaying, or if they choose a different payment option (such as Apple Pay, Google Pay, or Credit Card), the requests do not stop.

We had initially followed the implementation as proposed in the example documentation, which did not list any `destroy` calls, after we `attach` the elements to their respective `DOM` `Element`s. However, even when we call `destory`, the API calls persist.

Furthermore, if the user leaves the `Payment Form`, and returns in the same `Browser` `SPA` session, the `Cash App Pay` button will not load citing the message that it needs to be `destroy`ed before being `created` again. Again, this is despite the fact that we’re calling the `destroy` method on the various `Payment Element` Options.

[https://developer.squareup.com/reference/sdks/web/payments/cash-app-pay#CashAppPay.destroy](https://developer.squareup.com/reference/sdks/web/payments/cash-app-pay#CashAppPay.destroy)

Is this a bug we are encountering? Is the behavior somehow different on the Sandbox than the Production environment when it comes to destroying these elements, or is there something I’m missing.

Please let me know,

Thanks,

~ Theodore Schnepper

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [June 21, 2022, 11:54pm UTC](https://developer.squareup.com/forums/t/the-cashapppay-option-on-the-web-payments-sdk-seems-to-be-unstoppably-spammy/6286/2 "2022-06-21T23:54:22Z")

</div>

👋 Is this in production or sandbox? Also what’s your application ID and is the page that the form is on available so we can take a look? 🙂

---

<div class="post-metadata">

**Author:** ![tschnepp](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@tschnepp](https://developer.squareup.com/forums/u/tschnepp)\
**Post date:** [June 22, 2022, 12:02am UTC](https://developer.squareup.com/forums/t/the-cashapppay-option-on-the-web-payments-sdk-seems-to-be-unstoppably-spammy/6286/3 "2022-06-22T00:02:56Z")

</div>

We’ve noticed it occurring on both `Sandbox` and `Production`.

The `Sandbox` `Application ID` is as follows: `sandbox-sq0idb-GowUqXPtPHsc_njczAnCYA`  
The `Production` `Application ID` is as follows: `sq0idp-fS_lWfoTDo87DJfrl13Xvw`

Our production site does not yet have the `destroy` method being called on the checkout process when the `Element`s become unmounted. However, the behavior I described above has been observed when we attempt to update the `Element` in isolation in our `testing` environment, though that would only be running on the `Sandbox` `Environment`.

[Sandbox Example](https://addmi.com/b/run-through-business.7e7c097f3555b264/store)  
[Production Example](https://addmi.com/b/addmi-live.-MA8dfbbNAB5ug2CYsrK/store)

Please let me know if you have any questions,

Thanks,

~ Theodore Schnepper

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [June 22, 2022, 12:47am UTC](https://developer.squareup.com/forums/t/the-cashapppay-option-on-the-web-payments-sdk-seems-to-be-unstoppably-spammy/6286/4 "2022-06-22T00:47:44Z")

</div>

According to the team this is expected at this time and improvements will follow. 🙂
