#Create order
#Request Path
/api/v2/payment/merchant/createorder#Parameter List
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| orderId | String | 32 | Yes | The unique Order Number of the merchant, which can be used to query transaction results |
| title | String | 100 | No | Order title |
| description | String | 200 | No | Order description |
| amount | Long | - | Yes | Transaction amount (Unit of measurement: cent; For example, "100" means 1 NGN) Minimum amount: 100 |
| currency | String | 10 | Yes | Currency (NGN/GHS/TZS/KES/ZAR/PKR) |
| notifyUrl | String | 200 | Yes | Receive transaction result notification url |
| callBackUrl | String | 200 | Yes | After the payment is completed, the H5 page returns the url specified by the merchant. |
| orderExpireTime | Integer | - | No | Order validity period duration. (Unit: seconds) The expiration time of unpaid orders. Default value: 1800s (30mins) Interval: 1800s ≤ orderExpireTime ≤ 86400s (Maximum 24 hours, minimum 30mins) |
| goodsDetails | String | - | Yes/No | JSONArray string format, see:Product details (GoodsDetail) ;required for global merchants |
| customerInfo | String | - | No | JSON string format, see:Customer information (CustomerInfo) ; some fields are required for Pakistan |
| remark | String | 200 | No | Remarks |
| splitDetail | String | - | No | JSON string format, see:Split Documents,If an account is to be divided, it is required |
#Return Value
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| orderNo | String | 32 | Yes | PalmPay platform Order No. |
| orderStatus | Integer | 20 | Yes | Order status (see order Status ) |
| message | String | 50 | No | Status description |
| checkoutUrl | String | 200 | Yes | Pull up the H5 payment url |
| payToken | String | 200 | Yes | Parameters required to pull up SDK payment |
| sdkSessionId | String | 32 | Yes | Parameters required to pull up the SDK using a secure dynamic key |
| sdkSignKey | String | 32 | Yes | Parameters required to pull up the SDK using a secure dynamic key |
| currency | String | 10 | Yes | Currency (NGN/GHS/TZS/KES/ZAR) |
| orderAmount | Long | - | Yes | Transaction amount (Unit of measurement: cent; For example, "100" means 1 NGN) Minimum amount: 100 |
#Error Codes
#Postman Example
#Request
curl --location 'https://open-gw-sandbox.palmpay-inc.com/api/v2/payment/merchant/createorder' \
--header 'Accept: application/json, text/plain, */*' \
--header 'CountryCode: NG' \
--header 'Authorization: Bearer 10241024' \
--header 'Signature: D11A3E8CB478C0B0F40276DDA5AFD898' \
--header 'Content-Type: application/json' \
--data '{
"requestTime":1662171389940,
"version":"V1.1",
"nonceStr":"IBJGAeTa4ZJQv4Z2qufomVo9eI1YnJ9Y",
"amount":200,
"notifyUrl":"https://xx.cn/callback/payment",
"orderId":"testc9ffae997fc1",
"title":"pay",
"description": "pay some thing",
"currency": "NGN",
"callBackUrl": "http://returnurl",
"goodsDetails": "[{\"goodsId\": \"1\"}]",
"customerInfo": "{\"userId\":\"1231231\",\"userName\":\"testxz\",\"phone\":\"07011698742\",\"email\":\"test@test.com\"}",
"remark": "test",
"splitDetail": "{\"isSplit\":true,\"splitAmountType\":1,\"splitFeeType\":1,\"splitMerchantList\":[{\"splitMerchantId\":\"A\",\"splitAmount\":100,\"remark\":\"\"},{\"splitMerchantId\":\"B\",\"splitAmount\":100,\"remark\":\"\"}]}"
}'#Response
{
"respCode": "00000000",
"respMsg": "success",
"data": {
"orderNo": "2424220903032435363613",
"orderStatus": 1,
"message": "success",
"checkoutUrl": "https://openapi.transspay.net/open-api/api/v1/payment/h5/redirect?orderNo=2424220903032435363613&userId=110&sign=18FC68963B01E5B2EBE71A59F5D70AE70D66D4798F11B1632B08B4EB084948DC&key=4cca233f40b1dfb1b4600c7dfdaf3ee2",
"payToken": "eyJvcmRlck5vIjoiMjQyNDIyMDkwMzAzMjQzNTM2MzYxMyIsInVzZXJJZCI6IjExMCIsInNpZ24iOiIxOEZDNjg5NjNCMDFFNUIyRUJFNzFBNTlGNUQ3MEFFNzBENjZENDc5OEYxMUIxNjMyQjA4QjRFQjA4NDk0OERDIiwia2V5IjoiNGNjYTIzM2Y0MGIxZGZiMWI0NjAwYzdkZmRhZjNlZTIifQ==",
"sdkSessionId":"3032435363613",
"sdkSignKey": "110",
"orderAmount": 200,
"currency": "NGN"
}
}