Use this to get the detailed information about the payment transaction. This includes the payment option which was used by the customer.

URL

/api/order

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.

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.

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

QueryPaymentDetailsResponse - [JSON]


Example

Request

GET /<path>/api/order?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

{ "id": { "uuid": "dc332ac8a45e452eb7543e059c586126" }, "paymentStatus": "CONFIRMED", "order": { "id": { "uuid": "dc332ac8a45e452eb7543e059c586126" }, "merchantId": { "uuid": "ff1d61e12b4b42a19a2f50d899718939" }, "orderDate": "2018-11-25T14:47:03.597+0000", "totalAmount": 200000, "description": "Order for electronics", "merchantReference": "abc123456", "email": "maviance.akongnwi.devert@gmail.com", "phoneNumber": "+237653754334", "customerName": "Che Devert", "currency": "XAF", "items": [ { "itemId": "12", "particulars": "Samsung Galaxy s6", "quantity": 2, "unitCost": 75000, "subTotal": 150000 }, { "itemId": "14", "particulars": "Sony TV HD12", "quantity": 1, "unitCost": 50000, "subTotal": 50000 } ], "langKey": "en", "expiryDate": "2018-11-25T14:47:03.597+0000", "receiptUrl": "www.myshop.com",
"optRefOne": "myRef1",
"optRefTwo": "myRef2",
"payerAccountName": "Akongnwi Che",
"payerAccountNumber": "237653754334",
"paymentDate": "2020-11-16T11:44:07.898Z",
"paymentProviderId": "23808da977",
"paymentProviderName": "mtn",
}}

Data Types

In addition to the Input Data Types of the Order Placement Request, following data will be returned:

Name

Type

Description

paymentStatus

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.

paymentDate

string

The date when the payment was confirmed. Format: SO-8106 like "1970-01-01T00:00:00.000+0000"

paymentProviderName

string

The name of the payment option or provider which was used for processing the payment.

paymentProviderId

String

The unique identifier of the payment provider.

Id

String

The transaction Id of this payment.

payerAccountName

String

The account name of the person who did the actual payment

payerAccountNumber

String

The account number of the person who did the actual payment