Authentication

You'll need to authenticate your requests to access any of the endpoints in the API. In this guide, we'll look at how authentication works.

Bearer token

You will need your key — you will find it in the Virtualpay » Integration, or by requesting the company.
The Header Accept must be application/json.

Here's how to add the token to the request header using cURL:

Example request with bearer key

curl --location 'https://sandbox.virtualpay.com.br/api/v1/transactions' \
      --header 'Accept: application/json' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Bearer {key}'

Always keep your key safe and reset it if you suspect it has been compromised.