HTTP API
Request Payment With HTTP

Requesting Payment Directly From Anypay Payments API

request_payment.sh
1
2
curl --location --request POST 'https://api.anypayinc.com/r' \
3
-u YOUR_PLATFORM_KEY: \
4
--data-raw '{
5
"template": [{
6
"currency": "DASH",
7
"to": [{
8
"currency": "USD",
9
"amount": 150,
10
"address": "XhEh7yEzbJtViSrmJEiJ73CVp1C37j8eW7"
11
}, {
12
"currency": "USD",
13
"amount": 10,
14
"address": "XnEw2KjfLVAy1hSXMFWLCcod5X7rLM581p"
15
}]
16
}],
17
"options": {
18
"webhook": "https://paypow.com/anypay/webhooks/payments",
19
"redirect": "https://paypow.com/anypay/payments"
20
}
21
}'
22
23
Copied!

Payment For Multiple Coin Options

1
2
const ANYPAY_API_SECRET = 'YOUR_API_KEY_HERE'
3
4
const http = require('superagent')
5
6
const requestJSON = {
7
template: [{
8
currency: 'DASH',
9
to: [{
10
currency: 'USD',
11
amount: 150,
12
address: 'XhEh7yEzbJtViSrmJEiJ73CVp1C37j8eW7'
13
}, {
14
currency: 'USD',
15
amount: 10,
16
address: 'XnEw2KjfLVAy1hSXMFWLCcod5X7rLM581p'
17
}]
18
}, {
19
currency: 'BCH',
20
to: [{
21
currency: 'USD',
22
amount: bill,
23
address: 'bitcoincash:qztlw4ft8euq9wvzk27hh6lxtac2z4clay0w8v79zm'
24
}, {
25
currency: 'USD',
26
amount: tip,
27
address: 'bitcoincash:qp3cjuygakccjvq4k3ge3jjfmcalhz8a2sq2e0yum3'
28
}]
29
}],
30
options: {
31
webhook: 'https://paypow.com/anypay/webhooks/payments',
32
redirect: 'https://paypow.com/anypay//payments'
33
}
34
35
}
36
37
let response = await http
38
.post('https://api.anypayinc.com/r')
39
.send(requestJSON)
40
.auth(ANYPAY_API_KEY, '')
41
Copied!
Last modified 6mo ago