Post a payment transaction on e-nkap.

URL

/api/order

HTTP method

POST


Request


Content-Type

application/json

Path Params

none

Query Params

none

Header Params

Authorization: Bearer <access token>

Body

OrderPlacementRequest - [JSON]


Example

Request

POST /<path>/api/order HTTP/1.1
Host: <host>
Authorization: Bearer 3ab8b859e58ef8528b169c86af2ca
Accept: application/json
Content-Type: application/json; charset=UTF-8
Content-Length: 558
{
"currency": "XAF",
"customerName": "Che Devert",
"description": "Order for electronics",
"email": "maviance.akongnwi.devert@gmail.com",
"expiryDate": "2018-11-25T14:47:03.597Z",
"id": {
"uuid": "45auf-dj76x-78dhg",
"version": "1.0"
},
"items": [
{
"itemId": "12",
"particulars": "Samsung Galaxy s6",
"quantity": 2,
"subTotal": 150000,
"unitCost": 75000
},
{
"itemId": "14",
"particulars": "Sony TV HD12",
"quantity": 1,
"subTotal": 50000,
"unitCost": 50000
}
],
"langKey": "en",
"merchantReference": "abc123456",
"orderDate": "2018-11-25T14:47:03.597Z",
"phoneNumber": "+237653754334",
"receiptUrl": "www.myshop.com",
"totalAmount": 200000,
"optRefOne": "myRef1",
"optRefTwo": "myRef2"

}


Response

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8

{ "orderTransactionId": "dc332ac8a45e452eb7543e059c586126", "merchantReferenceId": "abc123456", "redirectUrl": "https://payment.enkap.cm/payment/ui/auth?stxid=dc332ac8a45e452eb7543e059c586126"}

Data Types

Input Data Types:

Name

Type

Required

Maximum Length

Description

id

object

N


id of the transaction generated by your system

id.uuid

string

N


uuid of the transaction generated by your system

id.version

string

N


version generated by your system for this transaction

langKey

string

N,
default: en

2

The language key used in the payment option portal. It corresponds to the ISO-2 language. Current supported language keys: en, fr

description

string

N

100

The description of the order.

totalAmount

Float

Y


The total amount of the order.

Email

string

N


Email of the customer.

phoneNumber

string

N


Phone number of the customer.

customerName

string

N

50

The name of the customer.

currency

enum [XAF]

Y

3

The ISO-3 code of the currency

expiryDate

Date

N,
default: 7 days


The date when the transaction will expire if the customer does not complete the payment. Date should be formatted based on ISO-8106 like "1970-01-01T00:00:00.000+0000"

orderDate

Date

N


The date of the order. e-nkap will generate one automatically using current date and time if not provided.

merchantReference

string

Y

36

This is the unique reference id of the shop. This will be used to query the status of the payment later on.

Items

List

N



itemId

string

N

36

The unique id of the purchased item.

particulars

string

N

50

Description of the item.

unitCost

Float

N


Cost per unit of the purchased item.

Quantity

Integer

N


Quantity purchased.

Subtotal

Float

N


The subtotal of the line of items.

receiptUrl

string

N


Url of receipt

optRefOne

string

N


Optional order reference

optRefTwo

string

N


Optional order reference


Output Data Types:

Name

Type

Description

orderTransactionId

string

The tracking id of the transaction. This should be used for any query related API. For example, query the status of the payment.

merchantReferenceId

string

The unique reference id created by your system and provided in the request.

redirectUrl

string

The URL where to redirect the customer browser.