PayWay APIs are provided as REST and has predictable, resource-oriented URLs. It uses HTTP response codes to indicate API errors. In order to call our APIs, you need to pass authentication in the form of merchant key and authorization header. Values for both merchant key and Authorization header are made available via email used at the time of registration.
The API allows you to interact securely from a client-side application, we return JSON for all API responses, including specific error message.
Here you will find all the APIs provided by PayWay for different functions like
- Create Transaction - Create a transaction in PayWay
- Check Transaction - Check transaction status
- Get Transaction - Get transactions list
- Push Back Notification
Every time you use above APIs you will have to pass authentication, you can authenticate your account by including your secret key and apply encrypt mechanism in API requests.
Your API keys manage many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas on any online source code version control, online drive share, client-side code, etc.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth value. You do not need to provide username and password.
The APIs are accessible from the URL:
Testing Server base url:
Production Server base url:
Sample Request Diagram
The REST API will be following below example sequence to execute the call
When accessing PayWay, any invalid request that is received is responded to with any of the following error code
|ERROR CODE||ERROR MESSAGE|
|2||Invalid Transaction ID.|
|3||Invalid Amount format.|
|4||Duplicate Transaction ID.|
|5||Invalid Continue Success URL (Must be registered in PayWay backend).|
|6||Invalid Domain Name (Need to register in PayWay backend).|
|7||Invalid Return Param (String mast be smaller than 500 chars).|
|8||Invalid Limit Amount (The amount must be smaller than value that allowed in PayWay backend).|
|9||Invalid Shipping Amount.|
|10||PayWay Server Side Error.|
|11||Invalid Currency Type (Merchant is allowed only one currency - USD or KHR).|