Pular para o conteúdo principal

Authentication

As seen in the Introduction topic, you will need the API Key to make calls to the Secure Payments API.

You may be generating an API in your dashboard under the menu, Settings => API Credentials.

How to Use the API Key

Send your API key in the header of each HTTP request using the following format:

Authorization: Bearer YOUR_API_KEY_HERE

Replace YOUR_API_KEY_HERE with the key provided for your account.

Request Example

Below is an example of sending the API key in a request using curl:

curl -X GET \
https://api.yourapi.com/v1/endpoint \
-H "Authorization: Bearer YOUR_API_KEY_HERE"

Best Practices

  • Never publicly expose your API key.
  • Do not share your API key with unauthorized third parties.
  • If you suspect your key has been compromised, immediately generate a new key and invalidate the old one.

Common Errors

If the key is not correctly provided or is invalid, the API will return a 401 Unauthorized error:

{
"message": "Invalid token."
}