We use cookies to optimize your user experience. All information shared with us through cookies is secure and covered by our data privacy obligations. To learn more, view our privacy policy.
KongaPay Logo
KongaPayDevelopers
DevelopersPayment GatewaySDK Callback Response

SDK Callback Response

When callback is a function name, the SDK calls it as callback(error, data).

Success

json
{
  "code": "00",
  "status": "success",
  "message": "Payment Successful",
  "merchant_reference": "ORDER-100001"
}

Failure

json
{
  "code": "E01",
  "status": "failed",
  "message": "Payment failed",
  "merchant_reference": "ORDER-100001"
}

Canceled

json
{
  "code": "E02",
  "status": "canceled",
  "message": "Transaction Canceled",
  "merchant_reference": "ORDER-100001"
}
⚠️
If callback is a URL, the SDK redirects to that URL with query parameters. Always verify final status server-side after receiving the callback.