doTransactionPhase1
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.0All 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 todoTransactionPhase1
. - The service must be set to
ashrait
in theparams
.
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.
Name | Type | Description |
---|---|---|
tranCode | integer | Transaction Code. Values include: 1 (Normal), 2 (Pre Auth), 3 (Pre Auth Completion), 4 (Pre Auth Cancelation), 5 (Cancel), and 6 (Authorized transaction). |
amount | integer | Amount of the transaction in cents. |
currency | string | Currency code in ISO 4217 format. |
ecrID | string | ECR/POS unique ID. Mandatory only if multiple clients use the same Merchant ID. |
vuid | string | Vendor (client) unique transaction identifier. |
tranType | integer | Transaction type. Values include 1 (Regular), 3 (Forced Transaction), 6 (Cash Back), 7 (Cash), 30 (Balance), and 53 (Refund). |
creditTerms | integer | Credit card payment options. Values include 1 (Regular), 2 (Special Credit), 3 (Immediate), 6 (Credit), and 8 (Settlements). |
creditPayments | integer | The number of credit payments. |
payments | integer | The number of payments. |
firstPaymentAmount | integer | Amount in cents of the first payment. |
otherPaymentAmount | integer | Amount in cents of the rest of the payments. |
paymentIndex | integer | The index to which the payments are linked. Values include 1 (Linked to Madad) and 2 (Linked to Dollar). |
cashBackAmount | integer | Cash back amount in cents. |
tipAmount | integer | Tip amount in cents. |
ipayCode | integer | Type of benefit. Values include 0 (currency), 1 (stars), 2 (points), 3 (club), and 99 (no benefit). |
ipayAmount | integer | Amount of benefit in cents. |
ipayPercent | integer | Percent of benefit (0-100). |
ipayUnits | integer | Number of benefit units. |
posEntryMode | integer | POS 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)). |
cardTrack2 | string | Card track2 data. |
cardNumber | string | Card number (PAN) for card-not-present (CNP) transactions. |
expDate | string | Card expiration date in YYMM format. |
cvv | string | Card verification value (3 digits). |
cardHolderID | string | Personal ID of the card holder. |
zipCode | string | ZIP code. |
city | string | City. |
address | string | Address. |
authNum | string | Authorization Number (7 digits). |
originalUID | string | Original transaction unique identifier. |
language | string | UI Language. Values include hebrew and english. |
conversionAmount | integer | The amount in ILS after conversion from the foreign currency. Mandatory if the currency field is not 376 or 840. |
changeRate | integer | The 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. |
retailer | string | SHVA retailer number, compared with the SHVA retailer number of the payment terminal. |
additionalInfo | json of strings | Private vendor data sent to the payment gateway (up to 300 characters). |
cardless | bool | Complete the transaction without showing the card. |
petrol | bool | Do a petrol transaction. |
hideAnimation | bool | Don'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.
Name | Type | Description |
---|---|---|
statusCode | integer | The transaction status. A value of 0 indicates a successful (approved) transaction. |
statusMessage | string | The transaction message (e.g., ok ). |
mutag | integer | The card brand. |
solek | integer | The acquirer. |
manpik | integer | The card issuer. |
cardNumber | string | The masked personal account number (PAN). |
posEntryMode | integer | The POS Entry Mode. The values are the same as those in the request. |
creditTerms | integer | The credit card payment options. The values are the same as those in the request. |
cardName | string | The name of the credit card. |
isClub | boolean | A flag indicating if the card belongs to a club. |
isPrePaid | boolean | A flag for prepaid transactions. |
isImmediate | boolean | A flag for immediate transactions. |
allowedCreditTerms | array of integers | An array of allowed credit terms for this transaction. |
isIpayAllowed | boolean | A flag indicating if a benefit is allowed for this transaction. |
maxPayments | integer | The maximum number of payments allowed. |
maxCreditPayments | integer | The maximum number of credit payments allowed. |
minCreditPayments | integer | The minimum number of credit payments allowed. |
minCreditAmount | integer | The minimum allowed credit amount in cents. |
uid | string | The transaction unique identifier. |
tokenizedCardNumber | string | The tokenized PAN. |
Updated about 6 hours ago