Used to query the payment transaction status.

URL

/api/order/status

HTTP method

GET


Request


Content-Type

none

Query Params

txid - the unique transaction id returned as response of the Order Placement call. Provide this parameter or the orderMerchantId parameter to query the status.

Query Params

orderMerchantId - the reference id generated by your system for this transaction which is also the merchantReference sent in the POST /api/order request. Provide this parameter or the txid parameter to query the status.

Header Params

Authorization: Bearer <access token>

Body

none


Response


Content-Type

application/json

Status Code

  • 200 - OK

Error Codes

  • 400 - [Bad Request] Parameters are not valid.
  • 401 - [Unauthorised]
  • 403 - [Forbidden] User didn't provide the right credentials.
  • 404 - [Not Found] Payment transaction with the given transaction id does not exist.
  • 500 - [InternalServerError] Internal server error.

Body

QueryPaymentStatusResponse - [JSON]


Example

Request

GET /<path>/api/order/status?orderMerchantId=abc123456 HTTP/1.1
Host: <host>
Authorization: Bearer 3ab8b859e58ef8528b169c86af2ca
Accept: application/json


Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
   "status": "CREATED"
}

Data Types

Output Data Types

Name

Type

Description

Status

string

Possible values:
CONFIRMED - When the payment was successful and confirmed by the payment provider.
IN_PROGRESS - When the payment was submitted to the payment provider and no confirmation is received yet.
FAILED - The payment failed to be completed by the payment provider.
CANCELED - The payment was cancelled either by the payment provider or due to expiration. Please note the expiration of a payment depends on the payment provider.
CREATED - The payment order was created by the Order Placement call.
INITIALISED - The customer has been redirected to the e-nkap payment option portal successfully.