# 1. Create Authorization Url

# Request URL

  • {domain}/open-api/direct/debit/token/apply

# Request Method

  • POST

# Request Headers

Parameter Name Required Type Description
Content-Type Yes string application/json

# Request Body Parameters

Parameter Name Required Type Description
appId Yes string Application APPID
param Yes string Parameter body
sign Yes string Signature

# param

Parameter Name Required Type Length Example Description
timestamp Yes long - 1677495496979 Current timestamp
userId Yes string 1-32 - Merchant internal user id
requestId Yes string 1-32 CCP20220428011068111 Merchant request id (unique for transactionId) 1-32 characters
channelCode Yes string - Reference list Channel code
terminalType Yes string - - terminal type (WEB, WAP, APP)
osType No string - - os type (IOS, ANDROID) require if terminalType is WAP, APP
notifyUrl Yes string 1-256 - Auth notification URL
redirectUrl Yes string 1-512 - Redirect URL

# Request Example

# Request Body

{
  "appId":"b96f05030ffc411185c06f959e1c9210",
  "sign":"MjlMdow07Ix0BFLIfLnm2PPdMK9t+yEyMSX4jkFxajdNcCRKu0P3N8BGQiKksY3xSmUR4Wr4k4+hBpzJGR6uEBFnn/LtqCxahJYbPfgJd5IwNlbA3kzG7JtNWImJDxM7mfAgfsnI+HnGMlASO5gDbtpX7FyypzxoBuYTDtvftsdJ2o7kj27yK0eqYbDNhL9WOAakq55l4kf8KCbplDOWbAZVKzR0+mHPeVrA5aOISImsiPHTOKFBgEEjI713Xu0k1fmze+oMMXYvwS010EvQUSkrWa12j4P7C6+XDD6cRi3KMdzxKGDr0oDUMBa39lG2Gd94A8o96w06h+kfAd7OgA==",
  "param":"{\"requestId\":\"Joey0ub5yxzecu4c866ub100\",\"userId\":\"u0009\",\"channelCode\":\"BLUEPAY_DIRECT_DEBIT\",\"notifyUrl\":\"https://webhook.site/b89c5e5f-3056-438f-8329-b39ff5a181de\",\"redirectUrl\":\"https://www.bluepay.cn/melitigo/Test_113.html\",\"terminalType\":\"WAP\",\"osType\":\"ANDROID\",\"timestamp\":1726139239}"
}

How to construct request body


# Response Param

Parameter Name Type Description
code integer response code
message string response message
data Object data

# data

Parameter Name Type Description
userId string Merchant internal user id
requestId string Merchant request id
channelCode string Channel Code
authUrl string Auth Url

# Response Example

# Response Body

{
  "code": 10000,
  "message": "Success",
  "data": {
    "requestId": "Joey0ub5yxzecu4c866ub100",
    "userId": "u0009",
    "channelCode": "BLUEPAY_DIRECT_DEBIT",
    "authUrl": "https://ac.bluepay.com/page/sandbox/common-auth-pMiddle.html?acqSiteId=Z02TE1941000000A&clientId=TEST_305XSM222YRKG505"
  }
}

Code Collection

# Failed Response Example

{
  "code": 21000,
  "message": "Server error, Please try again later.",
  "data": null
}