API reference
The Payze API is organized around REST. Our API accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Authentication
The Payze API uses API key and secrets to authenticate requests.
You can view and manage your API keys in the Payze Dashboard.
Warning
Your API keys carry 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.
Using API key and request
Pass apiKey
and apiSecret
to the request body to successfully authenticate request.
{
"apiKey": "API_KEY",
"apiSecret": "API_SECRET",
...
}
Errors
Payze uses HTTP response codes to indicate the success or failure of an API request.
Codes in the 2xx range indicate success.
Codes in the 4xx range indicate an error that failed given the information provided.
Codes in the 5xx range indicate server error.
HTTP Status Code | Description |
---|---|
200 - OK | This is good, everything went as expected. |
400 - Bad Request | Request was not formed correctly, often due to missing fields. |
401 - Unauthorized | No valid API key provided. |
403 - Forbidden | The API key doesn't have permission to perform the request. |
404 - Not Found | The requested resource doesn't exist. |
429 - Too Many Requests | Too many requests were made to the API too quickly. Consider using |
5xx - Server Errors | Something went wrong, refer to response body. |
Recommendation
We recommend logging Payze API responses, to decrease debugging time.