# Charge-to Syntax error. Javascript

**URL:** https://discuss.dwolla.com/t/charge-to-syntax-error-javascript/8046
**Category:** Transfers
**Created:** [April 25, 2022, 5:04am UTC](https://discuss.dwolla.com/t/charge-to-syntax-error-javascript/8046 "2022-04-25T05:04:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![colterconway](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@colterconway](https://discuss.dwolla.com/u/colterconway)
#### Post date: [April 25, 2022, 5:04am UTC](https://discuss.dwolla.com/t/charge-to-syntax-error-javascript/8046/1 "2022-04-25T05:04:25Z")

</div>

![Screen Shot 2022-04-24 at 10.03.16 PM](https://global.discourse-cdn.com/dwolla/original/2X/d/d51d740d430b7f9843b4e6954bf00468133db8af.png)  
I’m having an issue with charge-to. It doesn’t seem to be working. I used the same Javascript code found here: [Facilitator Fee for ACH transfers | Dwolla API Documentation](https://developers.dwolla.com/concepts/facilitator-fee#retrieve-fees-charged-on-a-transfer)

---

<div class="post-metadata">

### Author: ![james](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/james/32/3524_2.png) [@james](https://discuss.dwolla.com/u/james)
#### Post date: [April 25, 2022, 2:55pm UTC](https://discuss.dwolla.com/t/charge-to-syntax-error-javascript/8046/2 "2022-04-25T14:55:53Z")

</div>

Hey, @colterconway! Thank you for bringing this to our attention! Since the `charge-to` object key contains a hyphen, it must be surrounded with either single or double quotes when expressed in JavaScript. For example, please consider the following code snippet:

```nohighlight
fees: [
  {
    _links: {
      'charge-to': {
        href: 'https://api-sandbox.dwolla.com/customers/479ce4c8-385f-4cfa-9693-262c0c3b6408'
      }
    },
    amount: {
      value: '2.00',
      currency: 'USD'
    }
  }
]

```

Additionally, I do see where our documentation should have been more clear on this behavior and have added a ticket to get it addressed as soon as possible.
