Authentication

Authentication

API Keys

The Axxonpay API uses API keys to authenticate requests. You can view and manage your API keys in the Axxonpay Dashboard.

  • Authorization keys have the prefix key_
  • Signature secret keys have the prefix sig_
  • Alternatively, you can use restricted API keys for granular permissions.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication Methods

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

If you need to authenticate via header auth (e.g., for a cross-origin request), use the following header instead of basic auth:

-H "authorization: key_SAVGs7..."

HTTPS and Authentication

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

API Libraries

By default, the Axxonpay API Docs demonstrate using curl to interact with the API over HTTP. However, we provide official client libraries in various programming languages to simplify API integration. Select your preferred language below to see code examples using our official libraries.

Base URL

HTTPS https://gateway-test.axxonpay.com
const axios = require('axios');
 
// Define the headers with the signature
const headers = {
  authorization: 'key_<Your-Key>',
};
 
const data = {
  // Add your request body data here
};
 
// Make the POST request
axios.post('<Api_URL>', data, { headers })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.error(error);
  });