Skip to content

Direct payments

Payment Session Example

We open a merchant account No.2222 for you, the we will provide a gateway No.2222001 and SignKey "abcdefjhigk" to you.

For example: A girl named Evatan who uses her credit card (No. 4512910687950025) to take an order that No. is 00001. The total amount is EUR 98. Then the merchant will post it to the address that you filled up on the Website. In the meantime, the electronic bill will be sent to your email (test@google.com). All the trade information will be encrypted by Sha256. At the same time, the system will send signInfo to us. Once it is done, we will return the result.

Payment Url

Authorize

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

NameTypeMax LengthRequiredDescription
Merchant Info
merNoString5YesThis value is provided by FIREANTPAY and is used to authenticate a merchant.
gatewayNoString8YesThis value is provided by FIREANTPAY 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 “.”
shipFeeString10NoThe delivery freight
Only for the digital, and only two decimal places after the decimal point
notifyUrlString500Yesreturn the payment result to this address by server asynchronous (POST method).Please return "OK" after receiving the request.
browerString50YesBrowser type
returnUrlString500YesPayment result will be posted to this URL provided by merchant.
browerLangString50YesBrowser language
timeZoneString50YesTime zone
goodsInfoString5000NoGoods detail Information, mandatory when physical goods.
Including goods name, ID, unit price, number of specific detailed in the appendix.APPENDIX: 4.1 Goods Information
Customer Info
cardNoString20YesCard holder account number.
cardExpireMonthString2YesCard expiration Month. Valid values are from 1 to 12.
cardExpireYearString4YesCard expiration Year expressed with 4 digits. i.e. 2007
cardSecurityCodeString3YesCard validation code. Each card type has a unique name for this field. Visa (Cvv2), MasterCard (Cvc2), Amex (CID) …
issuingBankString255NoCustomer's credit card issuing bank.
firstNameString100YesCustomer’s first name.
lastNameString50YesCustomer’s last name.
emailString200YesCustomer's email address.
ipString50YesCustomer's IP.
phoneString50YesCustomer’s billing phone.
countryString100YesCustomer’s billing country.
stateString100NoCustomer's billing state.
cityString100YesCustomer’s billing city.
addressString500YesCustomer’s billing address
zipString100YesCustomer’s billing zipCode
Encryption Info
signInfoString64YesDigital signature information.
signInfo = sha256(merNo + gatewayNo + orderNo + orderCurrency + orderAmount + cardNo + cardExpireYear + cardExpireMonth + cardSecurityCode + signkey);
Delivery information
shipFirstNameString100YesConsignee’s first name
shipLastNameString100YesConsignee’s last name
shipAddressString100YesConsignee’s shipping address
shipCityString100YesConsignee’s shipping city
shipStateString100NoConsignee’s shipping state
shipCountryString100YesConsignee’s shipping country
shipZipString100YesConsignee’s shipping zip
shipEmailString100YesConsignee’s shipping email
shipPhoneString100YesConsignee’s shipping phone
Browser information
osString50YesOperating system, eg: Windows
browserString50YesBrower type
browserLangString50YesBrower Language
timeZoneString50YesTimezone
resolutionString50YesScreenWidth x ScreenHeight
acceptHeaderString100YesBrower Acceptheader
javaEnabledString50YesPossible Values:True/False
colorDepthString50YesValue represents the bit depth of the color palette for displaying images
userAgentString1000YesCustomer’s browser as identified from the HTTP header data
isCopyCardString50YesPossible Values:True/False
deviceNoString100YesDevice NO.
uniqueIdString100YesUnique id
interfaceModeString100YesWebsite language, eg:ZENCART_1.3.9 or PHP
Other information
remarkString1000Noorder remark information
webSiteString200YesSource website(shopping website/domain)
The online store that you provide us with review, if this site is not, it will not be able to trade (R0001)

Payment 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
	&orderNo=12345678
	&orderCurrency=USD
	&orderAmount=100.00
	&goodsInfo=Smart watch#,#123#,#50.00#,#2
	&cardNo=4414444444444444&
	cardExpireMonth=01
	&cardExpireYear=2027
	&cardSecurityCode=123
	&firstName=Doe
	&lastName=John
	&email=test@test.com
	&ip=12.150.22.41
	&phone=0123456
	&country=US
	&city=New York&address=456 7th Street
	&zip=10001
	&returnUrl=https://xxx.com/returnUrl&webSite=https://xxx.com
	&notifyUrl=https://xxx.com/notifyurl
	&signInfo=61be55a8e2f6b4e172338b");
Request request = new Request.Builder()
  .url("https://sandbox.fireantspay.com/TPInterface")
  .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/TPInterface',
  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
	&orderNo=12345678&orderCurrency=USD&orderAmount=100.00&
	goodsInfo=Smart%20watch%23%2C%23123%23%2C%2350.00%23%2C%232&
	cardNo=4414444444444444&cardExpireMonth=01&cardExpireYear=2027&
	cardSecurityCode=123&firstName=Doe&lastName=John&
	email=test%40test.com&ip=12.150.22.41&phone=0123456&country=US&
	city=New%20York&address=456%207th%20Street&zip=10001&
	returnUrl=https%3A%2F%2Fxxx.com%2FreturnUrl&
	webSite=https%3A%2F%2Fxxx.com&
	notifyUrl=https%3A%2F%2Fxxx.com%2Fnotifyurl
	&signInfo=61be55a8e2f6b4e172338b',
  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/TPInterface',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    merNo: '80000',
    gatewayNo: '80000001',
    orderNo: '12345678',
    orderCurrency: 'USD',
    orderAmount: '100.00',
    goodsInfo: 'Smart watch#,#123#,#50.00#,#2',
    cardNo: '4414444444444444',
    cardExpireMonth: '01',
    cardExpireYear: '2027',
    cardSecurityCode: '123',
    firstName: 'Doe',
    lastName: 'John',
    email: 'test@test.com',
    ip: '12.150.22.41',
    phone: '0123456',
    country: 'US',
    city: 'New York',
    address: '456 7th Street',
    zip: '10001',
    returnUrl: 'https://xxx.com/returnUrl',
    webSite: 'https://xxx.com',
    notifyUrl: 'https://xxx.com/notifyurl',
    signInfo: '61be55a8e2f6b4e172338b'
  }
}
request(options, function (error, response) {
  if (error) throw new Error(error)
  console.log(response.body)
})
js
var settings = {
  url: 'https://sandbox.fireantspay.com/TPInterface',
  method: 'POST',
  timeout: 0,
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: {
    merNo: '80000',
    gatewayNo: '80000001',
    orderNo: '12345678',
    orderCurrency: 'USD',
    orderAmount: '100.00',
    goodsInfo: 'Smart watch#,#123#,#50.00#,#2',
    cardNo: '4414444444444444',
    cardExpireMonth: '01',
    cardExpireYear: '2027',
    cardSecurityCode: '123',
    firstName: 'Doe',
    lastName: 'John',
    email: 'test@test.com',
    ip: '12.150.22.41',
    phone: '0123456',
    country: 'US',
    city: 'New York',
    address: '456 7th Street',
    zip: '10001',
    returnUrl: 'https://xxx.com/returnUrl',
    webSite: 'https://xxx.com',
    notifyUrl: 'https://xxx.com/notifyurl',
    signInfo: '61be55a8e2f6b4e172338b'
  }
}

$.ajax(settings).done(function (response) {
  console.log(response)
})
perl
curl --location 'sandbox.fireantspay.com/TPInterface' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merNo=80000' \
--data-urlencode 'gatewayNo=80000001' \
--data-urlencode 'orderNo=12345678' \
--data-urlencode 'orderCurrency=USD' \
--data-urlencode 'orderAmount=100.00' \
--data-urlencode 'goodsInfo=Smart watch#,#123#,#50.00#,#2' \
--data-urlencode 'cardNo=4414444444444444' \
--data-urlencode 'cardExpireMonth=01' \
--data-urlencode 'cardExpireYear=2027' \
--data-urlencode 'cardSecurityCode=123' \
--data-urlencode 'firstName=Doe' \
--data-urlencode 'lastName=John' \
--data-urlencode 'email=test@test.com' \
--data-urlencode 'ip=12.150.22.41' \
--data-urlencode 'phone=0123456' \
--data-urlencode 'country=US' \
--data-urlencode 'city=New York' \
--data-urlencode 'address=456 7th Street' \
--data-urlencode 'zip=10001' \
--data-urlencode 'returnUrl=https://xxx.com/returnUrl' \
--data-urlencode 'webSite=https://xxx.com' \
--data-urlencode 'notifyUrl=https://xxx.com/notifyurl' \
--data-urlencode 'signInfo=61be55a8e2f6b4e172338b'

Operation Responses

The next table describes the fields returned in all the responses. The data format is XML, The root node is respon.

NameTypeDescription
merNoStringThis value is provided by FIREANTPAY and is used toauthenticate a merchant.
gatewayNoStringThis value is provided by FIREANTPAY and is used to authenticate a merchant.
tradeNoStringUnique identifier allocated by FIREANTPAY.
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
billAddressStringBilling address
It will be returned when payment is successful.
signInfoStringDigital signature on the payment of the results of key fields. signInfo = sha256(merNo + gatewayNo + tradeNo + orderNo + orderCurrency + orderAmount + orderStatus + orderInfo + signkey);
remarkStringRemark' The self-defined message for merchant. It will be returned exactly as the original one.
redirectUrlString3D authorization Url, redirect to ‘redirectUrl’ when it is not null