Error codes
There are two types of errors: API request errors, and Payment errors. API request errors represent that the API invocation was not complete successfully for some reason. Although the API request succeeded, but if gateway processing such as charge or refund fails, payment error will occur.
API request errors
This errors represent that the API request was not accepted normally. API returns status code of 4xx or 5xx family.
HTTP Status | Description |
---|---|
400 Bad Requests | Invalid content of the request. Details are provided in the body error information. |
401 Unauthorized | Authentication failed. Authorization header is missing or has invalid content. |
403 Forbidden | Not enough permission to execute the request. |
404 Not Found | The specified path or resource does not exist. |
429 Too Many Requests | Exceeded the API Limits. |
500 Internal Server Error | Unexpected error occurred in our system. The processing may have been partially executed. |
In most case, detail error information is provided with the following JSON format:
status
(string) – Type of response (Usuallyerror
)code
(string) – Error codeerrors
– Array of following object:field
(optional, string) – Request parameter name where the error occurredreason
(string) – Detail reason of the error
Ex. when only HTTP Status code is provided:
HTTP/1.1 429 Too Many Requests
...
Content-Length: 0
Ex. when JSON error information that has only error code is provided:
HTTP/1.1 400 Bad Requests
...
Content-Type: application/json
...
{
status: "error",
code: "NON_UNIQUE_ACTIVE_TOKEN"
errors: []
}
Ex. when JSON error information with detail error reason and field name is provided:
HTTP/1.1 400 Bad Requests
...
Content-Type: application/json
...
{
status: "error",
code: "VALIDATION_ERROR"
errors: [{
field: "card_number"
reason: "INVALID_CARD_NUMBER"
}]
}
Ex. when JSON error information with detail error reason is provided:
HTTP/1.1 400 Bad Requests
...
Content-Type: application/json
...
{
status: "error",
code: "CHARGE_AMOUNT_TOO_LOW"
errors: [{
reason: "Charge amount must exceed 100"
}]
}
Error codes of API request errors
The error codes in the JSON error information are defined in the table below.
HTTP Status | Error codes | Description |
---|---|---|
400 | ALREADY_CAPTURED | The subject charge is already captured or not authorized successfully. |
400 | AUTH_NOT_SUPPORTED | Gateway that support authorization is not configured. |
400 | CANCEL_NOT_ALLOWED | This payment method is not support cancel. Or the state of this charge is not cancelable. For detail refer cancels. |
400 | CANNOT_CHANGE_CANCELED_SUBSCRIPTION | Canceled subscription can not be modified. |
400 | CANNOT_CHANGE_TOKEN | Transaction token of this state subscription can not be changed. For conditions that allow you to change the transaction token of subscription, see update a subscription. |
400 | CANNOT_REFUND_UNSUCCESSFUL_CHARGE | Charges other than successful state can not be refunded. |
400 | CAPTURE_AMOUNT_TOO_LARGE | Capture amount can not be larger than the amount when it was authorized. |
400 | CARD_BRAND_NOT_SUPPORTED | Gateway that support the requested card brand is not configured. |
400 | CARD_COUNTRY_NOT_SUPPORTED | Gateway that allow the requested card country is not configured. |
400 | CARD_PROCESSING_DISABLED | Card payments is disabled as payment type. |
400 | CHARGE_TOO_QUICK | Exceeded the usage limit of the recurring token. See (Recurring tokens). |
400 | CONVENIENCE_PROCESSING_DISABLED | Convienence is disabled as payment type. |
400 | CURRENCY_MUST_MATCH_CHARGE | Currency when refund must be the same as when it was charged. |
400 | CVV_REQUIRED | CVV required. |
400 | CVV_AUTHORIZATION_NOT_COMPLETED | CVV (security code) authentication failed. |
400 | FILE_INVALID_TYPE | MIME type of uploaded file is invalid. |
400 | FILE_MAX_SIZE_EXCEEDED | Uploaded file size is too large. |
400 | FORBIDDEN_IP | The country identified by the source IP is not in allowed countries. |
400 | INSTALLMENT_MAX_PAYOUT_PERIOD_EXCEEDED | The payment period of installment payment exceeds the max payout period. |
400 | INSTALLMENT_PAYMENT_TYPE_NOT_ALLOWED_FOR_PLAN | The payment type is not allowed as installment payment. |
400 | INSTALLMENT_INVALID_CYCLES_COUNT | The specified number of installments is not available. |
400 | INSTALLMENT_INVALID_PLAN | The installment plan is not supported. |
400 | INVALID_FORMAT_MERCHANT_TRANSACTION_ID | The merchant transaction ID provided was in an unacceptable format. |
400 | INVALID_PLATFORM | Specified platform is not valid. |
400 | INVALID_TOKEN_TYPE | Type of transaction token is wrong. |
400 | INVALID_QR_SCAN_GATEWAY | Gateway that support QR code payment is not configured or is not available. |
400 | LAST_NAME_REQUIRED | Last name is required. |
400 | LIVE_MODE_NOT_ENABLED_WHEN_UNVERIFIED | To use live mode, you need to be verified. |
400 | MERCHANT_TRANSACTION_ID_UNACCEPTED_FOR_BRAND | The brand to be used does not support the merchant_transaction_id field |
400 | NO_DIRECT_CURRENCY_GATEWAY | Gateway that support the requested currency is not configured. |
400 | NO_GATEWAYS_AVAILABLE | No gateway available. |
400 | NO_TEST_CARD_IN_LIVE_MODE | In live mode, Test card can not used. |
400 | NON_SUBSCRIPTION_PAYMENT | Use onetime token or recurring token when create a charge. |
400 | NOT_ONE_TIME_TOKEN | Other than onetime token is not supported. |
400 | NOT_SUBSCRIPTION_TOKEN | Use subscription token or recurring token. |
400 | PARTIAL_CAPTURE_NOT_SUPPORTED | Partial capture is not supported. |
400 | QR_PROCESSING_DISABLED | QR code payment is disabled as payment type. |
400 | RECURRING_TOKEN_DISABLED | The transaction token is disabled. Or the account does not have permission to use recurring token. |
400 | RECURRING_USAGE_LIMIT_REQUIRED | usage_limit is required. |
400 | RECURRING_USAGE_REQUIRES_CVV | CVV is required. |
400 | REFUND_EXCEEDS_CHARGE_AMOUNT | Refund amount can not be larger than charge amount. |
400 | REFUND_NOT_ALLOWED | This payment type is not support refund. Or this refund has been refused. |
400 | RESOURCE_LIMIT_REACHED | Exceeded the resource limits. |
400 | SUBSCRIPTION_ALREADY_ENDED | The subscription is already finished. |
400 | TOKEN_FOR_WRONG_STORE | The store of the transaction token is not the same as that of the subscription. |
400 | TRANSACTION_ALREADY_PROCESSED | Used transaction token can not be used. |
400 | TRANSACTION_TOKEN_EXPIRED | Transaction token expired. |
400 | USAGE_LIMIT_NOT_APPLICABLE | usage_limit is not applicable. |
400 | VALIDATION_ERROR | Invalid content of the request. Details are provided in the body error information |
401 | AUTH_HEADER_MISSING | Authorization header is missing. |
401 | EXPIRED_LOGIN_TOKEN | Login token expired. |
401 | INVALID_APP_TOKEN | Invalid application token. |
401 | INVALID_CREDENTIALS | Invalid crendential for authentication. |
401 | INVALID_DOMAIN | The domain of Origin header is not in the allowed domains of the application token. |
401 | INVALID_LOGIN_TOKEN | Invalid login token. |
403 | CARD_LOCKED | This card is temporarily locked because it exceeded the threshold of error count in a certain period. Fail more than 5 times within 30 minutes, and we will put a 2-hour limit. |
403 | INVALID_PERMISSIONS | Application token type is wrong. Or the account does not have permission. |
403 | INSTALLMENT_PROCESSOR_INITIAL_AMOUNTS_NOT_SUPPORTED | Gateway that support initial amount is not configured. |
403 | OUTDATED_APP_TOKEN | The version of application token is outdated. Please create a new application token. |
403 | TEST_CARD_CANNOT_BE_BANNED | Test card can not be banned. |
409 | IDEMPOTENCY_KEY_CONFLICT | The requested idempotency key is already used with other API or method. |
409 | NON_UNIQUE_ACTIVE_TOKEN | Active transaction token must be unique. |
409 | WEBHOOK_URL_EXISTS | Specified url is already registered. |
500 | COULD_NOT_REFRESH_AUTH | Failed to refresh login token, please contact support. |
500 | DB_ERROR | Internal database error, please contact support. |
500 | FILE_UPLOAD_ERROR | Failed to upload file, please contact support. |
500 | IMPROPER_AUTH | Improper authorization status, please contact support. |
500 | TIMEOUT | Timeout occurred in our internal processing, please contact support. |
500 | UNABLE_TO_GET_IDEMPOTENT_RESULT | The request was not processed because the cache identified by Idempotency-Key was found, but the previous result could not be retrieved from the cache. |
500 | UNKNOWN_ERROR | Unexpected error occurred, please contact support. |
503 | SERVICE_UNAVAILABLE_TRY_AGAIN | Service is unavailable temporary. Retry the request later. |
Detail reason of the error
Detail reason of the error specified reason
field is defined in the below table:
Reason | Description |
---|---|
CAPTURE_ONLY_FOR_CARD_PAYMENT | Authorization is only available when payment method is credit card. |
CAPTURE_ONLY_FOR_CREDIT_CARDS | Authorization is only available when card type is credit card. Debit card and prepaid card can not be used for authorization. |
CARD_LIMIT_EXCEEDED_FOR_STORE | Total amount by credit card within a certain period exceeded the configured limit. |
CHANGE_PROHIBITED | Change this field is prohibited. |
CHARGE_AMOUNT_TOO_HIGH | Charge amount is greater than the maximum charge amount. |
CHARGE_AMOUNT_TOO_LOW | Charge amount is lower than the minimum charge amount. |
DEPRECATED | This parameter is deprecated. |
EXPIRATION_DATE_OUT_OF_BOUNDS | Expiration is out of allowed range. |
FORBIDDEN_PARAMETER | Permission to use this parameter is not granted, or the requirement is not satisfied. |
INSTALLMENT_ALREADY_SET | Subscripiton is can not be change because it already started. |
INSTALLMENT_INVALID_PLAN_TYPE | Invalid installment plan type. |
INVALID_AMOUNT | Amount must be a number greater than 0. |
INVALID_CARD_BRAND | Unrecognized card brand. |
INVALID_CARD_DESCRIPTOR | Invalid descriptor format. |
INVALID_CARD_EXPIRATION | The card expired. |
REFUND_NOT_WITHIN_BOUNDS | Refund amount is not between 1 to the charge amount inclusive. |
INVALID_CARD_NUMBER | Invalid card number format. |
INVALID_CHARGE_STATUS | Invalid charge status. |
INVALID_CURRENCY | Unrecognized currency. |
INVALID_CVV | CVV must be between 3 to 5 digits. |
INVALID_FORMAT | Invalid format. |
INVALID_FORMAT_COUNTRY | Unrecognized country code. |
INVALID_FORMAT_CURRENCY | Unrecognized currency code. |
INVALID_FORMAT_DOMAIN | Invalid domain format. |
INVALID_FORMAT_EMAIL | Invalid email address format. |
INVALID_LANGUAGE | Unrecognized language code. |
INVALID_PHONE_NUMBER | Invalid phone number format. |
INVALID_SCHEDULED_CAPTURE_DATE | Capture date must be after 1 hour from now and within 7 days. |
INVALID_TIME_PERIOD | Unrecognized time period format. |
MUST_BE_FUTURE_TIME | It must be future time. |
MUST_BE_LOWER_THAN_FULL_AMOUNT | It must be lower than the full amount. |
MUST_BE_MONTH_BASED_TO_SET | Period must be monthly . |
NESTED_JSON_NOT_ALLOWED | Nested JSON format is not supported. |
NOT_SUPPORTED_BY_PROCESSOR | It is not supported by the gateway. |
ONLY_FOR_CARD_PAYMENT | This is available when the payment method is credit card. |
ONLY_JAPANESE_PHONE_NUMBER_ALLOWED | Only Japanese phone number is supported. |
REQUIRED_VALUE | Required value. |
Payment errors
Resources that handle money such as charge or refund may return error information if they fail. Payment errors contains the following information:
code
(number) – A unique key that can be used to match an error code.message
(string) – A short description of the errordetail
(string) – A longer description if available of the error.
The codes are defined in the table below.
Code | Description |
---|---|
301 | Invalid card number |
302 | Invalid card expiration month |
303 | Invalid card expiration year |
304 | Card expired |
305 | Invalid CVV |
306 | Card rejected |
307 | Invalid card |
308 | Invalid card data |
309 | Generic error, details will be included |
310 | Invalid user data |
311 | Too many charge requests for a single card within a short timespan |
312 | Cancel operation is unavailable |
313 | Charge expired (when capturing a charge) |
314 | Seize card |
315 | Contact card issuing bank |
316 | Last name required |
317 | Partial capture not supported |
318 | Partial refund not supported |
319 | Fraud suspected |
320 | Error on the bank end of the transaction |
321 | Dynamic descriptor is not supported |
322 | The barcode/QR code is invalid |
323 | The barcode/QR code is expired |
324 | The barcode/QR code has already been used |
325 | The barcode/QR code is currently in use |
326 | Rejected due to exceeding high risk threshold |
327 | Confirmation period has expired |
328 | Revert failed. Manual intervention required. |
329 | Refund failed |
330 | Insufficient funds in customer wallet |
331 | Invalid or missing metadata field value |
332 | Cross border transaction not allowed: Missing identity card |
333 | Cross border transaction not allowed: Missing phone number |
334 | Cross border transaction not allowed: Unaccepted payment method |
335 | Cross border transaction not allowed: Missing name |
336 | Transaction limit exceeded for payment type |
337 | Transaction limit exceeded for the merchant |
338 | Transaction not found |
339 | Duplicate transaction |
340 | Payment wallet was rejected by the gateway |
341 | Merchant is missing certain information required by the gateway |
342 | Cross border transaction not allowed: Unaccepted currency |
343 | Failed to process the payment due to a server error on the gateway |
344 | The payment selected is temporarily unavailable from the gateway |
345 | The payment was canceled |
346 | Payment took too long to start processing due to internal system latency and was canceled. Please retry the payment. |
355 | The selected payment type is not supported by the payment method |
Code | Description |
---|---|
500 | A preprocessing error occurred when attempting to execute the transaction. Please confirm that the correct inputs have been provided and refer to the error message for further details. |
501 | An internal error has occurred. Please contact your support representative for follow up. |
502 | The transaction was attempted but the payment provider did not respond in a timey manner and timed out. The charge will not be reattempted. |
Customs declaration errors
The customs declaration resource may return error information if it fails. Custom declaration errors contains the following information:
code
(number) – A unique key that can be used to match an error code.message
(string) – A short description of the errordetail
(string) – A longer description if available of the error.
The codes are defined in the table below.
Code | Description |
---|---|
601 | A system released error occurred on Univapay, see the details field for specific information. |
602 | The payment processor rejected the submitted request, see the details field for specific information. |
603 | The identity of the customer submitted was rejected by the customs authority. |
604 | The required identity information of the customer was not submitted by the merchant. |