doTransactionPhase1 (COPY)

The doTransactionPhase1 method begins a new transaction and retrieves its properties. Upon successful completion of this phase, the client can then proceed to the next stage of the process by calling the doTransactionPhase2 method to finalize the transaction.

This method is essential for initiating a transaction, validating key information, and preparing the system for the final processing step.

Request

📘

JSON-RPC 2.0

All methods in TweezerComm follow a JSON-RPC 2.0 structure. See Integration for more details on how the requests are structured and sent.

In the request, ensure to configure the following:

  • The method field must be set to doTransactionPhase1 .
  • The service must be set to ashrait in the params.

The request includes a list of parameters, with the first being the service name, which is currently fixed as ashrait, and the second being a dictionary containing all other transaction-specific details.

{  
   "jsonrpc":"2.0",
   "method":"doTransactionPhase1",
   "params":[  
      "ashrait",
      {  
         "amount":2000,
         "vuid":"1234567890",
         "currency":"376",
         "creditTerms":1,
         "tranCode":1,
         "tranType":1,
         "cardNumber":"4580000000000000",
         "expDate":"2308",
         "cvv":"666"
      }
   ],
   "id":1
}

Request Parameters

The table below describes the request parameters for this method.

NameTypeDescription
tranCodeintegerTransaction Code. Values include: 1 (Normal), 2 (Pre Auth), 3 (Pre Auth Completion), 4 (Pre Auth Cancelation), 5 (Cancel), and 6 (Authorized transaction).
amountintegerAmount of the transaction in cents.
currencystringCurrency code in ISO 4217 format.
ecrIDstringECR/POS unique ID. Mandatory only if multiple clients use the same Merchant ID.
vuidstringVendor (client) unique transaction identifier.
tranTypeintegerTransaction type. Values include 1 (Regular), 3 (Forced Transaction), 6 (Cash Back), 7 (Cash), 30 (Balance), and 53 (Refund).
creditTermsintegerCredit card payment options. Values include 1 (Regular), 2 (Special Credit), 3 (Immediate), 6 (Credit), and 8 (Settlements).
creditPaymentsintegerThe number of credit payments.
paymentsintegerThe number of payments.
firstPaymentAmountintegerAmount in cents of the first payment.
otherPaymentAmountintegerAmount in cents of the rest of the payments.
paymentIndexintegerThe index to which the payments are linked. Values include 1 (Linked to Madad) and 2 (Linked to Dollar).
cashBackAmountintegerCash back amount in cents.
tipAmountintegerTip amount in cents.
ipayCodeintegerType of benefit. Values include 0 (currency), 1 (stars), 2 (points), 3 (club), and 99 (no benefit).
ipayAmountintegerAmount of benefit in cents.
ipayPercentintegerPercent of benefit (0-100).
ipayUnitsintegerNumber of benefit units.
posEntryModeintegerPOS Entry Mode, type of card transaction. Mandatory if card data is supplied. Values include 1 (MSR), 5 (CTLS MSR), 40 (Contact EMV), 50 (Phone), 51 (Signature only), 80 (Fallback (err)), and 81 (Fallback (no AID)).
cardTrack2stringCard track2 data.
cardNumberstringCard number (PAN) for card-not-present (CNP) transactions.
expDatestringCard expiration date in YYMM format.
cvvstringCard verification value (3 digits).
cardHolderIDstringPersonal ID of the card holder.
zipCodestringZIP code.
citystringCity.
addressstringAddress.
authNumstringAuthorization Number (7 digits).
originalUIDstringOriginal transaction unique identifier.
languagestringUI Language. Values include hebrew and english.
conversionAmountintegerThe amount in ILS after conversion from the foreign currency. Mandatory if the currency field is not 376 or 840.
changeRateintegerThe foreign currency exchange rate in precision of 4 digits after the decimal point. For example, 4.210 = 42100. Mandatory if the currency field is not 376 or 840.
retailerstringSHVA retailer number, compared with the SHVA retailer number of the payment terminal.
additionalInfojson of stringsPrivate vendor data sent to the payment gateway (up to 300 characters).
cardlessboolComplete the transaction without showing the card.
petrolboolDo a petrol transaction.
hideAnimationboolDon't show animation at the end of the transaction.

Response

A successful request will return the following response:

{  
   "jsonrpc":"2.0",
   "result":{  
      "statusCode":0,
      "statusMessage":"ok",
      "mutag":2,
      "solek":6,
      "manpik":6,
      "cardNumber":"458003***7640",
      "posEntryMode":40,
      "creditType":0,      
      "isClub":false,
      "isPrePaid":false,
      "isImmediate":false,
      "isIpayAllowed":false,
      "maxPayments":18,
      "maxCreditPayments":18,
      "minCreditPayments":3,
      "minCreditAmount":2500,
      "uid":"18071016383608830129318"
   },
   "id":1
}

Response Parameters

The table below describes the response parameters for this method.

NameTypeDescription
statusCodeintegerThe transaction status. A value of 0indicates a successful (approved) transaction.
statusMessagestringThe transaction message (e.g., ok).
mutagintegerThe card brand.
solekintegerThe acquirer.
manpikintegerThe card issuer.
cardNumberstringThe masked personal account number (PAN).
posEntryModeintegerThe POS Entry Mode. The values are the same as those in the request.
creditTermsintegerThe credit card payment options. The values are the same as those in the request.
cardNamestringThe name of the credit card.
isClubbooleanA flag indicating if the card belongs to a club.
isPrePaidbooleanA flag for prepaid transactions.
isImmediatebooleanA flag for immediate transactions.
allowedCreditTermsarray of integersAn array of allowed credit terms for this transaction.
isIpayAllowedbooleanA flag indicating if a benefit is allowed for this transaction.
maxPaymentsintegerThe maximum number of payments allowed.
maxCreditPaymentsintegerThe maximum number of credit payments allowed.
minCreditPaymentsintegerThe minimum number of credit payments allowed.
minCreditAmountintegerThe minimum allowed credit amount in cents.
uidstringThe transaction unique identifier.
tokenizedCardNumberstringThe tokenized PAN.