I am trying to pass a node.js script result into an API Call header in order to authorize PayPal returns. I have a partnership with PayPal in order to access this feature, and have all the other necessary authorization headers which work to onboard users, complete checkouts, and capture orders. So knowing that my other headers work, I know that this specific header is the only one I need to figure out in order to complete returns on behalf of my merchants.
The header in question is a " PayPal-Auth-Assertion" header. Here is the PayPal documentation page which explains quite simply what is needed to authorize a return.
https://developer.paypal.com/docs/multiparty/issue-refund/
The only problem is that I can’t figure out where to create a node.js script and pass the resulting value into the API Call header. That documentation also gives the option of using java, but again, I’m not sure how I would incorporate that into the API header.
Any help is appreciated!