For Mechant Access

1.Register an account as software provider

a.Go to the https://sso.4px.com and select Software provider to start your register process.

b.Finish registration process by complete the company information.

2. Login in the FOP

Go to the https://open.4px.com/login then login.

3.Authentication

Click Step into Authentication->Complete basic info->Click save. Shown below

Remarks:If you already finish authentication process you can start step 4 register APP,please wait while our staff verify your application。

4.Register APP

a.First, choose the "Access managemen-My APPs" on the Menu bar, then click the "Add" button

b.Complete APP application form

c.Waiting for the verification (within 3 workdays)

d.After verification, click the name of your APP , for your "APP key" and “APPsecret”.

e.If denied for your APP registration, Please read the notice and modify your application and submit again.

5.Generate Request parameters

a.Request parameter:

name type required description
method String true API interface name
app_key String true Apply the access application AppKey
v String true API protocol version, depends on the version of interface
timestamp Long true timestamp, get the millisecond of current time.Such as 2018-07-26 16:06:53:187, it will be transfer to be 1532592413187.
format String true Submitted business data.The default is json, and the optional value is json.
sign String true API input parameter signature results;Encrypted signature of App Secret.Use the MD5 encryption algorithm
access_token String true Through OAuth authorization, the platform service providers and third-party software vendors are required to pass in 4PX customers (class B customers)

b.Following test data is arranged in alphabetical order:
app_key=16081f05-e8fc-4250-b9c4-0660d1ecbb28
format=json
method=ds.xms.order.create
timestamp=1532592413187
v=1.0

Connect the string (remove all = and &).Connect the parameter name and value,

plus the “body” information and App secret at the end.

For example

appSecret=7eebf328-8e5a-4030-904d-ec6e89174fbc, and the body information (Json compression format)

is as follows:{"aa":"bb"}

Then the stitiched string is shown as the follows:

app_key16081f05-e8fc-4250-b9c4-0660d1ecbb28formatjsonmethodds.xms.order.createtimestamp1532592413187v1.0{"aa":"bb"}7eebf328-8e5a-4030-904d-ec6e89174fbc

The red part above is the request body data The string generated above is generated using MD5 encryption to generate a 32-bit lowercase signature value sign, which is used below. (Signature algorithm uses MD5 uniformly) The above string is encrypted with MD5: 32-bit signature value -> c4a41de412206ad4473c72f273082f92

6.Request Open Platform api

a.http request method: post
b.http address: https://open.4px.com/router/api/service
c.ContentType:application/json
d.Request parameters, put them behind the url, connect with the "&"

Parameters Type Required Description
method String true The name of the interface refers to the interface description in the next chapter. For example, the package information: method=fpx.dps.pkg.get
app_key String true The app key of the application access request
v String true The version number. For example: 1.0, 2.0, the current default 1.0
timestamp Long true timestamp, get the millisecond of current time.Such as 2018-07-26 16:06:53:187, it will be transfer to be 1532592413187.
format String true Submitted business data.The default is json, and the optional value is json.
sign String true API input parameter signature results;Encrypted signature of App Secret.Use the MD5 encryption algorithm
e.Put the body parameter with the request using 'json' format
f.Response parameters
Parameters Type Description
result String Flag String Response result 0: failure, 1: success, 2: partial success
msg string Description
data String Return content
g.Example using the parameters generated above:
Request URL:https://open.4px.com/router/api/service?method=ds.xms.order.create&app_key=16081f05-e8fc-4250-b9c4-0660d1ecbb28&v=1.0&timestamp=1532592413187&format=json&sign=c4a41de412206ad4473c72f273082f92
Notice:
a. Api domain name,for Sandbox environment:" open.sandbox.4px.com", the Production environment: "open.4px.com"
b. Method, app_key parameter should be consistent with the generated parameter Signature. The sign parameter is obtained by MD5 encryption which recieved after generated the Signature.

7.Publish Online

After finish the Sandbox environment test, please publish in the Production enviroment