Skip to content

Paypal

Authorize

The next table describes the request parameters to perform an Authorize.

NameTypeMax LengthRequiredDescription
Order Info
merNoString5YesThis value is provided by and is used to authenticate a merchant.
gatewayNoString8YesThis value is provided by and is used to authenticate a merchant.
orderNoString50YesThis value is the order number or tracking code, it can contain any alphanumeric value with a maximum length of 50 chars. The value must be unique.
orderCurrencyString3YesISO 4217 Currency code that indicates the currency of the transaction.
orderAmountString10YesTransaction amount. The decimal separator must be a point “.”
returnUrlString500YesPayment result will be posted to this URL provided by merchant.
notifyUrlString200Noreturn the abnormal trade to this address by server asynchronous (POST method).Please return "OK" after receiving the request.
signInfoString64YesDigital signature on the payment of the results of key fields.
signInfo=sha256(merNo + gatewayNo + orderNo + orderCurrency + orderAmount + returnUrl + signkey);
paymentMethodString50YesPayment method, fixed Paypal
returnUrlString500YesPayment result will be posted to this URL provided by merchant.
notifyUrlString500NOreturn the payment result to this address by server asynchronous (POST method).Please return "OK" after receiving the request.
firstNameString100NOCustomer’s first name.
lastNameString50NOCustomer’s last name.
emailString200NOCustomer's email address.
phoneString50NOCustomer’s billing phone.
countryString100NOCustomer’s billing country.
cityString100NOCustomer’s billing city.
addressString500NOCustomer’s billing address
zipString100NOCustomer’s billing zipCode
stateString100NOCustomer's billing state.
shipFeeString100No【Ship Fee】
Only for the digital, and only two decimal places after the decimal point..
discountString100No【Discount】
Default negative discount only for digital, and only two decimal places after the decimal point.
goodsInfoString5000NoGoods detail Information, mandatory when physical goods.
Including goods name, ID, unit price, number of specific detailed in the appendix: Goods Information
Receiving information (optional,mandatory when physical goods.)
shipFirstNameString100No【Delivery First Name】
shipLastNameString100No【Delivery Last Name】
shipEmailString100No【Delivery Email】
shipPhoneString100No【Delivery Phone】
shipCountryString100No【Delivery Country】short name. Such as the United States:US
shipStateString100No【Delivery State】full name.
shipCityString100No【Delivery City】full name.
shipAddressString500No【Delivery Address】
shipZipString100No【Delivery Zip】
Other
remarkString1000NoEG: order Info

Operation Responses

The next table describes the fields returned in all the responses.

NameTypeDescription
merNoStringThis value is provided by and is used to authenticate a merchant.
gatewayNoStringThis value is provided by and is used to authenticate a merchant.
tradeNoStringUnique identifier allocated by fastcloudpay.
orderNoStringCustomer’s order number
orderCurrencyStringCustomer’s order currency.
orderAmountStringCustomer’s order amount.
orderStatusStringTransaction status:
-2: To be confirmed
-1: Pending
0: Failure
1: Success
orderInfoStringTransaction result code + the result of a transaction information
signInfoStringDigital signature on the payment of the results of key fields.
signInfo=sha256(merNo + gatewayNo + tradeNo + orderNo + orderCurrency + orderAmount + orderStatus + orderInfo + signkey);
orderErrorCodeStringError Code
Error codes corresponding to various reasons for failure.
returnTypeString1: Browser real-time return
2: Server real-time return
3: Server asynchronous return
The data format returned by the server in real-time is XML, while the data format returned by the server asynchronously and by the browser is NVP.
RemarkStringRemark
The self-defined message for merchant. It will be returned exactly as the original one.

Submission Example

java
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "merNo=80000&gatewayNo=80000001&orderAmount=58.88&orderCurrency=USD&signInfo=61be55a8e2f6b4e172338b&paymentMethod=Paypal&returnUrl=https://xxx.com/returnUrl&notifyUrl=https://xxx.com/notifyurl");
Request request = new Request.Builder()
  .url("sandbox.fireantspay.com/PaypalInterface")
  .method("POST", body)
  .addHeader("Content-Type", "application/x-www-form-urlencoded")
  .build();
Response response = client.newCall(request).execute();
php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'sandbox.fireantspay.com/PaypalInterface',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => 'merNo=80000&gatewayNo=80000001&orderAmount=58.88&orderCurrency=USD&signInfo=61be55a8e2f6b4e172338b&paymentMethod=Paypal&returnUrl=https%3A%2F%2Fxxx.com%2FreturnUrl&notifyUrl=https%3A%2F%2Fxxx.com%2Fnotifyurl',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
js
var request = require('request')
var options = {
  method: 'POST',
  url: 'sandbox.fireantspay.com/PaypalInterface',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    merNo: '80000',
    gatewayNo: '80000001',
    orderAmount: '58.88',
    orderCurrency: 'USD',
    signInfo: '61be55a8e2f6b4e172338b',
    paymentMethod: 'Paypal',
    returnUrl: 'https://xxx.com/returnUrl',
    notifyUrl: 'https://xxx.com/notifyurl'
  }
}
request(options, function (error, response) {
  if (error) throw new Error(error)
  console.log(response.body)
})
js
var settings = {
  url: 'sandbox.fireantspay.com/PaypalInterface',
  method: 'POST',
  timeout: 0,
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: {
    merNo: '80000',
    gatewayNo: '80000001',
    orderAmount: '58.88',
    orderCurrency: 'USD',
    signInfo: '61be55a8e2f6b4e172338b',
    paymentMethod: 'Paypal',
    returnUrl: 'https://xxx.com/returnUrl',
    notifyUrl: 'https://xxx.com/notifyurl'
  }
}

$.ajax(settings).done(function (response) {
  console.log(response)
})
perl
curl --location 'sandbox.fireantspay.com/PaypalInterface' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merNo=80000' \
--data-urlencode 'gatewayNo=80000001' \
--data-urlencode 'orderAmount=58.88' \
--data-urlencode 'orderCurrency=USD' \
--data-urlencode 'signInfo=61be55a8e2f6b4e172338b' \
--data-urlencode 'paymentMethod=Paypal' \
--data-urlencode 'returnUrl=https://xxx.com/returnUrl' \
--data-urlencode 'notifyUrl=https://xxx.com/notifyurl'