BTCPay Demo API integration

troubleshooting
question

#1

Hello. I’m trying to implement BTCPay API following this guide. I get 404 error on any API request to “https://testnet.demo.btcpayserver.org/api/v1/”. What’s wrong with the following:

curl -X POST \
  https://testnet.demo.btcpayserver.org/api/v1/tokens \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'label=Main&id=<my_id>t&pairingCode=<my_pairingCode>'

What’s the right endpoint? I couldn’t find a documentation on API. I have a BitPay API implemented and just changing URL doesn’t seem to work.


#2

Try https://testnet.demo.btcpayserver.org/tokens instead.


#3

I got Status Code: 415; Unsupported Media Type.


#4

Okay, it should be “application/json”.