• 简体中文
  • 创建订单

    请求接口路径

    /api/v2/payment/merchant/createorder

    参数列表

    名称类型长度必填描述
    orderIdString32是商户唯一订单号,可用于查询交易结果
    titleString100否订单标题
    descriptionString200否订单描述
    amountLong-是交易金额(精确到分,如“100”代表1 NGN) 最小金额:100
    currencyString10是货币代码(NGN、GHS、TZS、KES、ZAR、PKR)
    notifyUrlString200是接收交易结果通知url
    callBackUrlString200是支付完成后H5页面返回商户指定url地址
    orderExpireTimeInteger-否订单有效期时长,单位:秒 即未付款订单的过期时间,默认值:1800(30mins) 区间:1800s≤orderExpireTime≤86400s (最长不为24小时,最短为30mins)
    goodsDetailsString-是/否JSONArray string格式,详见:商品详情列表(GoodsDetail);国际客户必填
    customerInfoString-否JSON string格式,详见:客户信息(CustomerInfo);若为巴基斯坦收单,部分信息必填
    remarkString200否备注信息
    splitDetailString-否JSON string格式,详见:分账详情,如果需要分账,则必填
    extraFieldListString-否扩展字段,JSON array格式,列表最大长度为5,会在订单详情页及订单导出中展示

    返回值

    名称类型长度必填描述
    orderNoString32是PalmPay平台订单号
    orderStatusInteger20是订单状态(见订单状态)
    messageString50否状态描述信息
    checkoutUrlString200是拉起H5支付的url
    payTokenString200是拉起SDK支付需要的参数
    sdkSessionIdString32是安全动态秘钥拉起SDK所需参数
    sdkSignKeyString32是安全动态秘钥拉起SDK所需参数
    currencyString10是货币代码(NGN、GHS、TZS、KES、ZAR)
    orderAmountLong-是交易金额(最小单位计量)

    错误码

    参见此文

    Postman请求示例

    Endpoint
    POSThttps://open-gw-sandbox.palmpay-inc.com/api/v2/payment/merchant/createorder
    ▾Header(5)
    CountryCodestring可填required
    Authorizationstring可填required
    Content-Typestring固定
    application/json
    Signaturestring固定
    <signed>
    App_idstring可填required
    ▾Body(13)
    requestTimetimestamp固定
    __now__
    versionstring可填
    nonceStrstring可填
    amountnumber固定
    200
    notifyUrlstring可填
    orderIdrandom固定
    __random__
    titlestring可填
    descriptionstring可填
    currencystring固定
    NGN
    callBackUrlstring可填
    goodsDetailsstring可填
    customerInfostring可填
    remarkstring可填
    Request
    curl -X POST 'https://open-gw-sandbox.palmpay-inc.com/api/v2/payment/merchant/createorder' \
      -H 'CountryCode: NG' \
      -H 'Authorization: Bearer L231127054769719185611' \
      -H 'Content-Type: application/json' \
      -H 'Signature: <signed>' \
      -H 'App_id: L231127054769719185611' \
      -d '{
      "requestTime": 1794824835943,
      "version": "V1.1",
      "nonceStr": "IBJGAeTa4ZJQv4Z2qufomVo9eI1YnJ9Y",
      "amount": 200,
      "notifyUrl": "https://xx.cn/callback/payment",
      "orderId": "mPL92zFs4GXKJEPGE5saGrEHMOnVHzej",
      "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"
    }'
    application/json
    {
      "data": {
        "orderNo": "24260909140958962805",
        "orderStatus": 0,
        "mockCheckoutUrl": "https://checkout-daily.palmpay.com/h5-checkout/mock_test?countryCode=NG&payToken=BA1DB5D67390666669FB69BEC64E0E19&orderNo=24260909140958962805&signKey=BlyOQ7sBmHkf6LJrAV8s3eOw1TAB5Vf9d7mqg2UAMUk&signSession=24260909140958962805&appId=L231127054769719185611",
        "merchantName": "caojiangling",
        "sdkSignKey": "BlyOQ7sBmHkf6LJrAV8s3eOw1TAB5Vf9d7mqg2UAMUk",
        "checkoutUrl": "https://checkout-daily.palmpay.com/h5-checkout/?countryCode=NG&tntCode=PALMPAY&payToken=BA1DB5D67390666669FB69BEC64E0E19&orderNo=24260909140958962805&signKey=BlyOQ7sBmHkf6LJrAV8s3eOw1TAB5Vf9d7mqg2UAMUk&signSession=24260909140958962805&appId=L231127054769719185611&phoneNo=07011698742&productType=checkout&businessMode=three_mode&identityType=NEW&callable=%7B%22android%22%3A%22true%22%2C%22ios%22%3A%22true%22%7D",
        "orderAmount": 200,
        "sdkSessionId": "24260909140958962805",
        "appId": "L231127054769719185611",
        "currency": "NGN",
        "goodsName": "Order",
        "merchantNo": "123112302261521",
        "payToken": "BA1DB5D67390666669FB69BEC64E0E19"
      },
      "respMsg": "success",
      "respCode": "00000000"
    }