Developer

Developer

Doc. Explaination

Udopay provides this doc. for you to standardize internet payment gateway for our merchant.Final interpretation belongs to Udopay,we keep the right to modify.

Instructions of the following functions is including in this doc.: how to accept internet credit card payment,order query,refund and upload tracking number.

Merchant administrator,devoloper and maintainer can use this doc.

Need tech-support,click HERE.


Prepare

1.Read all
2.All info about interface integration,including mid,site_id,api_key.

mid Merchant ID,an integer,the unique ID for merchant login the platform.You can find it in the "My Account" page after loging in.
site_id Site ID,when you add a new site to the platform successfully, you wil get a unqiue site ID which is an integer.
api_key API_key,you will find it in the "My Account" page after loging in.
All this document encryption method is sha256 encryption generate hash value.not clear,please google.
3.Site status has to be activated after added or test and processing will be failed.if the site can pass our compliance, will notify by email.
4.If you want to do enough test before live processing,you can ask for a sandbox account.In sandbox environment,you can test almost all functions like API integration.
5.All gateway mentioned here use standard HTTPS protocol.


Payment Gateway(direct)

Payment gateway URL:https://www.udopay.com/index.php/Gateway/securepay

Merchant can accept credit card payment online via the gateway.Please use the standard HTTPS protocol to POST following parameters.

25 Madantory parameters & 5 optional parameters

Parameters Data Type isRequired Description
mid int Yes merchantID,how to get,please read former preparation
oid string Yes merchant order id
site_id int Yes site ID,how to get,please read former preparation
order_amount decimal(12,2) Yes order amount.must be in an appropriate format.Format is xx.xx.For example,5.50 is represented as "5.50", not "5.5".can't lower than 0.
order_currency char(3) Yes three international currency code,like USD,GBP,CNY,specific currency type ,check "currency support"
hash_info string Yes cryptographic hash strings of processing is calculated by sha256 algorithm. Combine merchant id,site id,order id,order amount ,order currency and site key all together,using Sha256 algorithm to generate the hash value.

PHP demonstration code as follows:
$hash_info=hash("sha256",$mid.$site_id.$oid.$order_amount.$order_currency.$api_key);

card_no number Yes credit card NO.
card_ex_month number Yes expiry month of credit card must be a double digits,eg,08 , 11 mean Aug.and Nov.
card_ex_year number Yes expiry year of credit card must be a double digits,choose last 2 digits of the year.eg,18,21 mean 2018 and 2021.
card_cvv number Yes credit card CVV,4 numbers at most
bill_email string Yes customer billing name
bill_phone string Yes customer billing telephone
bill_country char(2) Yes customer billing country,international digits code,please do check Appendix 1. The country code
bill_state string Yes customer billing state,except United States, Canada, Australia need to use two digits contraction state code,others no special requests,if no state,input"--"(Some interfaces need merchants to provide the state information of Japan.) State code data can refer to appendix 2: state code
bill_city string Yes customer billing city
bill_street string Yes street of customer billing address
bill_zip string Yes customer billing post code
bill_firstname string Yes customer first name
bill_lastname string Yes customer last name
syn_url string Yes Synchronous notification URL. Customers will be redirected to the page with the payment result sent by using the standard HTTP GET method. No use in direct payment gateway
asyn_url string Yes Asynchronous notification URL. The URL should be accessed on the internet,and canot be a local URL.
Our platform will forward the payment result of each transaction to this URL.
  • If merchants receive the request,please output "100".
  • If our platform doesn't receive the "100",we will re-send the result 3 times at the most.
source_ip string Yes the client's IP address
source_url string yes the client's source URL
gateway_version string Yes the gateway version,now it is 1.0.
uuid string yes UUID,Universally Unique Identifier,format:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12),each program language has its own implementation。
Parameters for rebilling
rebill_flag int No Set it to 1 if it's a rebilling transaction
rebill_cycle int No Rebilling cycle days,should be an integar and larger than 1;When "rebill_flag" is 1,the parameter is mandatory
rebill_amount decimal(12,2) No Rebilling amount,the format should be like 9.00;When "rebill_flag" is 1,the parameter is mandatory
rebill_count int No Rebilling count,should be an integar,bigger or equal than 0;When "rebill_flag" is 1,the parameter is mandatory
rebill_firstdate date No The first rebilling date,the format should be like "2016-04-01";When "rebill_flag" is 1,the parameter is mandatory

The processing result of transaction from direct interface will return directly to the gateway address which initiate requests in JSON format.as following:

If the transaction has been blocked,the data returned is similar to:


    {
        "status": 0,
        "data": 10018,
        "info": "Billing street cannot be NULL"
    }
 
If the transaction was failed,the data returned is similar to:

{
    "status": 1,
    "info": "payment declined",
    "data": 
    {
        "order_status": 6,
        "oid": "1",
        "pid": 2879,
        "order_amount": "1.00",
        "order_currency": "USD",
        "hash_info": "be17b8c545f13cddca1dd7ed05defb93",
        "syn_url": "http%3A%2F%2Fwww.baidu.com",
         "cascading":0
    }

}
 
If the transaction has been approved,the data returned is similar to:

{
    "status": 1,
    "info": "payment success",
    "data": 
    {
        "order_status": 2,
        "oid": "1",
        "pid": 2879,
        "order_amount": "1.00",
        "order_currency": "USD",
        "hash_info": "be17b8c545f13cddca1dd7ed05defb93",
        "syn_url": "http%3A%2F%2Fwww.baidu.com",
         "cascading":0
    }

}
 
If the transaction was abnormal,the data returned is similar to:

{
    "status": 1,
    "info": "processing,please wait...",
    "data": 
    {
        "order_status": 1,
        "oid": "1",
        "pid": 2879,
        "order_amount": "1.00",
        "order_currency": "USD",
        "hash_info": "be17b8c545f13cddca1dd7ed05defb93",
        "syn_url": "http%3A%2F%2Fwww.baidu.com",
         "cascading":0
    }

}
 
If the transaction has been pre-authorized successful. (pre-auth transaction only),the data returned is similar to:

{
    "status": 1,
    "info": "authorized success",
    "data": 
    {
        "order_status": 3,
        "oid": "1",
        "pid": 2879,
        "order_amount": "1.00",
        "order_currency": "USD",
        "hash_info": "be17b8c545f13cddca1dd7ed05defb93",
        "syn_url": "http%3A%2F%2Fwww.baidu.com",
         "cascading":0
    }

}
 

It means that the transaction has been blocked by system when "status" is 0 in the returned JSON statements.The data field is the code of this block,the info field is the instruction of this block.There are lots of reasons for blocking transaction data by system,such as: have null value in submitted data,incorrect email address format,black list,have limitation on trasaction times. Concrete analysis should be made according to concrete circumstance.The backoffice of platform can not find the corresponding record after the transaction had been blocked.At this time,merchant can ask help from tech support with sending returned code and instruction.

It means that the transaction has been recorded into system when "status" is 1 in the returned JSON statements.Merchant can check the payment current status according to the data of "order_status".There are 4 return status suppored by platform for now,as following:

1=>Pending
It means that this transaction has already submitted to the bank but has not received the return data yet.Or the bank returned infomation did not including effective payment status instruction,still need waiting for status delay changes.
6=>Declined
It means that this transaction has already failed,The failure reason returned from bank shows in "info" field.
2=>Approved
It means that this transaction has been approved.
3=>Authorized
It means that this transaction is pre-authorized successed.
At this point, the meaning of other parameters is as follows,
oid
order number from transaction data that merchant submitted
pid
the only id for querying order that generated by Udopay platform ,please keep this pid.Other interface below do need this information
order_amount
order amount from transaction data that merchant submitted
order_currency
order currency from transaction data that merchant submitted
hash_info
this hash value is as same as it in original transaction data that merchant submitted.Developers can determine whether trading data effectively by comparing the value
syn_url
URL Synchronous notification from transaction data that merchant submitted
cascading
Cascading post times in each channels for the website.0 means we submit only once;1 means we submitted one more time,and so on.

PHP demonstration code as follows:


    //encrypted the sensitive data
    $hash_info=hash("sha256",$params['merchantid'].$params['siteid'].
    $params['invoiceid'].$params['amount'].$params['currency'].$api_key);
    
    
    
    $curlPost="order_amount=".$params['amount'];
    $curlPost.="&order_currency=".$params['currency'];
    $curlPost.="&mid=".$params['merchantid'];//merchant ID
    $curlPost.="&site_id=".$params['siteid'];//site ID
    $curlPost.="&oid=".$params['invoiceid'];//order ID
    $curlPost.="&hash_info=".$hash_info;
    
    $curlPost.="&card_no=".$params["card_number"]; //credit card number
    $curlPost.="&card_ex_year=".$params["expiry_year"];//expiry year of credit card
    $curlPost.="&card_ex_month=".$params["expiry_month"];//expiry month of credit card
    $curlPost.="&card_cvv=".$params["cvv"];//CVV
    
    $curlPost.='&bill_firstname='.$params['firstname'];
    $curlPost.='&bill_lastname='.$params['lastname'];
    $curlPost.='&bill_street='.$params['address1'];
    $curlPost.='&bill_city='.$params['city'];
    $curlPost.='&bill_state='.$params['state'];
    $curlPost.='&bill_country='.$params['country'];
    $curlPost.='&bill_zip='.$params['postcode'];
    $curlPost.='&bill_phone='.$params['phonenumber'];
    $curlPost.='&bill_email='.$params['email'];
    
    $curlPost.='&syn_url='.$params['syn_url'];
    $curlPost.='&asyn_url='.$params['asyn_url'];
    
    $curlPost.='&source_ip='.$params['client_ip']; //source IP address
    $curlPost.='&source_url='.$_SERVER["HTTP_REFERER"]; //source URL address
    $curlPost.='&gateway_version=1.0'; //gateway version
    $curlPost.='&uuid='.create_guid(); //uuid

    /*If it's a rebilling transaction*/
    $curlPost.='&rebill_flag=1'; 
    $curlPost.='&rebill_cycle='.$params['rebill_cycle']; 
    $curlPost.='&rebill_amount='.$params['rebill_amount'];
    $curlPost.='&rebill_count='.$params['rebill_count']; 
    $curlPost.='&rebill_firstdate='.$params['rebill_firstdate'];    

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $gateway_url);
    curl_setopt($ch,CURLOPT_POST,1);
    curl_setopt($ch,CURLOPT_POSTFIELDS,$curlPost);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    $response = curl_exec($ch);
    curl_close($ch);
    
    //process $response
    $result = json_decode($response,true);

/**
* the function for creating uuid in PHP
*/
function create_guid() {
    $charid = strtoupper(md5(uniqid(mt_rand(), true)));
    $hyphen = chr(45); // "-"
    $uuid = substr($charid, 0, 8) . $hyphen
    . substr($charid, 8, 4) . $hyphen
    . substr($charid, 12, 4) . $hyphen
    . substr($charid, 16, 4) . $hyphen
    . substr($charid, 20, 12);
    return $uuid;
}     

The code above is for reference only.
Developer Kit sample code(PHP)

    require_once("Directpaykit.class.php");
    $oop=new \Directpaykit($mid,$site_id,$api_key);
            $arr=array(
            "oid"=>I("oid"),
            "order_amount"=>I("order_amount"),
            "order_currency"=>I("order_currency"),
            "card_no"=>I("card_no"),
            "card_cvv"=>I("card_cvv"),
            "card_ex_year"=>I("card_ex_year"),
            "card_ex_month"=>I("card_ex_month"),
            "bill_email"=>I("bill_email"),
            "bill_phone"=>I("bill_phone"),
            "bill_country"=>I("bill_country"),
            "bill_state"=>I("bill_state"),
            "bill_city"=>I("bill_city"),
            "bill_street"=>I("bill_street"),
            "bill_zip"=>I("bill_zip"),
            "bill_firstname"=>I("bill_firstname"),
            "bill_lastname"=>I("bill_lastname"),
            "syn_url"=>I("syn_url"),
            "asyn_url"=>I("asyn_url"),
            "uuid"=>create_guid()
            );
        //If it's a rebilling transaction
        $rebill_arr=array(
            "rebill_amount"=>I("rebill_amount"),
            "rebill_cycle"=>I("rebill_cycle"),
            "rebill_count"=>I("rebill_count"),
            "rebill_firstdate"=>I("rebill_firstdate")
        );
        $oop->setRebill($rebill_arr);   
        $result=$oop->sendGateway($arr);
        $arr_result=json_decode($result,true);

/**
* the function for creating uuid in PHP
*/
function create_guid() {
    $charid = strtoupper(md5(uniqid(mt_rand(), true)));
    $hyphen = chr(45); // "-"
    $uuid = substr($charid, 0, 8) . $hyphen
    . substr($charid, 8, 4) . $hyphen
    . substr($charid, 12, 4) . $hyphen
    . substr($charid, 16, 4) . $hyphen
    . substr($charid, 20, 12);
    return $uuid;
}          


Refund Interface

Refund interface gateway:https://www.udopay.com/index.php/Openapi/Orders/refund
Users can make a refund process for approved transaction by using refund interface gateway.This gateway accepts 5 parameters which must use the standard HTTP GET method to submit,The 5 parameters are as following:

Parameters Data Type isRquired Description
mid int Yes merchant ID generated by Udopay platform,merchant use this ID to login in
site_id int Yes site ID generated by Udopay platform,it is the ID for the website that processed this transation
oid int Yes order ID generated by Udopay platform,it is the pid parameter returned from payment interface,not the order ID sumbitted from merchant
refund_amount decimal(12,2) Yes refund amount.must be in an appropriate format.Format is xx.xx.For example,5.50 is represented as "5.50", not "5.5".Refund amount can not less than 0 and not greater than order amount,otherwise this refund process is invalid.
hash_info string Yes the encryption authentication information of refund interface is use sha256 encryption method to encrypt,String encryption after the above four parameters along with api_key connect seamlessly.
$mid.$site_id.$oid.$refund_amount.$api_key,api_key is the key generated for the website that processed this transation.
PHP demonstration code as follows:$hash_info=hash("sha256",$mid.$site_id.$oid.$refund_amount.$api_key);

This interface will return data in JSON format to initiate request address the result after receiving refund request.Returned code is as following:

If the refund has been failed,the data returned is similar to:

{
    "status": 0,
    "info": "invalid refund amount"
}

If this refund has been successed,the data returned is similar to:

{
    "status": 1,
    "info": "refund request successfully sent"
}

It means the refund has been failed when "status" is 0 in the returned JSON statements.the info field will account for tht fail reason.
when "status" is 1,it means the refund has been successed.The status of this transaction will shows likePending Refundin the platform after this refund has been successed.Our system will process this refund request automatically after 12 hours.
Developer Kit sample code(PHP)

    require_once("Directpaykit.class.php");
    $oop=new \Directpaykit($mid,$site_id,$api_key);
            $arr=array(
            "oid"=>I("oid"),
            "refund_amount"=>I("order_amount"),
            );
        $result=$oop->sendRefund($arr["oid"],$arr["refund_amount"]);
        $arr_result=json_decode($result,true);


Refund Cancellation Interface

Refund cancellation interface gateway:https://www.udopay.com/index.php/Openapi/Orders/cancelRefund
User can cancel refunds for the pending refund transactions by using refund interface gateway.This gateway accepts 4 parameters which must use the standard HTTP GET method to submit.The 4 parameters are as following:

Parameters Data Type isRquired Description
mid int Yes merchant ID generated by Udopay platform,merchant use this ID to login in
site_id int Yes site ID generated by Udopay platform,it is the ID for the website that processed this transation
oid int Yes order ID generated by Udopay platform,it is the pid parameter returned from payment interface,not the order ID sumbitted from merchant
hash_info string Yes the encryption authentication information of refund cancellation interface is use sha256 encryption method to encrypt,String encryption after the above four parameters along with api_key connect seamlessly.
$mid.$site_id.$oid.$api_key,api_key is the key generated for the website that processed this transation.
PHP demonstration code as follows:$hash_info=hash("sha256",$mid.$site_id.$oid.$api_key);

This interface will return data in JSON format to initiate request address the result after receiving refund cancel request.Returned code is as following:

If the refund cancellation has been failed,the data returned is similar to:

{
    "status": 0,
    "info": "invalid order status"
}

If the refund cancellation has been successed,the data returned is similar to:

{
    "status": 1,
    "info": "cancel refund request successfully sent"
}

It means the refund cancellation has been failed when "status" is 0 in the returned JSON statements.the info field will account for tht fail reason.
If "status" is 1,it means the refund cancellation has beensuccessed.The status of this transaction will shows likeApprovedorCapturedin the platform after this refund cancellation has been successed.
Developer Kit sample code(PHP)

    require_once("Directpaykit.class.php");
    $oop=new \Directpaykit($mid,$site_id,$api_key);
            $arr=array(
            "oid"=>I("oid")
            );
        $result=$oop->cancelRefund($arr["oid"]);
        $arr_result=json_decode($result,true);


Pre-auth Cancellation Interface

Pre-auth cancellation interface gatewayhttps://www.udopay.com/index.php/Openapi/Orders/void
Users can cancel a pre-auth transaction before it has been aotumatically successed by using pre-auth cancellation interface gateway.
This gateway accepts 4 parameters which must use the standard HTTP GET method to submit.The 4 parameters are as following:

Parameters Data Type isRquired Description
mid int Yes merchant ID generated by Udopay platform,merchant use this ID to login in
site_id int Yes site ID generated by Udopay platform,it is the ID for the website that processed this transation
oid int Yes order ID generated by Udopay platform,it is the pid parameter returned from payment interface,not the order ID sumbitted from merchant
hash_info string Yes the encryption authentication information of pre-auth cancellation interface interface is use sha256 encryption method to encrypt,String encryption after the above four parameters along with api_key connect seamlessly.
$mid.$site_id.$oid.$api_key,api_key is the key generated for the website that processed this transation.
PHP demonstration code as follows:$hash_info=hash("sha256",$mid.$site_id.$oid.$api_key);

This interface will return data in JSON format to initiate request address the result after receiving request of cancel pre-auth transactions.Returned code is as following:

If cancelling pre-auth transaction has been failed,the data returned is similar to:

{
    "status": 0,
    "info": "transaction not found"
}

If cancelling pre-auth transaction has beensuccessed,the data returned is similar to:

{
    "status": 1,
    "info": "voided successfully"
}

It means the pre-auth cancellation has been failed when "status" is 0 in the returned JSON statements.the info field is instruction of tht fail reason.
If "status" is 1,it means the pre-auth cancellation has been successed!
This interface only for pre-auth transactions.

Developer Kit sample code(PHP)

    require_once("Directpaykit.class.php");
    $oop=new \Directpaykit($mid,$site_id,$api_key);
            $arr=array(
            "oid"=>I("oid")
            );
        $result=$oop->void($arr["oid"]);
        $arr_result=json_decode($result,true);


Order Query Endpoint

Order Query Endpoint:https://www.udopay.com/index.php/Openapi/Orders/getInfo

Users can query basic information of a transaction (such as order id,order amount,billing address,payment status,exchange rate and so on) through this endpoint.

This endpoint accepts 5 parameters,and they should be posted by means of the standard HTTP GET method.

Parameters Data Type isRquired Description
mid int Yes merchant ID generated by Udopay platform,merchant use this ID to login in
site_id int Yes site ID generated by Udopay platform,it is the ID for the website that processed this transation
oid int Optional order ID generated by Udopay platform,it is the pid parameter returned from payment interface,not the order ID sumbitted from merchant
mh_oid int Optional Merchant Order ID
hash_info string Yes The encryption authentication information of query interface is use sha256 encryption method to encrypt,String encryption after the above four parameters along with site_key connect seamlessly.
$mid.$site_id.$oid.$site_key,site_key is the key generated for the website that processed this transation.
PHP demonstration code as follows:$hash_info=hash("sha256",$mid.$site_id.$oid.$mh_oid.$site_key);

This endpoint will return data in JSON format to initiated request URL:

If failed to query,the response will be similar to:

{
    "status": 0,
    "info": "transaction not found"
}
If succeed to query,the response will be similar to:

{

    "status": 1,
    "info": "success",
    "data": 
    {
        "order_id": 3,
        "merchant_oid": "3",
        "order_time": "2014-12-10 11:18:24",
        "order_status": 1,
        "order_amount": "1.00",
        "order_currency": "USD",
        "card_type": "visa",
        "order_site": "http://www.test.com",
        "billing_email": "test@test.com",
        "billing_country": "US",
        "billing_state": "CA",
        "billing_city": "test",
        "billing_street": "test",
        "billing_phone": "18888888888",
        "process_mode": "sales",
        "process_type":"production"
    }

}
The "status" node shows the query result. "0" means failed,"1" means success.
For "order_status" code,Users can refer to Appendix 3. Order Status Code Instructions.
Notice:
The "oid" and "mh_oid" parameter are not required to post at the same time,you can post either one. If you post both of them,the mh_oid will be ignored.

Developer Kit sample code(PHP)


    require_once("Directpaykit.class.php");
    $oop=new \Directpaykit($mid,$site_id,$site_key);
            $arr=array(
            "oid"=>I("oid"),
            "mh_oid"=>I("mh_oid")
            );
        $result=$oop->getOrderInfo($arr["oid"],$arr['mh_oid']);
        $arr_result=json_decode($result,true);



Tracking Number Upload Interface

Tracking number upload interface gateway:https://www.udopay.com/index.php/Openapi/Tracking/upload

Users can upload tracking number to the corresponding transaction directly without login to the front office by using query interface gateway.

This gateway accepts 4 parameters which must use the standard HTTP GET method to submit. The 4 parameters are as following:

Parameters Data Type isRquired Description
mid int Yes merchant ID generated by Udopay platform,merchant use this ID to login in
site_id int Yes site ID generated by Udopay platform,it is the ID for the website that processed this transation
oid int Yes order ID generated by Udopay platform,it is the pid parameter returned from payment interface,not the order ID sumbitted from merchant
track_company string Yes Please refer to the Express Support below here to check currently supported express company.Only these company listed can use this interface to upload tracking number,If the express company you work with isn't in the list,please contact our merchant service support to add.
track_number string Yes tracking number
hash_info string Yes The encryption authentication information of tracking number upload interface is use sha256 encryption method to encrypt,String encryption after the above four parameters along with api_key connect seamlessly.
$mid.$site_id.$oid.$track_company.$track_number.$api_key,api_key is the key generated for the website that processed this transation. PHP demonstration code as follows:
$hash_info=hash("sha256",$mid.$site_id.$oid.$track_company.$track_number.$api_key);

This interface will return data in JSON format to initiate request address the result after receiving upload request.Returned code is as following:

If upload failed,the data returned is similar to:

{
    "status": 0,
    "info": "transaction not found"
}

If upload successed,the data returned is similar to:

{
    "status": 1,
    "info": "tracking uploaded"
}

It means the upload failed when "status" is 0 in the returned JSON statements.the info field is instruction of tht fail reason.
"1" means upload successed.
1.Only the system support express company can be uploaded, must use the correct code.
2.Interface takes the traking number of last time uploaded

Developer Kit sample code(PHP)

    require_once("Directpaykit.class.php");
    $oop=new \Directpaykit($mid,$site_id,$api_key);
            $arr=array(
            "oid"=>I("oid"),
            "tracking_company"=>I("tracking_company"),
            "tracking_number"=>I("tracking_number")
            );
        $result=$oop->uploadTracking($arr["oid"],$arr["tracking_company"],$arr["tracking_number"]);
        $arr_result=json_decode($result,true);


Support Currency

What listed here are the currency and their code supported by current system.

Currency CodeDescription
CNYChinese Yuan
GBPUnited Kingdom Pound
USDUnited States Dollar
EUREuro
CADCanadian Dollar
JPYJapanese Yen
AUDAustralia Dollar

Support Express Company

What listed here are the express companys and corresponding ID number supported by current system.

Company NameWebsite
China Post Air Mailhttp://www.ems.com.cn/
DHLhttp://www.cn.dhl.com/zh.html
FEDEXhttp://www.fedex.com/us/
Hong-kong-posthttp://www.hongkongpost.hk/
Otherhttp://www.udopay.com
TNThttp://www.tnt.com.cn
UPShttps://www.ups.com
USPShttp://www.usps.com
Please provide express company you work with before use the tracking number upload interface.

Appendix 1. The Country Code

All the country code supportted by platform gateway,use ISO2 code.

  • Afghanistan(AF)
  • Albania(AL)
  • Algeria(DZ)
  • American Samoa(AS)
  • Andorra(AD)
  • Angola(AO)
  • Anguilla(AI)
  • Antarctica(AQ)
  • Antigua and Barbuda(AG)
  • Argentina(AR)
  • Armenia(AM)
  • Aruba(AW)
  • Australia(AU)
  • Austria(AT)
  • Azerbaijan(AZ)
  • Bahamas(BS)
  • Bahrain(BH)
  • Bangladesh(BD)
  • Barbados(BB)
  • Belarus(BY)
  • Belgium(BE)
  • Belize(BZ)
  • Benin(BJ)
  • Bermuda(BM)
  • Bhutan(BT)
  • Bolivia(BO)
  • Bosnia and Herzegowina(BA)
  • Botswana(BW)
  • Bouvet Island(BV)
  • Brazil(BR)
  • British Indian Ocean Territory(IO)
  • Brunei Darussalam(BN)
  • Bulgaria(BG)
  • Burkina Faso(BF)
  • Burundi(BI)
  • Cambodia(KH)
  • Cameroon(CM)
  • Canada(CA)
  • Cape Verde(CV)
  • Cayman Islands(KY)
  • Central African Republic(CF)
  • Chad(TD)
  • Chile(CL)
  • China(CN)
  • Christmas Island(CX)
  • Cocos (Keeling) Islands(CC)
  • Colombia(CO)
  • Comoros(KM)
  • Congo(CG)
  • Cook Islands(CK)
  • Costa Rica(CR)
  • Cote D'Ivoire(CI)
  • Croatia(HR)
  • Cuba(CU)
  • Cyprus(CY)
  • Czech Republic(CZ)
  • Denmark(DK)
  • Djibouti(DJ)
  • Dominica(DM)
  • Dominican Republic(DO)
  • Timor-Leste(TL)
  • Ecuador(EC)
  • Egypt(EG)
  • El Salvador(SV)
  • Equatorial Guinea(GQ)
  • Eritrea(ER)
  • Estonia(EE)
  • Ethiopia(ET)
  • Falkland Islands (Malvinas)(FK)
  • Faroe Islands(FO)
  • Fiji(FJ)
  • Finland(FI)
  • France(FR)
  • French Guiana(GF)
  • French Polynesia(PF)
  • French Southern Territories(TF)
  • Gabon(GA)
  • Gambia(GM)
  • Georgia(GE)
  • Germany(DE)
  • Ghana(GH)
  • Gibraltar(GI)
  • Greece(GR)
  • Greenland(GL)
  • Grenada(GD)
  • Guadeloupe(GP)
  • Guam(GU)
  • Guatemala(GT)
  • Guinea(GN)
  • Guinea-bissau(GW)
  • Guyana(GY)
  • Haiti(HT)
  • Heard and Mc Donald Islands(HM)
  • Honduras(HN)
  • Hong Kong(HK)
  • Hungary(HU)
  • Iceland(IS)
  • India(IN)
  • Indonesia(ID)
  • Iran (Islamic Republic of)(IR)
  • Iraq(IQ)
  • Ireland(IE)
  • Israel(IL)
  • Italy(IT)
  • Jamaica(JM)
  • Japan(JP)
  • Jordan(JO)
  • Kazakhstan(KZ)
  • Kenya(KE)
  • Kiribati(KI)
  • Korea, Democratic People's Republic of(KP)
  • Korea, Republic of(KR)
  • Kuwait(KW)
  • Kyrgyzstan(KG)
  • Lao People's Democratic Republic(LA)
  • Latvia(LV)
  • Lebanon(LB)
  • Lesotho(LS)
  • Liberia(LR)
  • Libyan Arab Jamahiriya(LY)
  • Liechtenstein(LI)
  • Lithuania(LT)
  • Luxembourg(LU)
  • Macao(MO)
  • Macedonia, The Former Yugoslav Republic of(MK)
  • Madagascar(MG)
  • Malawi(MW)
  • Malaysia(MY)
  • Maldives(MV)
  • Mali(ML)
  • Malta(MT)
  • Marshall Islands(MH)
  • Martinique(MQ)
  • Mauritania(MR)
  • Mauritius(MU)
  • Mayotte(YT)
  • Mexico(MX)
  • Micronesia, Federated States of(FM)
  • Moldova(MD)
  • Monaco(MC)
  • Mongolia(MN)
  • Montserrat(MS)
  • Morocco(MA)
  • Mozambique(MZ)
  • Myanmar(MM)
  • Namibia(NA)
  • Nauru(NR)
  • Nepal(NP)
  • Netherlands(NL)
  • Netherlands Antilles(AN)
  • New Caledonia(NC)
  • New Zealand(NZ)
  • Nicaragua(NI)
  • Niger(NE)
  • Nigeria(NG)
  • Niue(NU)
  • Norfolk Island(NF)
  • Northern Mariana Islands(MP)
  • Norway(NO)
  • Oman(OM)
  • Pakistan(PK)
  • Palau(PW)
  • Panama(PA)
  • Papua New Guinea(PG)
  • Paraguay(PY)
  • Peru(PE)
  • Philippines(PH)
  • Pitcairn(PN)
  • Poland(PL)
  • Portugal(PT)
  • Puerto Rico(PR)
  • Qatar(QA)
  • Reunion(RE)
  • Romania(RO)
  • Russian Federation(RU)
  • Rwanda(RW)
  • Saint Kitts and Nevis(KN)
  • Saint Lucia(LC)
  • Saint Vincent and the Grenadines(VC)
  • Samoa(WS)
  • San Marino(SM)
  • Sao Tome and Principe(ST)
  • Saudi Arabia(SA)
  • Senegal(SN)
  • Seychelles(SC)
  • Sierra Leone(SL)
  • Singapore(SG)
  • Slovakia (Slovak Republic)(SK)
  • Slovenia(SI)
  • Solomon Islands(SB)
  • Somalia(SO)
  • South Africa(ZA)
  • South Georgia and the South Sandwich Islands(GS)
  • Spain(ES)
  • Sri Lanka(LK)
  • St. Helena(SH)
  • St. Pierre and Miquelon(PM)
  • Sudan(SD)
  • Suriname(SR)
  • Svalbard and Jan Mayen Islands(SJ)
  • Swaziland(SZ)
  • Sweden(SE)
  • Switzerland(CH)
  • Syrian Arab Republic(SY)
  • Taiwan(TW)
  • Tajikistan(TJ)
  • Tanzania, United Republic of(TZ)
  • Thailand(TH)
  • Togo(TG)
  • Tokelau(TK)
  • Tonga(TO)
  • Trinidad and Tobago(TT)
  • Tunisia(TN)
  • Turkey(TR)
  • Turkmenistan(TM)
  • Turks and Caicos Islands(TC)
  • Tuvalu(TV)
  • Uganda(UG)
  • Ukraine(UA)
  • United Arab Emirates(AE)
  • United Kingdom(GB)
  • United States(US)
  • United States Minor Outlying Islands(UM)
  • Uruguay(UY)
  • Uzbekistan(UZ)
  • Vanuatu(VU)
  • Vatican City State (Holy See)(VA)
  • Venezuela(VE)
  • Viet Nam(VN)
  • Virgin Islands (British)(VG)
  • Virgin Islands (U.S.)(VI)
  • Wallis and Futuna Islands(WF)
  • Western Sahara(EH)
  • Yemen(YE)
  • Serbia(RS)
  • Zambia(ZM)
  • Zimbabwe(ZW)
  • Aaland Islands(AX)

Appendix 2. State Code

ISO 2 states code,only for the United States, Canada, Australia. Part of the interface need to support Japan.

For US:
  • Alabama(AL)
  • Alaska(AK)
  • American Samoa(AS)
  • Arizona(AZ)
  • Arkansas(AR)
  • Armed Forces Africa(AF)
  • Armed Forces Americas(AA)
  • Armed Forces Canada(AC)
  • Armed Forces Europe(AE)
  • Armed Forces Middle East(AM)
  • Armed Forces Pacific(AP)
  • California(CA)
  • Colorado(CO)
  • Connecticut(CT)
  • Delaware(DE)
  • District of Columbia(DC)
  • Federated States Of Micronesia(FM)
  • Florida(FL)
  • Georgia(GA)
  • Guam(GU)
  • Hawaii(HI)
  • Idaho(ID)
  • Illinois(IL)
  • Indiana(IN)
  • Iowa(IA)
  • Kansas(KS)
  • Kentucky(KY)
  • Louisiana(LA)
  • Maine(ME)
  • Marshall Islands(MH)
  • Maryland(MD)
  • Massachusetts(MA)
  • Michigan(MI)
  • Minnesota(MN)
  • Mississippi(MS)
  • Missouri(MO)
  • Montana(MT)
  • Nebraska(NE)
  • Nevada(NV)
  • New Hampshire(NH)
  • New Jersey(NJ)
  • New Mexico(NM)
  • New York(NY)
  • North Carolina(NC)
  • North Dakota(ND)
  • Northern Mariana Islands(MP)
  • Ohio(OH)
  • Oklahoma(OK)
  • Oregon(OR)
  • Pennsylvania(PA)
  • Puerto Rico(PR)
  • Rhode Island(RI)
  • South Carolina(SC)
  • South Dakota(SD)
  • Tennessee(TN)
  • Texas(TX)
  • Utah(UT)
  • Vermont(VT)
  • Virgin Islands(VI)
  • Virginia(VA)
  • Washington(WA)
  • West Virginia(WV)
  • Wisconsin(WI)
  • Wyoming(WY)
For Canada(CA):
  • Alberta(AB)
  • British Columbia(BC)
  • Manitoba(MB)
  • Newfoundland(NL)
  • New Brunswick(NB)
  • Nova Scotia(NS)
  • Northwest Territories(NT)
  • Nunavut(NU)
  • Ontario(ON)
  • Prince Edward Island(PE)
  • Quebec(QC)
  • Saskatchewan(SK)
  • Yukon Territory(YT)
For Australia(AU):
  • Australian Capital Territory(ACT)
  • New South Wales(NSW)
  • Northern Territory(NT)
  • Queensland(QLD)
  • South Australia(SA)
  • Tasmania(TAS)
  • Victoria(VIC)
  • Western Australia(WA)
For Japan(JP):
  • Hokkaido(HK)
  • Aomori(AO)
  • Iwate(IW)
  • Miyagi(MY)
  • Akita(AK)
  • Yamagata(YM)
  • Fukushima(FK)
  • Ibaragi(IB)
  • Tochigi(TC)
  • Gunma(GU)
  • Saitama(SI)
  • Chiba(CB)
  • Tokyo(TK)
  • Kanagawa(KN)
  • Niigata(NI)
  • Toyama(TY)
  • Ishikawa(IS)
  • Fukui(FI)
  • Yamanashi(YN)
  • Nagano(NG)
  • Gifu(GF)
  • Shizuoka(SZ)
  • Aichi(AI)
  • Mie(ME)
  • Shiga(SG)
  • Kyoto(KT)
  • Osaka(OS)
  • Hyogo(HG)
  • Nara(NR)
  • Wakayama(WK)
  • Tottori(TT)
  • Shimane(SM)
  • Okayama(OK)
  • Hiroshima(HR)
  • Yamaguchi(YG)
  • Tokushima(TS)
  • Kagawa(KG)
  • Ehime(EH)
  • Kouchi(KC)
  • Fukuoka(FO)
  • Saga(SA)
  • Nagasaki(NS)
  • Kumamoto(KM)
  • Ooita(OI)
  • Miyazaki(MZ)
  • Kagoshima(KS)


Appendix 3. Order Status Code Instructions

Order Status Code Explaination
1Pending
2Approved
3Authorized
4Captured
5Voided
6Declined
7Pending Refund
8Refunded
9Chargeback