API Usage & Authentication
Learn how to authenticate with the PayNowPro API using API keys, understand base URLs, and interpret HTTP response codes.
This page covers the foundational rules for interacting with the PayNowPro REST API, including the base URL, authentication, and how to interpret response codes.
Base URL
All API requests should be made to the following base URL. All endpoint paths documented in this reference are relative to this URL.
https://api.paynowpro.com/api/v1For example, to access the customers endpoint, you would make a request to:
https://api.paynowpro.com/api/v1/customers
Authentication
The PayNowPro API uses an API Key to authenticate requests. You must include your key in every request by providing it in the api-key HTTP header.
You can manage your API Keys from the Developer section of your PayNowPro Dashboard.
curl "https://api.paynowpro.com/api/v1/customers" \
-H "api-key: YOUR_API_KEY"Keep Your Keys Secure!
Your API keys carry significant privileges. Be sure to keep them secure and treat them like passwords. Do not expose your secret API keys in publicly accessible areas such as client-side code, public repositories, or mobile applications.
HTTP Response Codes
PayNowPro uses conventional HTTP response codes to indicate the success or failure of an API request.
In general: codes in the 2xx range indicate success, 4xx codes indicate an error with the request you sent,
and 5xx codes indicate an error on our servers.
| code | description |
|---|---|
| 200 OK | The request was successful. |
| 201 Creeated | The resource was successfully created in response to a POST request. |
| 400 Bad Request | The request was malformed. This can be due to missing required parameters, invalid data formats, or breaking a validation rule. The response body will contain more details. |
| 401 Unauthorized | The request was not authenticated. Check that your API key is correct and included in the api-key header. |
| 404 Not Found | The requested resource could not be found. |
| 500 Internal Server Error | Something went wrong on PayNowPro's end. These are rare, but if you receive one, please check our status page or contact support if the problem persists. |
Error Responses
When an API request results in a 4xx or 5xx error, the body of the response will be a JSON
object containing specific details about what went wrong.
{
"body": {
"code": 400,
"reason": "A customer with the provided associatedId already exists."
}
}