[{"data":1,"prerenderedAt":161},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fstatus-codes":3,"docs-nav":125,"docs-order":151},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"body":10,"_type":119,"_id":120,"_source":121,"_file":122,"_stem":123,"_extension":124},"\u002Fdocs\u002Fstatus-codes","docs",false,"","Status codes","Every Syok2Pay response carries a status_code (and, on the HTTP layer, a\nmatching status). Use the status_code — not the HTTP status alone — to decide\nwhat to do next. Each row below tells you what happened and what to do.",{"type":11,"children":12,"toc":115},"root",[13,21,58,63,70,102],{"type":14,"tag":15,"props":16,"children":18},"element","h1",{"id":17},"status-codes",[19],{"type":20,"value":8},"text",{"type":14,"tag":22,"props":23,"children":24},"p",{},[25,27,34,36,41,43,49,51,56],{"type":20,"value":26},"Every Syok2Pay response carries a ",{"type":14,"tag":28,"props":29,"children":31},"code",{"className":30},[],[32],{"type":20,"value":33},"status_code",{"type":20,"value":35}," (and, on the HTTP layer, a\nmatching status). Use the ",{"type":14,"tag":28,"props":37,"children":39},{"className":38},[],[40],{"type":20,"value":33},{"type":20,"value":42}," — not the HTTP status alone — to decide\nwhat to do next. Each row below tells you ",{"type":14,"tag":44,"props":45,"children":46},"strong",{},[47],{"type":20,"value":48},"what happened",{"type":20,"value":50}," and ",{"type":14,"tag":44,"props":52,"children":53},{},[54],{"type":20,"value":55},"what to do",{"type":20,"value":57},".",{"type":14,"tag":59,"props":60,"children":62},"status-table",{":groups":61},"[{\"label\":\"Success\",\"tone\":\"success\",\"intro\":\"The request was accepted. For PENDING, the final result arrives later via callback or inquiry.\",\"rows\":[{\"code\":\"SUCCESS\",\"http\":200,\"desc\":\"Request completed successfully.\",\"action\":\"Proceed — read data from the response body.\"},{\"code\":\"PENDING\",\"http\":200,\"desc\":\"Accepted; awaiting the bank or payment provider.\",\"action\":\"Wait for the callback, or poll Inquiry. Do not re-initiate.\"}]},{\"label\":\"Validation & parameters\",\"tone\":\"client\",\"intro\":\"The request was rejected before processing. Fix the request and send it again.\",\"rows\":[{\"code\":\"PARAM_MISSING\",\"http\":400,\"desc\":\"A required field is missing.\",\"action\":\"Add the missing field (e.g. amount, currency) and retry.\"},{\"code\":\"PARAM_INVALID\",\"http\":400,\"desc\":\"A field value is invalid.\",\"action\":\"Check the format — amount is a 2-dp string, currency is an ISO code.\"},{\"code\":\"INVALID_AMOUNT\",\"http\":400,\"desc\":\"The amount is not a valid positive value.\",\"action\":\"Send amount as a positive decimal string, e.g. \\\"3.00\\\".\"},{\"code\":\"INVALID_CURRENCY\",\"http\":400,\"desc\":\"The currency is missing or unsupported.\",\"action\":\"Use a supported currency code such as MYR.\"},{\"code\":\"DUPLICATE_REFERENCE\",\"http\":400,\"desc\":\"This reference_no was already used.\",\"action\":\"Use a unique reference_no per order. Reusing one is treated as a duplicate.\"},{\"code\":\"FUNCTION_NOT_SUPPORTED\",\"http\":400,\"desc\":\"The operation isn't available for this product or channel.\",\"action\":\"Check the product's capabilities or pick a supported payment method.\"}]},{\"label\":\"Authentication\",\"tone\":\"auth\",\"intro\":\"The request could not be authenticated. These never succeed on retry until the credentials or signature are corrected.\",\"rows\":[{\"code\":\"UNAUTHORIZED\",\"http\":401,\"desc\":\"Missing or invalid API key.\",\"action\":\"Send the Authorization header as 'Bearer pk_…'.\"},{\"code\":\"INVALID_SIGNATURE\",\"http\":401,\"desc\":\"The X-Signature did not match.\",\"action\":\"Rebuild the signing string, sign with your secret key, and check X-Timestamp is fresh.\"},{\"code\":\"INVALID_API_KEY\",\"http\":401,\"desc\":\"The API key is not recognised.\",\"action\":\"Verify the key and that your merchant account is active.\"},{\"code\":\"EXPIRED_API_KEY\",\"http\":401,\"desc\":\"The API key has expired.\",\"action\":\"Generate a new key in the merchant dashboard.\"},{\"code\":\"FORBIDDEN\",\"http\":403,\"desc\":\"Authenticated, but not allowed to access this resource.\",\"action\":\"Ensure merchant_code matches your account and you own the transaction.\"},{\"code\":\"IP_NOT_ALLOWED\",\"http\":403,\"desc\":\"Your server IP is not whitelisted.\",\"action\":\"Add the calling IP to your merchant IP allowlist.\"},{\"code\":\"MERCHANT_INACTIVE\",\"http\":403,\"desc\":\"The merchant account is inactive or suspended.\",\"action\":\"Contact support to reactivate the account.\"}]},{\"label\":\"Not found\",\"tone\":\"notfound\",\"intro\":\"The referenced resource does not exist (or is no longer retrievable).\",\"rows\":[{\"code\":\"SESSION_NOT_FOUND\",\"http\":404,\"desc\":\"No session matches that session_id.\",\"action\":\"Check the session_id; create a new session if it has been purged.\"},{\"code\":\"TRANSACTION_NOT_FOUND\",\"http\":404,\"desc\":\"No transaction matches that id.\",\"action\":\"Verify the txn_id, or look it up via Inquiry using your reference_no.\"},{\"code\":\"INVALID_MERCHANT\",\"http\":400,\"desc\":\"The merchant_code is unknown.\",\"action\":\"Confirm the merchant_code is correct and registered.\"},{\"code\":\"INVALID_PRODUCT\",\"http\":400,\"desc\":\"The product_code is unknown or not linked to you.\",\"action\":\"Use a valid product_code that is enabled for your account.\"}]},{\"label\":\"Session & transaction state\",\"tone\":\"state\",\"intro\":\"The resource exists but its current state does not allow this operation. Check the state first, then act.\",\"rows\":[{\"code\":\"SESSION_EXPIRED\",\"http\":400,\"desc\":\"The session passed its expiry time.\",\"action\":\"Create a new session — sessions are short-lived.\"},{\"code\":\"SESSION_COMPLETED\",\"http\":400,\"desc\":\"The session is already paid.\",\"action\":\"Do not reuse it; start a new session for a new payment.\"},{\"code\":\"SESSION_CANCELLED\",\"http\":400,\"desc\":\"The session was cancelled.\",\"action\":\"Create a new session if the customer wants to retry.\"},{\"code\":\"VOID_NOT_ALLOWED\",\"http\":400,\"desc\":\"This transaction can't be voided in its current state.\",\"action\":\"Only authorised or pending transactions can be voided.\"},{\"code\":\"REFUND_NOT_ALLOWED\",\"http\":400,\"desc\":\"This transaction can't be refunded in its current state.\",\"action\":\"Only captured transactions can be refunded.\"}]},{\"label\":\"Payment declined\",\"tone\":\"declined\",\"intro\":\"The payment was attempted but not completed. The customer usually needs to take action.\",\"rows\":[{\"code\":\"PAYMENT_FAILED\",\"http\":400,\"desc\":\"Payment processing failed.\",\"action\":\"Let the customer retry; create a new session if needed.\"},{\"code\":\"PAYMENT_DECLINED\",\"http\":400,\"desc\":\"The bank or provider declined the payment.\",\"action\":\"Ask the customer to try another card, bank, or method.\"},{\"code\":\"PAYMENT_CANCELLED\",\"http\":400,\"desc\":\"The customer cancelled at the payment page.\",\"action\":\"Offer a new session to try again.\"}]},{\"label\":\"Server & transient\",\"tone\":\"server\",\"intro\":\"Something went wrong on our side, or a dependency was briefly unavailable. These are safe to retry idempotently with the same reference_no.\",\"rows\":[{\"code\":\"INTERNAL_ERROR\",\"http\":500,\"desc\":\"Unexpected server error.\",\"action\":\"Retry with backoff; if it persists, contact support with the trace_id.\"},{\"code\":\"BACKEND_UNAVAILABLE\",\"http\":503,\"desc\":\"The payment processor is unreachable.\",\"action\":\"Retry after 30–60s; check the status page.\"},{\"code\":\"TIMEOUT\",\"http\":504,\"desc\":\"The backend did not respond in time.\",\"action\":\"Retry idempotently using the same reference_no.\"}]}]",[],{"type":14,"tag":64,"props":65,"children":67},"h2",{"id":66},"retrying-safely",[68],{"type":20,"value":69},"Retrying safely",{"type":14,"tag":22,"props":71,"children":72},{},[73,75,86,88,93,95,100],{"type":20,"value":74},"Always retry with the ",{"type":14,"tag":44,"props":76,"children":77},{},[78,80],{"type":20,"value":79},"same ",{"type":14,"tag":28,"props":81,"children":83},{"className":82},[],[84],{"type":20,"value":85},"reference_no",{"type":20,"value":87},". Initiate is idempotent on\n",{"type":14,"tag":28,"props":89,"children":91},{"className":90},[],[92],{"type":20,"value":85},{"type":20,"value":94},", so a retried request returns the original session instead of\ncreating a duplicate charge. Only ",{"type":14,"tag":44,"props":96,"children":97},{},[98],{"type":20,"value":99},"Server & transient",{"type":20,"value":101}," errors should be\nretried automatically — use exponential backoff (1s, 2s, 4s…).",{"type":14,"tag":22,"props":103,"children":104},{},[105,107,113],{"type":20,"value":106},"Every error response also includes a ",{"type":14,"tag":28,"props":108,"children":110},{"className":109},[],[111],{"type":20,"value":112},"trace_id",{"type":20,"value":114},". Include it when contacting\nsupport so we can find the exact request in our logs.",{"title":7,"searchDepth":116,"depth":116,"links":117},2,[118],{"id":66,"depth":116,"text":69},"markdown","content:docs:9.status-codes.md","content","docs\u002F9.status-codes.md","docs\u002F9.status-codes","md",[126,129,132,135,138,141,144,145,148],{"_path":127,"title":128},"\u002Fdocs\u002Fauthentication","Authentication",{"_path":130,"title":131},"\u002Fdocs\u002Fcallbacks","Callbacks",{"_path":133,"title":134},"\u002Fdocs\u002Fgetting-started","Getting started",{"_path":136,"title":137},"\u002Fdocs\u002Finitiate","Initiate",{"_path":139,"title":140},"\u002Fdocs\u002Finquiry","Inquiry",{"_path":142,"title":143},"\u002Fdocs\u002Frefund","Refund",{"_path":4,"title":8},{"_path":146,"title":147},"\u002Fdocs\u002Fvoid","Void",{"_path":149,"title":150},"\u002Fdocs\u002Fwoocommerce","WooCommerce",[152,153,154,155,156,157,158,159,160],{"_path":133,"title":134},{"_path":127,"title":128},{"_path":136,"title":137},{"_path":139,"title":140},{"_path":142,"title":143},{"_path":146,"title":147},{"_path":4,"title":8},{"_path":130,"title":131},{"_path":149,"title":150},1780230577967]