• English
  • Create Order

    Request Path

    /api/v2/payment/merchant/createorder

    Parameter List

    NameTypeLengthRequiredDescription
    orderIdString32YesThe unique Order Number of the merchant, which can be used to query transaction results.
    titleString100NoOrder title
    descriptionString200NoOrder description
    userIdString50NoThe unique id of the user on the merchant platform.
    userMobileNoString15NoUser's mobile phone number will be displayed on the cashier page default. Support multiple formats e.g. 07011698742 or 7011698742 or 023307011698742 or 02337011698742 Area code format
    customerInfoString-NoJSON string format, see: Customer information(CustomerInfo); some fields are required for Pakistan
    amountLong-YesTransaction amount (Unit of measurement: cent; For example, "100" means 1 GHS) Minimum amount: 100
    currencyString10YesCurrency Code(GHS/TZS/KES/PKR)
    accessModeString-NoAccess mode If using the PalmPay checkout page, pass 'redirect' ; If not using the PalmPay checkout page, pass 'direct' ; If accessMode is 'direct', payer information is required, and for Pakistan you must evoke the wallet app during the payment process (see Evoke Wallet Parameters); If not passed, defaults to 'redirect'
    allowedWalletString-NoJSONArray string format, Wallets displayed on the checkout; if not passed, all are displayed. See Wallet List.
    payerString-NoPayer JSON string format, see: Payer (accountNo required, bankCode required for some countries. contact us for details)
    notifyUrlString200YesNotification url to receive transaction result
    callBackUrlString200YesAfter the payment is completed, the H5 page returns the url specified by the merchant
    orderExpireTimeInteger-NoOrder validity period duration. (Unit: seconds) The expiration time of unpaid orders. Default value: 1800s (30mins) Interval: 1800s ≤ orderExpireTime ≤ 86400s (Maximum 24 hours, minimum 30mins)
    goodsDetailsString-Yes/NoJSONArray string format, see:Goods Detail;required for global merchants
    remarkString200NoRemarks
    productTypeString100YesFixed transfer MMO
    splitDetailString100NoSplit Payments,If an account is to be divided, it is required(Only support Ghana)

    Considerations

    1. For Pakistan checkouts, if the checkout page is opened via web view, please ensure that wallet provider is configured into the whitelist.

    Return Value

    NameTypeLengthRequiredDescription
    orderNoString32YesPalmPay platform Order No.
    orderStatusInteger20YesOrder Status(seeOrder Status)
    messageString50YesStatus description
    checkoutUrlString200YesURL that pull up the H5 payment
    currencyString10YesCurrency (GHS/TZS/KES/PKR)
    orderAmountLong-YesTransaction amount

    Error Code

    Error Code

    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: GH' \
    --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",
        "accessMode":"redirect",
        "title":"pay",
        "description": "pay some thing",
        "userId":"110",
        "currency": "GHS",
        "callBackUrl": "http://returnurl",
        "goodsDetails": "[{\"goodsId\": \"1\"}]",
        "productType":"mmo",
        "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": 0,
        "message": "success",
        "checkoutUrl": "https://openapi.transspay.net/open-api/api/v1/payment/h5/redirect?orderNo=2424220903032435363613&userId=110&sign=18FC68963B01E5B2EBE71A59F5D70AE70D66D4798F11B1632B08B4EB084948DC&key=4cca233f40b1dfb1b4600c7dfdaf3ee2",
        "orderAmount": 200,
        "currency": "NGN",
        "payerBankName": "PalmPay",
        "payerVirtualAccNo": "8754982724",
        "payerAccountName": "testMerchantName(Pay NGN 2.00)"
      }
    }