Faspay
Search…
Payment Integration API
Endpoint URL
Endpoint URL is used as a feedback URL that will process the data in the post from the merchant system. There are two URLs that needs to be used, namely Production and Development. For the implementation of the testing or UAT can use the URL development.
Integration Method
Production
Development
Request Parameter
Sample Request
Field Name
Field Type
M/O/C
Description
PAYMENT_METHOD
Varchar(1)
M
For payment using credit/debit card, always set to 1.
MERCHANTID
Varchar (30)
M
Your Faspay e-Payment Merchant ID
MERCHANT_TRANID
Varchar(100)
M
Your own assigned unique ID for this transaction.
PYMT_IND
Varchar(20)
O
Specify the payment indicator to be used for this transaction. The payment indicator is used as the key identifier to set certain indication like card range to be processed. Certain card range of card can be processed. Ignore this parameter if there is not special requirement needed for the transaction. Note: PYMT_IND & PYMT_CRITERIA are to be in same sequence between the two parameters & each of the two parameters is to be separated by ';' only.
PYMT_CRITERIA
Varchar(20)
O
Specify the payment criteria to be used, together with the parameter PYMT_IND. This criteria will be set one the payment indicator had been defined. Ignore this parameter if there is not special requirement needed for the transaction. Note: PYMT_IND & PYMT_CRITERIA are to be in same sequence between the two parameters & each of the two parameters is to be separated by ';' only.
CURRENCYCODE
Varchar(3)
M
Indicate the currency of this transaction. Refer to Appendix I for Supported Currencies E.g. IDR, USD, SGD etc.
AMOUNT
Numeric
M
Amount of transaction. Supports up to 2 decimal points. E.g. amount is RM 52.50, set value as 52.50, amount is IDR 10000, set value as 10000.00
SIGNATURE
Varchar(40)
C
Transaction signature of request for data integrity check.
CUSTNAME
Varchar(120)
M
Shopper’s name.
CUSTEMAIL
Varchar(100)
M
Shopper’s email address.
SHOPPER_IP
Varchar(15)
M
IP address of the customer. If customer is connecting via a proxy server, please make sure you can provide the actual IP address instead of the proxy server IP address.
DESCRIPTION
Varchar(100)
M
Short description of the order
RESPONSE_TYPE
Varchar(1)
M
Indicate how the system should provide the transaction result. Default Value = 1 1 – Return response via browser redirection, using HTTP GET method 2 – Return response via browser with hidden form submission, i.e. using HTTP POST method 3 - response parameters will be directly printed to stream with ‘;’ as separator for each response parameter (the sequence of the parameter may be different from one release to another, please do not rely on the sequence of parameter to process response)
RETURN_URL
Varchar(100)
C
URL that page will be redirected with the transaction response after transaction has been processed. Merchant should translate the response parameter pass back to this URL and display user-friendly message to cardholder. This field is mandatory if ‘RESPONSE_TYPE’ is set to 1 or 2.
CARDNO
Varchar (20)
M
Shopper’s Credit Card number. Only for the integration using the Merchant Direct API
CARDNAME
Varchar (100)
M
Name on the Credit Card. Only for the integration using the Merchant Direct API
CARDTYPE
Char(1)
M
Indicates the card type used.
MasterCard=M
Visa=V
JCB=J
Amex=A
Only for the integration using the Merchant Direct API
EXPIRYMONTH
Char (2)
M
Use numeric representative of the month i.e. 01 - January
02 - February …
12 – December
Only for the integration using the Merchant Direct API
EXPIRYYEAR
Char(4)
M
Format of year should be YYYY i.e.2005, 2006 and etc. Only for the integration using the Merchant Direct API
1
<?php
2
3
$tranid = date("YmdGis");
4
$signaturecc=sha1('##'.strtoupper('aggregator_tes').'##'.strtoupper('ejeussad').'##'.$tranid.'##1000.00##'.'0'.'##');
5
6
$post = array(
7
"TRANSACTIONTYPE" => '1',
8
"RESPONSE_TYPE" => '2',
9
"LANG" => '',
10
"MERCHANTID" => 'aggregator_tes',
11
"PAYMENT_METHOD" => '1',
12
"TXN_PASSWORD" => 'ejeussad',
13
"MERCHANT_TRANID" => $tranid,
14
"CURRENCYCODE" => 'IDR',
15
"AMOUNT" => '1000.00',
16
"CUSTNAME" => 'merhcant test CC',
17
"CUSTEMAIL" => '[email protected]',
18
"DESCRIPTION" => 'transaski test',
19
"RETURN_URL" => 'http://localhost/creditcard/merchant_return_page.php',
20
"SIGNATURE" => $signaturecc,
21
"BILLING_ADDRESS" => 'Jl. pintu air raya',
22
"BILLING_ADDRESS_CITY" => 'Jakarta',
23
"BILLING_ADDRESS_REGION" => 'DKI Jakarta',
24
"BILLING_ADDRESS_STATE" => 'DKI Jakarta',
25
"BILLING_ADDRESS_POSCODE" => '10710',
26
"BILLING_ADDRESS_COUNTRY_CODE" => 'ID',
27
"RECEIVER_NAME_FOR_SHIPPING" => 'Faspay test',
28
"SHIPPING_ADDRESS" => 'Jl. pintu air raya',
29
"SHIPPING_ADDRESS_CITY" => 'Jakarta',
30
"SHIPPING_ADDRESS_REGION" => 'DKI Jakarta',
31
"SHIPPING_ADDRESS_STATE" => 'DKI Jakarta',
32
"SHIPPING_ADDRESS_POSCODE" => '10710',
33
"SHIPPING_ADDRESS_COUNTRY_CODE" => 'ID',
34
"SHIPPINGCOST" => '0.00',
35
"PHONE_NO" => '0897867688989',
36
"MPARAM1" => '',
37
"MPARAM2" => '',
38
"PYMT_IND" => '',
39
"PYMT_CRITERIA" => '',
40
"PYMT_TOKEN" => '',
41
42
/* ==== customize input card page ===== */
43
"style_merchant_name" => 'black',
44
"style_order_summary" => 'black',
45
"style_order_no" => 'black',
46
"style_order_desc" => 'black',
47
"style_amount" => 'black',
48
"style_background_left" => '#fff',
49
"style_button_cancel" => 'grey',
50
"style_font_cancel" => 'white',
51
/* ==== logo directly to your url source ==== */
52
"style_image_url" => 'http://url_merchant/image.png',
53
);
54
55
//Dev ke = https://fpgdev.faspay.co.id/payment
56
$string = '<form method="post" name="form" action="https://fpg.faspay.co.id/payment">';
57
if ($post != null) {
58
foreach ($post as $name=>$value) {
59
$string .= '<input type="hidden" name="'.$name.'" value="'.$value.'">';
60
}
61
}
62
63
$string .= '</form>';
64
$string .= '<script> document.form.submit();</script>';
65
echo $string;
66
exit;
67
68
?>
Copied!
Response Parameter
Response parameters are parameters that will be delivered by the system Faspay in response to the request parameters have been sent by the merchant system. If no parameters are not appropriate / value is incorrect, the transaction will be rejected in the system Faspay.
Response
Sample Response
Field Name
Field Type
M/O/C
Description
PAYMENT_METHOD
Varchar(1)
M
Indicates the payment mode used for this transaction.
MERCHANTID
Varchar (30)
M
Your Faspay e-Payment Merchant ID
MERCHANT_TRANID
Varchar(100)
M
Merchant’s own assigned transaction id as passed in from the request.
ERR_CODE
Varchar(10)
M
Error Code returns from Faspay e-Payment. If transaction is successful, this value will be 0. Any other value than 0 will indicate that the transaction is not successful.
ERR_DESC
Varchar(250)
M
Error description from Faspay e-Payment based on the ERR_CODE.
USR_CODE
Varchar(4)
C
User Code returns from Faspay e-Payment. A user code will be used to indicate the appropriate action to be taken by shopper according to different bank response code obtained. In the case of pending status, this value is will an empty value
USR_MSG
Varchar(200)
C
User Message returns from Faspay e-Payment. A user message will be used to indicate the appropriate action to be taken by shopper according to different bank response code obtained. In the case of pending status, this value is will an empty value
TXN_STATUS
Varchar(3)
M
Transaction status from Faspay e-Payment. Please refer to Appendix B for full list of transaction status.
A – Authorized
S – Sales
F – Not approved
E – Error
B – Blocked
RC – Reconfirm
N – Pending
I –Incomplete
This value must be stored and it’s the indication whether the transaction is successful, declined or error.
DESCRIPTION
Varchar(100)
O
Transaction description as passed in from the request.
CURRENCYCODE
Varchar(3)
M
Indicate the currency of this transaction. Refer to Appendix I for Supported Currencies E.g. IDR, USD, SGD etc.
AMOUNT
Numeric(10)
M
Transaction amount as passed in from the request.
SIGNATURE
Varchar(40)
M
Transaction signature of response for data integrity checking.
EUI
Varchar(3)
M
End User Indicator (EUI) is use to help merchant determine the response to display on merchant return URL. Please refer to Appendix section for further details.
SUC = Success
RTY = Retry/Failed
ALT = Alert
NA = Not Applicable
TRANSACTIONID
Integer
M
Faspay e-Payment assigned transaction id if the transaction was stored. This value must be stored and used as reference value to retrieve the transaction from Faspay e-Payment. In the event that if the request parameters are invalid, the transaction is rejected and not stored, this value will be 0.
TRANDATE
Varchar (19)
C
Transaction date of when transaction is submitted to Faspay e-Payment. Date format in ‘DD-MM-YYYY hh:mm:ss’ e.g. 24-05-2006 08:24:23 In the event of error, this field may be empty.
TRANSACTIONTYPE
Varchar(2)
M
Return transaction type corresponding to the original request
IS_BLACKLISTED
Varchar(5)
C
Indicate whether the transaction is blacklisted. Value is ‘Yes’ or ‘No’ In the event of error, this field may be empty.
FRAUDRISKLEVEL
Integer
C
Indicate fraud risk level. Value as follow:
-1 : Error or not in used.
0 – Very low risk
1 – Low risk
2 – Medium risk
3 – High risk
4 – Very high risk
In the event of error, this field may be empty.
EXCEED_HIGH_RISK
Varchar(3)
C
Indicate whether the transaction fraud score exceed the threshold value set for high risk in merchant setting. Possible value are:
Yes = Transaction fraud risk exceed merchant high risk threshold
No = Transaction fraud risk fall bellows the merchant high risk threshold
NA = Not Applicable (fraud score not available) In the event of error, this field may be empOnly for the integration using the Merchant Direct API
1
"PAYMENT_METHOD" => '1',
2
"MERCHANTID" => 'aggregator_tes',
3
"MERCHANT_TRANID" => '2016/03/000072',
4
"ERR_CODE" => 0,
5
"ERR_DESC" => 'No error',
6
"USR_CODE" => 101,
7
"USR_MSG" => 'Transaction approved',
8
"TXN_STATUS" => 'A',
9
"CUSTNAME" => 'Hanna',
10
"DESCRIPTION" => 'DeWalt Standard Heatgun',
11
"EUI" => 'SUC',
12
"CURRENCYCODE" => 'IDR',
13
"AMOUNT" => '780000.00',
14
"SIGNATURE" => '387CF32EF09215C73011943F06CB44055CA3BE05',
15
"TRANSACTIONID" => 21536,
16
"TRANSACTIONTYPE" => 1,
17
"TRANDATE" => '04-03-2016 15:22:46',
18
"ACQUIRER_ID" => 'mandiri_test',
19
"MPARAM1" => '',
20
"MPARAM2" => '',
21
"IS_BLACKLISTED" => 'No',
22
"FRAUDRISKSCORE" => 75,
23
"FRAUDRISKLEVEL" => 2,
24
"EXCEED_HIGH_RISK" => 'Yes',
25
"CARDNAME" => 'test',
26
"CARD_NO_PARTIAL" => '413718xxxxxx3783',
27
"CARDTYPE" => 'V',
28
"is_on_us" => 'Yes',
29
"ACQUIRER_BANK" => 016,
30
"BANK_RES_CODE" => 00,
31
"BANK_RES_MSG" => 'APPROVED OR COMPLETED',
32
"AUTH_ID" => 657399,
33
"BANK_REFERENCE" => 10519,
34
"WHITELIST_CARD" => 'No'
Copied!
Copy link