Response Handling

The API can return an HTTP success response while the payment result inside the response body still indicates a processor decline.

Always inspect both:

LayerWhat to check
HTTP statusWhether the API request was accepted and processed by the API.
response_codeWhether the transaction succeeded or declined during processing.

Common HTTP statuses

HTTP statusMeaning
200Request accepted. Inspect response_code in the body.
400Validation error or processing error.
401Missing or invalid X-Api-Key.
403API key is valid but does not have permission for this operation.
500Processing-side error. Retry later or contact support if it persists.

Common response codes

response_codeMeaning
100Charge processed successfully.
200Processor declined the charge. Inspect gateway response fields when available.

Example successful response

{
  "order_id": "700201",
  "response_code": 100
}

Example declined response

{
  "order_id": "700202",
  "response_code": 200,
  "gateway_response_code": "202",
  "gateway_response_description": "Insufficient funds"
}

Best practice

Store the API response together with your original tracking2 value. When a postback arrives later, use clickID, orderID, and transactionID to update the same order record.