đAuthentication
The Ninjapay API uses API Keys
to authenticate requests. You can view and manage your API Keys in the Ninjapay dashboard.
Development mode keys are generated on the Development environment, while Production mode keys are generated on the Production environment. (Currently only production is available)
Authentication to the API is performed with a key. Provide your API key on on the Authorization
header.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API Requests without authentication will also fail.
Authorization
API_KEY
Depending on the functionalities you want your application to perform, there are different permission levels:
Create payment request & fetch info
â
â
Fetch transaction history info
â
â
Initiate withdrawals
â
â
Sending your first API call
There are four properties that you must include in every API call.
api_key
****A 40-character alpha-numeric string that gives you access to use the API.method
****An actions you can perform on a resource.headers
****Any one of the items listed below in the API Reference.body
****JSON-encoded values sent to the method, sometimes optional.
With that in mind, the next step is to send a POST
or GET
request to prod.ninjapay.me
with the appropriate values set.
A good first API call would be wallet.info
. Fill in your API key, then paste this string into a web browser. Notice the body
parameters is missing; that's because it's not required for this API call.
You can send API calls directly in your web browser, using cURL from a command line, or with your programming language of choice. You can also use the Postman Collection.
Last updated