• Switch

Payment with 3D

Merchants can send 3D payment requests to more than one bank Virtual PoS for sales, sales in installments and pre-authorization and pre-authorization in installments transactions by sending a request to Switch 3D Gateway via HTML POST method with stored card data or open card data.

Merchants are expected to enter the PoS credential information for the banks they are currently using under the Bank Identification menu on the Switch Management Screens before sending the 3D request form created in the production environment to the Switch 3D Gateway. After this step, the Switch system stores the values defined by the merchant for each bank in encrypted form.

The smart Switch system decides which bank to send the payment request to in the transactions initiated by the merchant by triggering a 3D request, prepares the 3D Payment form with the bank credential information stored encrypted in the system and sends the request to the relevant Acquirer bank.

The 3D request received by the Acquirer bank is converted into a 3D transaction form and transmitted to the card bank via other modules and the cardholder is shown the screen where he/she will perform the verification process.

After the cardholder completes the 3D verification process, Switch 3D Gateway returns the 3D transaction result to the merchant via the success or fail URL specified by the merchant in the HTML POST.

With the Smart Switch system;

➢  Based on the bank ID sent by the merchant in the API, a payment request can be sent directly to the relevant bank.

➢  If the merchant does not send a bank ID in the API, a payment request can be sent to the bank of the card that the transaction was made.

➢  If the merchant does not send a bank ID in the API and the bank of the card being processed is not an integrated bank in the Switch system, a payment request can be sent via the bank defined by the merchant as default.

➢  If the default bank is not defined, a request can be sent to any of the defined banks.

3D Request Form and Fields

Üye işyeri tarafından hazırlanacak HTML formunda POST isteğinin gönderileceği adresler ve forma alanları aşağıdaki gibidir. Alanların her biri String olarak gönderilebilir.

Field Requirement Length Description
swtId Yes Max 36 Character This is the field where the Switch ID value defined on behalf of the workplace or company that performs the transaction is sent.
requestId Yes Max 36 Character The unique ID value generated for each transaction.
level Yes - It is the model information that determines whether the transaction will continue to be provisioned after 3D secure. This field will be set as 3D_PAY.
cardNumber Yes if the cardToken field is empty Min:15 CharacterMax:30 Character Card number
cardExpireYear Yes if the cardToken field is empty 2 Character This is the field where the year of the expiration date of the card used in the transaction is sent.
cardExpireMonth Yes if the cardToken field is empty 2 Character This is the field where the month information of the expiration date of the card used in the transaction is sent.
cardCvv No 3 Character This is the field where the CVV information of the card used in the transaction is sent.
cardToken Yes for authorization transactions with stored card Max 32 Character This is the field where Token ID information is sent.
orderId No Max 36 Character This is the field where the order number is sent.
generateOrderId No 1 Character The value of the field should be "N" if the merchant wants to use the orderId it sends in the transaction, and "Y" if the Switch wants to generate a new orderId that matches the orderId structure of the virtual pos to which the transaction will be routed. If the field is not sent at all or the value is blank, the Switch will generate a new orderId.
userId Yes Max 36 Character This is the field where the ID value of the user performing the transaction is sent.
txnType Yes - This is the field where the transaction information is sent. It should be sent as "sales" for sales transactions and "preauth" for pre-authorization transactions.
txnAmount Yes - This is the field where the transaction amount will be sent. Penny separation will be provided with ".". Example : 1.45
txnCurrencyCode Yes 3 Character This is the field where exchange rate information is sent. In ISO standards, 3 digit code will be sent. Example : 949
txnInstallmentCount No Max 3 Character This is the field where the number of transaction installments will be sent.
companyName No Max 64 Character There will be workplace name information to be used in page displays.
successUrl Yes - The address of the workplace where the successful transaction response will be returned will be included in this field.
failureUrl Yes - The address of the workplace where the erroneous transaction response will be returned will be included in this field.
txnMotoInd No 1 Character This is the field where information is sent whether the transaction is a mail order transaction or not. If 'Y', it will be perceived as a mail order transaction.
txnTimestamp Yes - Transaction time is sent in this field.
lang Yes - This is the field where the language information is sent. "en" value is expected to be sent.
refreshTime Yes - This field is used when there is a page display on the bank side. 5 value must be sent.
customerName No Max 50 Character The name of the cardholder will be included.
customerLastName No Max 50 Character The cardholder's surname information will be included.
customerGsm No Max 16 Character The GSM information of the cardholder will be included.
customerIp Yes Max 20 Character The cardholder's IP information will be included. It must be in ipv4 format.
customerEmail Yes Max 128 Character The cardholder's email information will be included.
customerNationalNumber No Max 20 Character The cardholder's TR ID number will be included.
acqId Yes - This field is used if the transaction is to be sent through the virtualpos of a specific bank. Ids corresponding to the following numbers should be used for the desired Virtualpos.Bank Code and Name:64: İŞ BANK A.Ş.62: T.GARANTİ BANKASI A.Ş46: AKBANK T.A.Ş.111: QNB FINANSBANK A.Ş.10: T.C. ZİRAAT BANKASI A.Ş.12: T. HALK BANKASI A.Ş.67: YAPI KREDİ BANK
hashedData Yes - Payment Request Hash Calculation with 3D It will be created by the workplace in accordance with the criteria described under the heading and sent in the request.
shippingAddress.name No Max 50 Character The name information of the person belonging to the cargo address will be included.
shippingAddress.lastName No Max 50 Character The surname information of the person belonging to the shipping address will be included.
shippingAddress.companyName No Max 64 Character The company name of the shipping address will be included.
shippingAddress.city No Max 50 Character The city name of the shipping address will be included.
shippingAddress.country No Max 50 Character The country name of the shipping address will be included.
shippingAddress.zipCode No Max 16 Character The postal code information of the shipping address will be included.
shippingAddress.addressDetail No Max 256 Character The detailed address field information of the shipping address will be included.
shippingAddress.phone No Max 36 Character Phone information of the shipping address will be included.
shippingAddress.gsm No Max 16 Character GSM information of the shipping address will be included.
shippingAddress.email No Max 128 Character Mail information of the shipping address will be included.
billingAddress.name No Max 50 Character The name of the person belonging to the invoice address will be included.
billingAddress.lastName No Max 50 Character The surname information of the person belonging to the invoice address will be included.
billingAddress.companyName No Max 64 Character The company name of the invoice address will be included.
billingAddress.city No Max 50 Character The city name of the shipping address will be included.
billingAddress.country No Max 50 Character The country name of the shipping address will be included.
billingAddress.zipCode No Max 16 Character The postal code information of the shipping address will be included.
billingAddress.addressDetail No Max 256 Character The detailed address field information of the shipping address will be included.
billingAddress.phone No Max 36 Character Phone information of the shipping address will be included.
billingAddress.gsm No Max 16 Character GSM information of the shipping address will be included.
billingAddress.email No Max 128 Character Mail information of the shipping address will be included.
hashVersion Yes - It should be sent as "2.0".
comments[0] comments[1] comments[2] comments[3] No Max 20 Character These are the comment fields sent to the Garanti BBVA virtual platform. The data sent in this field is not kept in Switch tables and is not sent to a virtual platform other than Garanti BBVA virtual platform. The maximum length for each comment field is 20 characters.

3D Answer Form and Fields

The 3D secure response message will be POSTed as Html Form by Switch 3D Secure Gateway to the successUrl or failureUrl addresses sent by the merchant in the request message together with the data set below.

Field Description
swtId This is the field where SwitchID information is returned.
requestId This is the field where the unique ID information sent by the workplace during the request is returned.
txnId is the field where the transaction ID information is returned.
orderId This is the field where the order number is returned.
returnCode Switch It is a field where information about the response code is returned.
reasonCode It is a field where information about the Switch Sub Answer code is returned.
message The field where the answer description is returned.
txnAmount This is the field where the transaction amount is returned.
installmentCount This is the field where the number of installments is returned.
maskedNumber This is the field where the masked card number will be returned.
acquirerId This is the field where the bank ID information is returned.
acquirerName This is the field where the name of the bank from which provision is received is returned.
hashedData Cevap hash bilgisinin dönüldüğü alandır. Üye işyerinin bu alanda dönen hash değerini hesaplayarak doğrulaması beklenir. Payment with 3D Response Hash It must be calculated by the workplace in accordance with the criteria described under the calculation heading.
terminalId is the field where the terminal information is returned.
merchantId This is the field where the workplace number is returned.
authCode This is the field where the approval code is returned in approved provision transactions.
successUrl This is the field where the successful transaction URL of the workplace is returned.
failureUrl This is the field where the failed transaction URL of the workplace is returned.
approved This is the field where the information about whether the transaction is approved or not is returned.
retrefNum This is the field where the unique transaction number on the bank side is returned.
eci This is the field where the ECI value received as a result of 3D secure verification is returned.
cavv This is the field where the CAVV value received as a result of 3D secure verification is returned.
md This is the field where the MD value received as a result of 3D secure verification is returned.
xid This is the field where the XID value received as a result of 3D secure verification is returned.
response This is the field where the result information of the Switch application is returned.
mdStatus This is the field where the MD STATUS value received as a result of 3D secure verification is returned.
timestamp This is the field where the timestamp information of the reply message is returned.
acqReturnCode This is the field where the response code generated by the merchant bank is returned.
acqReasonCode This is the field where the response code generated by the merchant bank is returned.
currencyCode This is the field where the exchange rate code is returned.
extraData This is the field where additional detail information is returned. If there is data in this field, Map<String, String> will be returned.
userId This is the field where the user who made the transaction is returned.
vposOrderId The orderid value generated by the Switch if generateOrderId was sent as Y or empty in the request message, or if this field was not sent at all.

Payment Request Hash Calculation with 3D

One of the fields that must be sent when paying with 3D is hashedData. In this field, the hash value generated using certain fields in the content of the 3D request sent must be fed. In the hash value calculation, the following parameters sent in the request must be concatenated as String side by side and the password value generated for the Switch user must be put into the calculation. The final String value obtained is used for hash calculation using SHA256 algorithm. The String produced as a result of the hash is converted to uppercase letters and fed into the hashedData field. The method and example are as follows:

3D Request Hash Hesabı :\n\nhashedData = UPPERCASE(SHA256(swtId & orderId & txnType & txnAmount & txnInstallmentCount & successUrl & failureUrl & txnTimestamp & txnCurrencyCode\n& Switch_Password)) \n\nÖrnek Data :\nswtid : CC82C381E078482AB328943FCCB7100C\norderId : unique_order_id txnType : sales txnAmount : 1.45\ntxnInstallmentCount : 0\nsuccessUrl : https://eticaret.garanti.com.tr/destek/postback.aspx failureUrl : https://eticaret.garanti.com.tr/destek/postback.aspx txnTimestamp : 18032021222930\ntxnCurrencyCode : 949 Switch_Password : 123asdASD@\n\nExample Data ile 3D Request Hash Hesabı :\nhashedData = UPPERCASE(SHA256(CC82C381E078482AB328943FCCB7100Cunique_order_idsales1\n.450https://eticaret.garanti.com.tr/destek/postback.aspxhttps://eticaret.garanti.com.tr/d estek/postback.aspx18032021222930949123asdASD@))\nhashedData = 896F569528570C0735D319F9EA16B465B89EDC2E91362A28DD6D130FFCA728C8\n

Payment Response Hash Calculation with 3D

The response form sent to the merchant after the 3D payment is received will also contain a field named hashedData. Merchant can check the validity of the incoming data by generating the value in the hashedData field using the following fields from the fields returned in the 3D response form. The Response hash can be obtained by concatenating some fields side by side as String, concatenating the Switch user password to the end of the String, hashing it with the SHA256 algorithm and converting it to uppercase letters, just like the Request hash. The method and example are as follows:

3D Response Hash Hesabı :\n\nhashedData = UPPERCASE(SHA256(requestId & swtId & returnCode & reasonCode & message & Switch_Password))\nExample Data :\nrequestId : 01032021191812\nswtId : CC82C381E078482AB328943FCCB7100C\nreturnCode : 00\nreasonCode : 00 message : Başarılı\nSwitch_Password : 123asdASD@\n\nExample Data ile 3D Response Hash Hesabı :\n\nhashedData = UPPERCASE(SHA256(01032021191812CC82C381E078482AB328943FCCB7100C0000B\naşarılı123asdASD@))\n\nhashedData = 5A9AAE6D755B8662042C02A2645108F4998EAFA2E8DF52121A259ADBF26877E0

Sample 3D Request and Response Form

A sample HTML form for 3D payment is given below in HTML Table format. After the fields here are filled in as desired, the 3D request hash is calculated and set in the hashedData field, the 3D payment request can be triggered by submitting the form to the test or prod url given below. The posted data must be in application/x-www-form-urlencoded type.

PROD Ortamı: https://kartsaklamabackend.garanti.com.tr/swt3dengine\nTEST Ortamı: https://gbtaksimtunel-integration.garanti.com.tr/swt3dengine
<html>\n <head>\n <title>3D_PAY Tester</title>\n </head>\n <body>\n <form name=\"myform\" action=\"https://gbtaksimtunel-integration.garanti.com.tr/swt3dengine\" method=\"POST\">\n <TABLE id=\"table\">\n <TBODY>\n <TR colspan=\"2\">\n <TD>\n <INPUT name=\"submit\" type=\"submit\" value=\"Submit\">\n </TD>\n </TR>\n <TR>\n <TD>swtId</TD>\n <TD>\n <input type=\"text\" id=\"swtId\" name=\"swtId\" value=\"CC82C381E078482AB328943FCCB7100C\">\n </TD>\n </TR>\n <TR>\n <TD>requestId</TD>\n <TD>\n <input type=\"text\" id=\"requestId\" name=\"requestId\" value=\"1309202181108786\">\n </TD>\n </TR>\n <TR>\n <TD>level</TD>\n <TD>\n <input type=\"text\" id=\"level\" name=\"level\" value=\"3D_PAY\">\n </TD>\n </TR>\n <TR>\n <TD>txnType</TD>\n <TD>\n <input type=\"text\" id=\"txnType\" name=\"txnType\" value=\"sales\">\n </TD>\n </TR>\n <TR>\n <TD>cardNumber</TD>\n <TD>\n <input type=\"text\" name=\"cardNumber\" value=\"5549601634451019\">\n </TD>\n </TR>\n <TR>\n <TD>cardExpireYear</TD>\n <TD>\n <input type=\"text\" name=\"cardExpireYear\" value=\"25\">\n </TD>\n </TR>\n <TR>\n <TD>cardExpireMonth</TD>\n <TD>\n <input type=\"text\" name=\"cardExpireMonth\" value=\"02\">\n </TD>\n </TR>\n <TR>\n <TD>cardCvv</TD>\n <TD>\n <input type=\"text\" name=\"cardCvv\" value=\"\">\n </TD>\n </TR>\n <TR>\n <TD>cardToken</TD>\n <TD>\n <input type=\"text\" name=\"cardToken\" value=\"\">\n </TD>\n </TR>\n <TR>\n <TD>additionalData</TD>\n <TD>\n <input type=\"text\" name=\"additionalData\" value=\"\">\n </TD>\n </TR>\n <TR>\n <TD>orderId</TD>\n <TD>\n <input type=\"text\" id=\"orderId\" name=\"orderId\" value=\"order1309\">\n </TD>\n </TR>\n <TR>\n <TD>generateOrderId</TD>\n <TD>\n <input type=\"text\" id=\"generateOrderId\" name=\"generateOrderId\" value=\"Y\">\n </TD>\n </TR>\n <TR>\n <TD>userId</TD>\n <TD>\n <input type=\"text\" id=\"userId\" name=\"userId\" value=\"PROVAUT\">\n </TD>\n </TR>\n <TR>\n <TD>customerIp</TD>\n <TD>\n <input type=\"text\" name=\"customerIp\" value=\"127.0.0.1\">\n </TD>\n </TR>\n <TR>\n <TD>customerEmail</TD>\n <TD>\n <input type=\"text\" name=\"customerEmail\" value=\"customer@mail.com\">\n </TD>\n </TR>\n <TR>\n <TD>txnAmount</TD>\n <TD>\n <input type=\"text\" id=\"txnAmount\" name=\"txnAmount\" value=\"1.50\">\n </TD>\n </TR>\n <TR>\n <TD>txnCurrencyCode</TD>\n <TD>\n <input type=\"text\" name=\"txnCurrencyCode\" value=\"949\">\n </TD>\n </TR>\n <TR>\n <TD>txnInstallmentCount</TD>\n <TD>\n <input type=\"text\" id=\"txnInstallmentCount\" name=\"txnInstallmentCount\" value=\"0\">\n </TD>\n </TR>\n <TR>\n <TD>companyName</TD>\n <TD>\n <input type=\"text\" name=\"companyName\" value=\"your_company_name\">\n </TD>\n </TR>\n <TR>\n <TD>successUrl</TD>\n <TD>\n <input type=\"text\" id=\"successUrl\" name=\"successUrl\" value=\"https://eticaret.garanti.com.tr/destek/postback.aspx\">\n </TD>\n </TR>\n <TR>\n <TD>failureUrl</TD>\n <TD>\n <input type=\"text\" id=\"failureUrl\" name=\"failureUrl\" value=\"https://eticaret.garanti.com.tr/destek/postback.aspx\">\n </TD>\n </TR>\n <TR>\n <TD>txnMotoInd</TD>\n <TD>\n <input type=\"text\" name=\"txnMotoInd\" value=\"N\">\n </TD>\n </TR>\n <TR>\n <TD>txnTimestamp</TD>\n <TD>\n <input type=\"text\" id=\"txnTimestamp\" name=\"txnTimestamp\" value=\"\n20100111174711\">\n </TD>\n </TR>\n <TR>\n <TD>lang</TD>\n <TD>\n <input type=\"text\" name=\"lang\" value=\"tr\">\n </TD>\n </TR>\n <TR>\n <TD>refreshTime</TD>\n <TD>\n <input type=\"text\" name=\"refreshTime\" value=\"5\">\n </TD>\n </TR>\n <TR>\n <TD>hashedData</TD>\n <TD>\n <input id=\"hashedData\" type=\"text\" name=\"hashedData\" value=\"replace with value calculated from 3D Request Hash Calculation\">\n </TD>\n </TR>\n <TR>\n <TD>acqId</TD>\n <TD>\n <input type=\"text\" name=\"acqId\" value=\"62\">\n </TR>\n <TR>\n <TD>customerName</TD>\n <TD>\n <input type=\"text\" name=\"customerName\" value=\"name\">\n </TD>\n </TR>\n <TR>\n <TD> customerLastName</TD>\n <TD>\n <input type=\"text\" name=\"customerLastName\" value=\"surname\">\n </TD>\n </TR>\n <TR>\n <TD>customerGsm</TD>\n <TD>\n <input type=\"text\" name=\"customerGsm\" value=\"5555555555\">\n </TD>\n </TR>\n <TR>\n <TD>customerNationalNumber</TD>\n <TD>\n <input type=\"text\" name=\"customerNationalNumber\" value=\"40887026099\">\n </TD>\n </TR>\n <TR>\n <TD>hashVersion</TD>\n <TD>\n <input type=\"text\" name=\"hashVersion\" value=\"2.0\">\n </TD>\n </TR>\n <TR>\n <TD>comments[0]</TD>\n <TD>\n <input type=\"text\" name=\"comments[0]\" value=\"Garanti Test\">\n </TD>\n </TR>\n <TR>\n <TD>comments[1]</TD>\n <TD>\n <input type=\"text\" name=\"comments[1]\" value=\"Garanti Test 10\">\n </TD>\n </TR>\n </TBODY>\n </TABLE>\n </form>\n </body>\n <html>

3D_PAY HTML Response Form Sample (Sales)

3D_PAY HTML Request Form Sample (Pre-Authorization)

<html>\n <head>\n <title>3D_PAY Tester</title>\n </head>\n <body>\n <form name=\"myform\" action=\"https://gbtaksimtunel-integration.garanti.com.tr/swt3dengine\" method=\"POST\">\n <TABLE id=\"table\">\n <TBODY>\n <TR colspan=\"2\">\n <TD>\n <INPUT name=\"submit\" type=\"submit\" value=\"Submit\">\n </TD>\n </TR>\n <TR>\n <TD>swtId</TD>\n <TD>\n <input type=\"text\" id=\"swtId\" name=\"swtId\" value=\"CC82C381E078482AB328943FCCB7100C\">\n </TD>\n </TR>\n <TR>\n <TD>requestId</TD>\n <TD>\n <input type=\"text\" id=\"requestId\" name=\"requestId\" value=\"13092021811087865\">\n </TD>\n </TR>\n <TR>\n <TD>level</TD>\n <TD>\n <input type=\"text\" id=\"level\" name=\"level\" value=\"3D_PAY\">\n </TD>\n </TR>\n <TR>\n <TD>txnType</TD>\n <TD>\n <input type=\"text\" id=\"txnType\" name=\"txnType\" value=\"preauth\">\n </TD>\n </TR>\n <TR>\n <TD>cardNumber</TD>\n <TD>\n <input type=\"text\" name=\"cardNumber\" value=\"5549601634451019\">\n </TD>\n </TR>\n <TR>\n <TD>cardExpireYear</TD>\n <TD>\n <input type=\"text\" name=\"cardExpireYear\" value=\"25\">\n </TD>\n </TR>\n <TR>\n <TD>cardExpireMonth</TD>\n <TD>\n <input type=\"text\" name=\"cardExpireMonth\" value=\"02\">\n </TD>\n </TR>\n <TR>\n <TD>cardCvv</TD>\n <TD>\n <input type=\"text\" name=\"cardCvv\" value=\"\">\n </TD>\n </TR>\n <TR>\n <TD>cardToken</TD>\n <TD>\n <input type=\"text\" name=\"cardToken\" value=\"\">\n </TD>\n </TR>\n <TR>\n <TD>additionalData</TD>\n <TD>\n <input type=\"text\" name=\"additionalData\" value=\"\">\n </TD>\n </TR>\n <TR>\n <TD>orderId</TD>\n <TD>\n <input type=\"text\" id=\"orderId\" name=\"orderId\" value=\"order13091\">\n </TD>\n </TR>\n <TR>\n <TD>generateOrderId</TD>\n <TD>\n <input type=\"text\" id=\"generateOrderId\" name=\"generateOrderId\" value=\"Y\">\n </TD>\n </TR>\n <TR>\n <TD>userId</TD>\n <TD>\n <input type=\"text\" id=\"userId\" name=\"userId\" value=\"PROVAUT\">\n </TD>\n </TR>\n <TR>\n <TD>customerIp</TD>\n <TD>\n <input type=\"text\" name=\"customerIp\" value=\"127.0.0.1\">\n </TD>\n </TR>\n <TR>\n <TD>customerEmail</TD>\n <TD>\n <input type=\"text\" name=\"customerEmail\" value=\"customer@mail.com\">\n </TD>\n </TR>\n <TR>\n <TD>txnAmount</TD>\n <TD>\n <input type=\"text\" id=\"txnAmount\" name=\"txnAmount\" value=\"1.50\">\n </TD>\n </TR>\n <TR>\n <TD>txnCurrencyCode</TD>\n <TD>\n <input type=\"text\" name=\"txnCurrencyCode\" value=\"949\">\n </TD>\n </TR>\n <TR>\n <TD>txnInstallmentCount</TD>\n <TD>\n <input type=\"text\" id=\"txnInstallmentCount\" name=\"txnInstallmentCount\" value=\"0\">\n </TD>\n </TR>\n <TR>\n <TD>companyName</TD>\n <TD>\n <input type=\"text\" name=\"companyName\" value=\"your_company_name\">\n </TD>\n </TR>\n <TR>\n <TD>successUrl</TD>\n <TD>\n <input type=\"text\" id=\"successUrl\" name=\"successUrl\" value=\"https://eticaret.garanti.com.tr/destek/postback.aspx\">\n </TD>\n </TR>\n <TR>\n <TD>failureUrl</TD>\n <TD>\n <input type=\"text\" id=\"failureUrl\" name=\"failureUrl\" value=\"https://eticaret.garanti.com.tr/destek/postback.aspx\">\n </TD>\n </TR>\n <TR>\n <TD>txnMotoInd</TD>\n <TD>\n <input type=\"text\" name=\"txnMotoInd\" value=\"N\">\n </TD>\n </TR>\n <TR>\n <TD>txnTimestamp</TD>\n <TD>\n <input type=\"text\" id=\"txnTimestamp\" name=\"txnTimestamp\" value=\"20100111174711\">\n </TD>\n </TR>\n <TR>\n <TD>lang</TD>\n <TD>\n <input type=\"text\" name=\"lang\" value=\"tr\">\n </TD>\n </TR>\n <TR>\n <TD>refreshTime</TD>\n <TD>\n <input type=\"text\" name=\"refreshTime\" value=\"5\">\n </TD>\n </TR>\n <TR>\n <TD>hashedData</TD>\n <TD>\n <input id=\"hashedData\" type=\"text\" name=\"hashedData\" value=\"replace with value calculated from 3D Request Hash Calculation\">\n </TD>\n </TR>\n <TR>\n <TD>acqId</TD>\n <TD>\n <input type=\"text\" name=\"acqId\" value=\"62\">\n </TR>\n <TR>\n <TD>customerName</TD>\n <TD>\n <input type=\"text\" name=\"customerName\" value=\"name\">\n </TD>\n </TR>\n <TR>\n <TD> customerLastName</TD>\n <TD>\n <input type=\"text\" name=\"customerLastName\" value=\"surname\">\n </TD>\n </TR>\n <TR>\n <TD>customerGsm</TD>\n <TD>\n <input type=\"text\" name=\"customerGsm\" value=\"5555555555\">\n </TD>\n </TR>\n <TR>\n <TD>customerNationalNumber</TD>\n <TD>\n <input type=\"text\" name=\"customerNationalNumber\" value=\"40887026099\">\n </TD>\n </TR>\n <TR>\n <TD>hashVersion</TD>\n <TD>\n <input type=\"text\" name=\"hashVersion\" value=\"2.0\">\n </TD>\n </TR>\n <TR>\n <TD>comments[0]</TD>\n <TD>\n <input type=\"text\" name=\"comments[0]\" value=\"Garanti Test\">\n </TD>\n </TR>\n <TR>\n <TD>comments[1]</TD>\n <TD>\n <input type=\"text\" name=\"comments[1]\" value=\"Garanti Test 10\">\n </TD>\n </TR>\n </TBODY>\n </TABLE>\n </form>\n </body>\n <html>

3D_PAY HTML Response Form Sample (Pre-Authorization)

Sample 3D Request in a Test Environment

After the fields in the 3D request HTML are set and the hash calculation is made and the hashedData field is set, the 3D process is triggered by submitting the form to the following URL for the test environment.

https://gbtaksimtunel-integration.garanti.com.tr/swt3dengine

The following data was taken while submitting forms in the test environment.

3D_PAY Form Request Data Sample\n\nsubmit: Submit\nswtId: CC82C381E078482AB328943FCCB7100C\nrequestId: 19032021162734 \nlevel: 3D_PAY\ntxnType: sales\ncardNumber: 4824914773021017\ncardExpireYear: 22\ncardExpireMonth: 08 \ncardCvv:\ncardToken:\nadditionalData:\norderId: deneme_19032021162734 \ngenerateOrderId: Y\nuserId: PROVAUT \ncustomerIp: 127.0.0.1\ncustomerEmail: ETicaretDestek@garantibbva.com.tr \ntxnAmount: 1.50\ntxnCurrencyCode: 949\ntxnInstallmentCount: 0 \ncompanyName: TEST\nsuccessUrl: https://eticaret.garanti.com.tr/destek/postback.aspx \nfailureUrl: https://eticaret.garanti.com.tr/destek/postback.aspx \ntxnMotoInd: N\ntxnTimestamp: 20100111174711 lang: tr\nrefreshTime: 5\nhashedData: 7BD1234426177861CFEFB50D9B1C09D135966D390541BBC1FDD668CB7B65A07D\nacqId:\ncustomerName: name \ncustomerLastName: surname \ncustomerGsm: 5411230541\ncustomerNationalNumber: 40887026099\nhashVersion: 2.0\ncomments[0]: Garanti Test \ncomments[1]: Garanti Test 10

After these fields are submitted, the Garanti Bank 3D Secure page will open, the default phone number from the dropdown here must be selected and the OK button must be pressed:

After pressing the OK button, you will be redirected to a page like the one below, where 123456 must be written in the SMS Password section for each request. After entering the password, the OK button on this page will be pressed and 3D Verification will be done:

After 3D Verification, the following fields will be returned in the form as a result:

3D_PAY Form Response Data Sample

swtId: CC82C381E078482AB328943FCCB7100C\nrequestId: 19032021162734\ntxnId: TRXNE88D7BDAFC6F439FBD7D1D1BF4CC0EB7\nreturnCode: 00\nreasonCode: 00 \nmessage: Başarılı installmentCount: 0\ntxnAmount: 150\ncurrencyCode: 949 \nmaskedNumber: 482491***1017 \nacquirerId: 62\nacquirerName: T. GARANTİ BANKASI A.Ş \norderId: deneme_19032021162734 \nhashedData: 04A6AF57D333524B394A859C08F02013443E5B3977EEEBE451EECFAC15A83251\nterminalId: 30690168\nmerchantId: 7000679\nauthCode: 681204\nsuccessUrl: https://eticaret.garanti.com.tr/destek/postback.aspx \nfailureUrl: https://eticaret.garanti.com.tr/destek/postback.aspx \napproved: true\nretrefNum: 107803500194 response: Approved mdErrorMessage: \nAuthenticated eci: 05\ncavv: AAABCYUhmDglFgBlJiGYAAAAAAA= \nmd: tFdSJdmnKSoSJmpF9+6jj1SvXe7dWufQ6m2nF25/kM+CM5ppaXIm6CTzTUh968Xtu0M bl2KaXumTO9l4Qo/G8fo9Iig5da9dh5p57c/pTuqOVJEW8Tp6sCLIObi3yIsU8lX7iheRCIK N+KElWCt8EVMLpDSn4p+jY5xm7Wut+uw=\nxid: kGHBIA2uyxQADQRV3SAqmCEQP8A=\nmdStatus: 1\nacqReturnCode: 00 \nacqReasonCode:\nvposOrderId: ORDR60145B48A0DF418992981D12A73630B3

We would love to hear from you. Do you have problems/questions about services ? Send us detailed email about it ?

Send Us a Question Send Us a Question