-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayout.js
30 lines (28 loc) · 988 Bytes
/
payout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
let request = require('request');
let resource_url = 'https://test.bitpay.com/payouts';
let post_data = {
"amount": 1,
"currency": "USD",
"ledgerCurrency": "GBP",
"reference": "payout_20210527",
"notificationEmail": "[email protected]",
"notificationURL": "https://yournotiticationURL.com/0wx0bv9785amb3sa1eq1rz5bgx",
"email":"[email protected]",
"label":"DevWP engine",
"token":"hR9xND2rATeh3eKXw8HVDbFXMYf86KV5wygLpf1V81w"
};
let headers = {
"X-Accept-Version": "2.0.0",
"Content-Type": "application/json",
"X-Identity": "03c5dee7375d42e2112b7a9d170b5dde13569b38c14b2caeb01a35b4815fb97b29",
"X-Signature": "3045022100dfa122b1d843c68f5019ccec4de48fd07aeb8de5098463d67ae2c14ece70980102206670fec00dcd7f247bcaec682459bf878d7fd4933fb184ce890c4b70465925c1"
};
let options = {
url: resource_url,
method: 'POST',
json: post_data,
headers: headers
};
request(options, function (error, response, body) {
console.log(body);
});