Getting Started
Before using the API in the development environment, partners must submit a list of public IP addresses to be whitelisted. Once the whitelist is approved, we will provide a development API key, password, client ID, and client secret.
The API key must be included in the X-PARTNER-ID header for every request,
while the password must be supplied as a required parameter for payment endpoints
or any other endpoints that require it.
To obtain an access token, use Basic Authentication with the client ID as the username
and the client secret as the password. Once the access token is obtained,
it must be included in the Authorization
header of subsequent API requests
using the format: Bearer <access_token>
.
For the production environment, partners will be asked again to submit their server’s public IP addresses for whitelisting. After approval, we will issue a new API key, password, client ID, and client secret specific to the partner’s production server.
Below is a list of response codes from the Singapay team. The term response code refers to the value of the response_code key in our API. The description shown corresponds to the default value of response_text. However, this description may vary depending on the API context or implementation and should not be relied upon as a fixed reference. When handling API responses, you should focus primarily on the response_code, as it remains consistent and serves as the main indicator for processing the response correctly.
Type | Code | Description |
---|---|---|
success | 00 | Operation completed successfully |
pending | 01 | Operation is pending confirmation or in progress |
canceled | 02 | Operation was canceled by the user or system |
unknown | 03 | Unknown error occurred |
invalid_argument | 04 | Invalid input or parameters provided |
deadline_exceeded | 05 | Operation timed out before completion |
not_found | 06 | Requested resource or endpoint not found |
already_exists | 07 | Resource already exists |
permission_denied | 08 | Permission denied to perform the operation |
resource_exhausted | 09 | Resource limit reached or quota exceeded |
failed_precognition | 10 | System state does not allow this operation |
aborted | 11 | Operation aborted due to conflict or concurrency issue |
out_of_range | 12 | Input value is outside the allowed range |
unimplemented | 13 | Operation is not implemented or supported |
univailable | 14 | Service is temporarily unavailable |
data_loss | 15 | Critical data loss or corruption occurred |
unauthenticated | 16 | Authentication failed or missing credentials |
insufficient_balance | 17 | Insufficient balance to complete the operation |
customer_not_found | 20 | Customer number is incorrect, blocked, or expired |
bill_already_paid | 21 | Bill has already been paid |
biller_side_error | 22 | An error occurred on the biller side |
transaction_refund | 50 | Transaction will be refunded or has already been refunded |
transaction_already_success | 51 | Transaction has already been marked as successful |
general_service_error | 89 | Temporary issue with service provider, try again later |
internal | 99 | Internal system error occurred |