Charge-to is not working using plaid dwolla transfer method

try{

var requestBody = {

  "_links": {

    "source": {

      "href":

        "https://api-sandbox.dwolla.com/funding-sources/bbb37e27-71ab-421a-a2fb-4fd56aaec3a8",

    },

    "destination": {

      "href":

        "https://api-sandbox.dwolla.com/funding-sources/9077eaca-11b5-4380-be6b-693c3357a24b",

    },

  },

  "amount": {

    "currency": "USD",

    "value": "10.00",

  },

  "clearing": {

    "source": "next-available",

  },

  "fees": [

    {

      "_links": {

         "charge-to": {

            "href": "https://api-sandbox.dwolla.com/accounts/56e1d963-1700-4fe9-a705-dee0f598592c",

         }

      },

      "amount": {

        "value": "2.00",

        "currency": "USD"

      }

    }

  ]

};





appToken

  .post("transfers", requestBody)

  .then(function (response){

    res.send({

      transfer_link : response.headers.get("location")

    });

  }).catch((err) => {

    //console.log('Error : ',err);

    res.send({error : err.message});

  });

}

catch (error) {

res.send({error : error.message});

}

Give response like :
{
“error”: “{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,”_embedded":{“errors”:[{“code”:“Invalid”,“message”:“Unable to charge fee to specified destination.”,“path”:"/fees/_links/charge-to/href","_links":{}}]}}"
}

Hi @riya_karar

Looks like your charging a fee to your own account:

Below is an example of what the code should look like, with charge-to to the customer you’d like to charge the fee to. You can also find more info on facilitator fees here

POST https://api-sandbox.dwolla.com/transfers
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY

{
   "_links":{
      "source":{
         "href":"https://api-sandbox.dwolla.com/funding-sources/707177c3-bf15-4e7e-b37c-55c3898d9bf4"
      },
      "destination":{
         "href":"https://api-sandbox.dwolla.com/funding-sources/a2152a8a-b1a6-4b5e-9354-79e2bb8753ee"
      }
   },
   "amount":{
      "value":"10.00",
      "currency":"USD"
   },
   "fees":[
      {
         "_links":{
            "charge-to":{
               "href":"https://api-sandbox.dwolla.com/customers/479ce4c8-385f-4cfa-9693-262c0c3b6408"
            }
         },
         "amount":{
            "value":"2.00",
            "currency":"USD"
         }
      }
   ]
}