Faspay
  • Homepage
  • Getting Started
    • Faspay Business
      • Debit Transaction
        • Features
          • Static Transaction
            • Virtual Account Static
          • UNIcount
      • Credit Card Transaction
        • Recurring Payment
    • Faspay Billing
      • Introduction
      • Feature
      • How To Use
        • Getting Started
        • Dashboard
        • Recipient
          • List Recipient
          • Recipient Group
          • Recurrence Status
        • Scheduled Status
        • Invoice
        • Report
        • Create Billing System
          • Single Billing
          • Mass Billing
        • Billing Setting
          • Reminder Setting
          • Template Setting
          • Invoice Status
    • Faspay Billing 2.0
      • How to Use
        • Getting Started
        • Billings
          • Billings List
            • Detail Billing
            • Upload Document
          • Scheduled Billing
          • Recurring Billing
          • Static VA Generator
            • Static VA Close Generator
            • Static VA Open Generator
            • Static VA List
            • Payment History
            • Excel File Template
        • Customers
          • Customer List
          • Customer Group
        • Reports
          • Invoice Issued
          • Payment History
          • Summary Outstanding
          • Detail Outstanding
          • Invoice Aging Report
          • Invoice Paid Report
          • Export Report
        • Items
          • Product Catalogs
          • Rooms
          • Product Category
          • UoM (Unit of Measurement)
        • E-Faktur
          • E-Faktur Range Number
            • Generate E-Faktur Number
            • Cancelation E-Faktur Number
          • Export CSV
          • E-Faktur Files
          • Setting Threshold E-Faktur
        • QR Business Profile
          • Create Business Profile
          • Business Profile List
          • Access Business Profile Page
          • Transaction History on Business Profile
            • Lite Sales App
        • Billing Settings
    • Faspay Xpress
      • Faspay Xpress 4.0
        • Setting Language
        • Payment Method
        • Quick Payment Guide
        • Send your Order Details and Payment Instructions
        • Payment Status
        • Payment Receipt
        • Rating Payment
      • Setting Xpress
    • Faspay SendMe
      • Introduction
      • Credentials
      • List Of Service API
      • Authentication
        • Header
        • Authorization
        • Signature
          • Generate signature token
          • Generate signature other service
          • HTTP Method
          • Relative URL
        • Request Body
        • Access Token
      • Cash Out
        • Alfamart Cash Out
        • Indomaret Cash Out
      • E-Wallet
    • SNAP
      • SNAP Direct Debit
      • SNAP QRIS
      • SNAP Virtual Account
      • SNAP Disbursement
  • Merchant Integration
    • API Reference
      • Debit
        • Payment Channel Inquiry
        • Post Data Transaction
        • Redirect Process
        • Inquiry Payment Status
        • Cancel Transaction
        • Payment Notification
        • URL Callback/Return URL
        • Reference
          • Status Response Code
          • Payment Channel Code
        • Bank Transfer Integration Guide
        • Internet Banking integration Guide
        • Retail Payment Integration Guide
        • Online Debit Integration Guide
          • B-secure
          • BRI Direct Debit
        • Online Credit Integration Guide
          • Status Response Code
        • e-Money Integration Guide
          • LinkAja Integration Guide
          • LinkAja QRIS Integration Guide
          • LinkAja AppLink Integration Guide
          • DANA Integration Guide
          • Sakuku Integration Guide
          • OVO Integration Guide
          • ShopeePay Jump App Integration Guide
          • ShopeePay QRIS Integration Guide
          • OVO Tokenize Integration Guide
          • DANA Subs Integration Guide
          • Paydia QRIS Integration Guide
        • Features
          • Static Transaction Integration
            • BNI VA Static Integration
            • BNC VA Static Integration
          • Unicount
        • Postman Collection
      • Credit Card
        • Payment Integration API
        • Additional API Integration
          • Inquiry Payment Status
          • Capture Transaction
          • Transaction Void
          • Refund Transaction
          • Signature Transaction
            • Generate Signature Request
            • Genarete signature response
          • Server CallBack / URL Notification Credit Card
          • API Tokenization
            • Payment Window Integration API
            • Payment Direct API
            • Advance Functionality API Tokenization
              • Inquiry Detail Token
              • Inquiry Delete Token
              • Inquiry Last Token (Dynamic Token Only)
        • Recurring Payment API
          • Message Flow Transaction
            • Post Transaction
            • Update Card
          • JSON Message Format
            • Update Member
            • Inquiry Status
            • Payment Notification
            • Notification CC Expired
          • Status Response Code
        • Response Transaction
          • Response Success
          • Response Failed
          • Response Code Error Transaction
          • User Notification Screen
        • Reference
          • Faspay e-Payment Error Code Listing - CC
          • Transaction Status - CC
          • End User Indicator (EUI)
          • Categories of User Code and User Message - CC
          • ECI
      • Xpress
        • Xpress Version 4🆕
      • Faspay Billing API
        • Create Billing
        • Inquiry Billing
        • Cancel Billing
        • Get List Invoice
        • Callback
      • SendMe
        • Register Account
        • Confirmation Register Account
        • Transfer
        • Inquiry Name
        • Inquiry Balance
        • Mutasi
        • Inquiry Status
        • Notification / Callback
        • Error Code And Response Code
        • APPENDIX
        • Cash Out
          • ATM Permata Cash Out
          • Alfamart Cash Out
          • Indomaret Cash Out
        • E-Wallet (Top Up)
          • Inquiry Name
          • Transfer (Top Up)
      • SNAP
        • Signature SNAP
        • SNAP Virtual Account
        • SNAP Direct Debit
        • SNAP QRIS
        • SNAP Disbursement
          • Response Code
      • Route Payment
        • Post Data Transaction
        • SNAP Generate QRIS
        • SNAP Create Virtual Account
        • SNAP Direct Debit
        • Inquiry Static VA
        • SNAP Inquiry Static VA
        • Response Code
    • E-Commerce Plugin
      • Woocommerce
      • Ecwid
  • SDK Integration
    • SendMe SDK
      • Integration with Java SDK
      • Integrate with PHP SDK
      • Integrate with Python SDK
  • BEFORE LIVE
    • Whitelist IP
    • Account Testing
    • Sample Code
  • AFTER LIVE
  • Merchant page Reference
    • Change Password
    • Dashboard
    • Transactions
      • Debit
      • Credit
      • Settlement
      • Notification
    • Settings Profile
    • Faspay Business
      • Credential Settings
      • Report Settings
        • Daily Report Settings
        • Daily Report
        • Resend Daily Report
      • Developer Settings
      • Route Payment
        • Transaction Report
        • History
    • Faspay SendMe
      • Google Authenticator Pairing
      • Disbursement Account
      • Withdrawal
      • Withdraw History
      • Single Transfer
      • Mass Transfer
        • Upload File
        • Validation
        • Mass Transfer
      • Transaction History
      • Paycheck
      • Top Up
      • Credential Settings
      • Report Settings
        • Daily Report
        • Daily Report Setting
        • Resend Daily Report
Powered by GitBook
On this page
  1. Merchant Integration
  2. API Reference
  3. Credit Card

Payment Integration API

Endpoint URL

The endpoint URL is a feedback URL that will process the data in the post from the merchant system. For the implementation of the testing, UAT can use URL development.

Integration Method
Development

Merchant Window API

Merchant Direct API

Request Parameter

Request parameters are parameters that the merchant's system must provide that can be integrated with the system Faspay.

Parameter
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_id

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

cardcvc

Char(4)

C

Card Verification Number (Last 3 digits located usually on the back of shopper’s credit card). This field can be optional if the Allow CVC field in Merchant Setting is disabled . Only for the integration using the Merchant Direct API

card_issuer_bank _country_code

Varchar (2)

O

Country of the credit card issuing bank

billing_address

Varchar(200)

M

Shopper’s billing address

billing_address _city

Varchar(50)

M

Shopper’s billing city

billing_address _region

Varchar(100)

M

Shopper’s billing region

billing_address _state

Varchar(100)

M

Shopper’s billing state

billing_address _poscode

Varchar(10)

M

Shopper’s billing postcode

billing_address _country_code

Varchar(10)

M

Shopper’s billing country code

receiver_name _for_shipping

Varchar(100)

M

Name of person to receive goods at the shipping address provided.

shipping_address

Varchar(200)

M

Shopper’s shipping address

shipping_address _city

Varchar(50)

M

Shopper’s shipping city

shipping_address _region

Varchar(100)

M

Shopper’s shipping region

shipping_address _state

Varchar(100)

M

Shopper’s shipping state

shipping_address _poscode

Varchar(10)

M

Shopper’s shipping postcode

shipping_address _country_code

Varchar(10)

M

Shopper’s shipping country code

shippingcost

Numeric

O

Amount of shipping cost. Supports up to 2 decimal point. E.g. amount is RM 52.50, set value as 52.50, amount is IDR 10000, set value as 10000.

phone_no

Varchar(20)

M

Shopper's phone number

mparam1

Varchar(200)

O

Additional parameter the merchant wish to receive back as response for processing. This value is not stored by Faspay e-Payment.

mparam2

Varchar(200)

O

Additional parameter the merchant wish to receive back as response for processing. This value is not stored by Faspay e-Payment.

<?php

$tranid = date("YmdGis");
$signaturecc=sha1('##'.strtoupper('sophia_store').'##'.strtoupper('ejeussad').'##'.$tranid.'##1000.00##'.'0'.'##');

$post = array(
"TRANSACTIONTYPE"               => '1',
"RESPONSE_TYPE"                 => '2',
"LANG"                          => '',                              
"MERCHANTID"                    => 'sophia_store',                            
"PAYMENT_METHOD"                => '1',
"TXN_PASSWORD"                  => 'ejeussad',
"MERCHANT_TRANID"               => $tranid,       
"CURRENCYCODE"                  => 'IDR',
"AMOUNT"                        => '1000.00',
"CUSTNAME"                      => 'John Doe',
"CUSTEMAIL"                     => 'john@gmail.com',
"DESCRIPTION"                   => 'Faber Castell Pencil',
"RETURN_URL"                    => 'http://localhost/creditcard/merchant_return_page.php', 
"SIGNATURE"                     => $signaturecc, 
"BILLING_ADDRESS"               => 'Jl. pintu air raya',
"BILLING_ADDRESS_CITY"          => 'Jakarta',
"BILLING_ADDRESS_REGION"        => 'DKI Jakarta',
"BILLING_ADDRESS_STATE"         => 'DKI Jakarta',
"BILLING_ADDRESS_POSCODE"       => '10710',
"BILLING_ADDRESS_COUNTRY_CODE"  => 'ID',
"RECEIVER_NAME_FOR_SHIPPING"    => 'John Doe',
"SHIPPING_ADDRESS"              => 'Jl. pintu air raya',
"SHIPPING_ADDRESS_CITY"         => 'Jakarta',
"SHIPPING_ADDRESS_REGION"       => 'DKI Jakarta',
"SHIPPING_ADDRESS_STATE"        => 'DKI Jakarta',
"SHIPPING_ADDRESS_POSCODE"      => '10710',
"SHIPPING_ADDRESS_COUNTRY_CODE" => 'ID',
"SHIPPINGCOST"                  => '0.00',
"PHONE_NO"                      => '0897867688989',
"MPARAM1"                       => '',
"MPARAM2"                       => '',
"PYMT_IND"                      => '', 
"PYMT_CRITERIA"                 => '', 
"PYMT_TOKEN"                    => '', 
 
 /* ==== customize input card page ===== */ 
 "style_merchant_name"         => 'black',
 "style_order_summary"         => 'black',
 "style_order_no"              => 'black',
 "style_order_desc"            => 'black',
 "style_amount"                => 'black',
 "style_background_left"       => '#fff',
 "style_button_cancel"         => 'grey',
 "style_font_cancel"           => 'white',
  /* ==== logo directly to your url source ==== */ 
 "style_image_url"           => 'http://url_merchant/image.png',
   );

//Dev ke = https://fpgdev.faspay.co.id/payment
$string = '<form method="post" name="form" action="https://fpg.faspay.co.id/payment">'; 
if ($post != null) {
foreach ($post as $name=>$value) {
$string .= '<input type="hidden" name="'.$name.'" value="'.$value.'">';
    }
 }

$string .= '</form>';
$string .= '<script> document.form.submit();</script>';
echo $string;
exit;

?>

Response Parameter

Response parameters are parameters that will be delivered by the system Faspay in response to the request parameters that have been sent by the merchant system. If no parameters are appropriate / value is incorrect, the transaction will be rejected in the system Faspay.

Parameter
Data 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

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

card_no_partial

Varchar(20)

C

Returns first 6 and last 4 digits of credit card. E.g.: 455555XXXXXX1234 In the event of error, this field may be empty. Only for the integration using the Merchant Direct API

acquirer_bank

Varchar(3)

C

Acquiring bank that processed this credit card transaction. Coded value. Please refer to Appendix. This parameter will only have value if the transaction request fulfills all the mandatory parameters and passes all parameters validation checking in Faspay e-Payment server. It will be empty also if Faspay e-Payment server does not send in the transaction to any bank. This may happen, in few possible cases like, Faspay e-Payment server cannot find any suitable acquirer setup to process the transaction, or the transaction is blocked based on merchant settings.

bank_res_code

Varchar(20)

C

Response code or error code from bank. In the event of error, this field may be empty.

bank_res_msg

Varchar(250)

C

Bank description on the response based on BANK_RES_CODE. In the event of error, this field may be empty.

auth_id

Varchar(20)

C

Bank approval code (if transaction is approved). If transaction is declined or error, this parameter will be empty.

mparam1

Varchar(200)

O

Additional parameter as what is passed in request. This value is not stored by Faspay e-Payment.

mparam2

Varchar(200)

O

Additional parameter as what is passed in request. This value is not stored by Faspay e-Payment

whitelist_card

Varchar(3)

C

Indicate whether the transaction is use whitelist card. Value is ‘Yes’ or ‘No’

custname

Varchar(120)

M

Shopper’s name.

acquirer_id

VarcharI(30)

O

Your Faspay e-Payment Acquirer ID

is_on_us

Varchar(3)

M

Indicate whether the transaction is using on us card. Value is ‘Yes’ or ‘No’

"PAYMENT_METHOD"       => '1',
"MERCHANTID"           => 'sophia_store',
"MERCHANT_TRANID"      => '2016/03/000072',
"ERR_CODE"             => 0,
"ERR_DESC"             => 'No error',
"USR_CODE"             => 101,
"USR_MSG"              => 'Transaction approved',
"TXN_STATUS"           => 'A',
"CUSTNAME"             => 'John Doe',
"DESCRIPTION"          => 'DeWalt Standard Heatgun',
"EUI"                  => 'SUC',
"CURRENCYCODE"         => 'IDR',
"AMOUNT"               => '780000.00',
"SIGNATURE"            => '387CF32EF09215C73011943F06CB44055CA3BE05',
"TRANSACTIONID"        => 21536,
"TRANSACTIONTYPE"      => 1,
"TRANDATE"             => '04-03-2016 15:22:46',
"ACQUIRER_ID"          => 'mandiri',
"MPARAM1"              => '',
"MPARAM2"              => '',
"IS_BLACKLISTED"       => 'No',
"FRAUDRISKSCORE"       => 75,
"FRAUDRISKLEVEL"       => 2,
"EXCEED_HIGH_RISK"     => 'Yes',
"CARDNAME"             => 'John Doe',
"CARD_NO_PARTIAL"      => '413718xxxxxx3783',
"CARDTYPE"             => 'V',
"is_on_us"             => 'Yes',
"ACQUIRER_BANK"        => 016,
"BANK_RES_CODE"        => 00,
"BANK_RES_MSG"         => 'APPROVED OR COMPLETED',
"AUTH_ID"              => 657399,
"BANK_REFERENCE"       => 10519,
"WHITELIST_CARD"       => 'No'
PreviousCredit CardNextAdditional API Integration

Last updated 11 months ago

https://fpg-sandbox.faspay.co.id/payment
https://fpg-sandbox.faspay.co.id/payment