Skip to main content

Error Codes

The response_code field in API responses uses the codes below. Some codes apply to specific APIs only, noted in the "Applies to" column.

Common Error Codes (All APIs)​

CodeMessageDescriptionApplies to
200SuccessRequest processed successfullyAll
101System ErrorUnexpected error on Baokim's sideAll
110Invalid Merchant Codemerchant_code is undefined or not permittedAll
120Invalid SignatureHeader Signature is invalidAll
422Validation ErrorRequest field is missing or invalidAll
429Too Many RequestsMerchant exceeded rate limitAll

API-Specific Error Codes​

Get FX Quote​

CodeMessageDescription
404Currency Not SupportedRequested foreign currency is not in Merchant's configuration
423FX Rate Temporarily UnavailableNo reliable rate available at this time

Specific validation rules:

  • Missing VND in currency pair → code 422
  • trade_type does not match direction (SELL with foreign→VND, BUY with VND→foreign) → code 422
  • amount ≤ 0 or not integer when fixed_side specifies VND side → code 422

Create Conversion​

CodeMessageDescription
425Quote Not Found, Expired, or Not Belonging to Merchantquote_id does not exist, beyond expires_at, or does not belong to this merchant
426Quote Already Usedquote_id was already executed successfully (single-use constraint)
427Insufficient BalanceMerchant does not have enough source currency to execute the conversion
428Amount/Currency Mismatch with Quotefrom_currency or from_amount does not match the quote

Note: Timeout or connection loss when calling this API does not mean the order failed. Use Get Conversion Detail to determine the final status.

Get Conversion Detail​

CodeMessageDescription
430Conversion Order Not FoundOrder not found with provided conversion_id or origin_request_id

Timeout recovery: If querying by origin_request_id returns code 430 = the original order was not recorded on Baokim's side. Merchant can safely retry Create Conversion with the same request_id.

Get Historical Rate​

CodeMessageDescription
404Currency Not SupportedRequested foreign currency is not in Merchant's configuration
416Invalid Date Rangeto_date < from_date, span > 30 days, or to_date > today