This documentation is intended to provide all the information you need to work with our API.
The OnePay API has been implemented around RESTful. Our API uses standard HTTP protocols where JSON payloads are returned in response to the HTTP requests. All operations can be performed via GET, POST and PATCH requests.
To authenticate requests, include an Authorization header with the value "Bearer your-token".
All authenticated endpoints are marked with a required authentication badge in the documentation below.
You can get your token by visiting your dashboard profile and scrolling to the Company API Token section.
Authentication: "Bearer your-token"
An idem potency token is a unique and random identifier associated with a specific HTTP request. It is designed to make requests idempotent, meaning that regardless of how many times the request is sent, the outcome remains the same. Idem potency tokens are typically included as a custom HTTP header in the request.
Why Idem potency Tokens are Important
Idem potency tokens are crucial for several reasons:
Preventing Duplicate Requests: In scenarios where a client might retry a failed request, idem potency tokens ensure that the server doesn't perform the same action multiple times.
Ensuring Data Consistency: When dealing with operations that modify data, idem potency tokens help maintain data consistency by ensuring that the same request doesn't produce different results if executed multiple times.
Error Handling: Idem potency tokens help in better error handling by allowing servers to recognize and handle duplicate requests gracefully.