Step 3 – Charging a Token / Capturing a Credit Limit / Charging Credit Card Details via a Direct Interface (Do Transaction)
When should this function be used?
This function is generally used after Steps 1 and 2.
Businesses that want to create subscriptions and work with tokens and credit-limit captures will use this function.
In addition, this function is intended for charging through a direct-interface model.
What is a “direct interface”?
A direct interface is intended for closed and secure systems or closed native applications (iOS/Android). Charging through a direct interface is performed without redirecting the customer to Cardcom’s PCI-compliant payment page.
Important: The direct-interface model is not intended for websites (WEB). Such systems must use the “low profile” module.
For a direct interface on the WEB, PCI compliance is mandatory. Without it, the business is exposed to hacking and fraud.
In applications, PCI compliance is less important because hacking one application does not constitute a breach of the details of all other customers.
The direct-interface charging process
When working with a direct interface, it is not possible to use Cardcom’s PCI compliance, so PCI compliance must be obtained directly from the credit card company. In addition, credit card details must not be stored in the system; they may only be transferred through the interface. CVV must not be stored either.
Common operations in the “Do Transaction” function
The “Do Transaction” function supports the following operations:
- Charging and refunding tokens.
- Recurring token charges (direct debit).
- Charging and releasing a credit limit captured in Step 1.
- Charging using credit card details (direct interface).
Note: To charge a token, the terminal must be configured with the credit card companies to operate without requiring CVV.
A terminal configured this way does not check the card’s validity beyond requiring a future expiration date, does not check CVV, and identity-document verification is optional, depending on the agreement with the credit card company.
Required requirements and models
A terminal without a CVV requirement – for the token model.
A token model – for token charging and refunds.
A direct-interface model – for performing transactions in a closed iOS system.
Step 3 – Token Charging and Credit Card Details Charging – Do Transaction
JSON function link
Request method: POST.
https://secure.cardcom.solutions/api/v11/Transactions/Transaction
The following parameters must be transferred in the Do Transaction function.
Legend:
Red parameter – required
Bold parameter – recommended
Parameter that is neither red nor bold – optional
| No. | Parameter name | Example values | Description |
|---|---|---|---|
| 1 | TerminalNumber | 1000 | The terminal performing the operation. This parameter must be obtained from the business. Internal terminal number, not the SHVA number. |
| 2 | ApiName | Cardcomtest26 | Interface username. This parameter must be obtained from the business. |
| 3 | Amount | 100 | Amount to charge. |
| 4 | CardNumber | 4580280000000008 | Credit card number to charge; intended for the direct-interface module (without PCI compliance). |
| 5 | Token | 4cf8e168-261e-4613-8d20-000332986b24 | The token to charge. |
| 6 | CardExpirationMMYY | 1226 | Token expiration date – mandatory. |
| 7 | CVV2 | 078 | The card’s three-digit security code; works only with a card number, not with a token. |
| 8 | ExternalUniqTranId | h9rZs#4VxTp!7kLb0wUeG3zC | External unique transaction identifier. It is essential to send your unique transaction identifier to prevent duplicate transactions. If the same external unique transaction identifier is sent again, error code 608 is returned. See ExternalUniqTranIdResponse. |
| 9 | ExternalUniqUniqTranIdResponse | boolean – true / false | false – returns error 608 if the same ExternalUniqTranId is used again.true – does not charge the card, but returns the original transaction response. |
| 10 | NumOfPayments | 12 | Number of payments for the transaction. |
| 11 | CardOwnerInformation Object with parameters | Phone: 0522222222 FullName: Daniel Test IdentityNumber: 321654987 CardOwnerEmail: test@gmail.com AvsZip, AvsAddress, AvsCity: string |
|
| 12 | ISOCoinId | 1 – ILS 2 – USD Additional currency codes | Currency in which the transaction is charged. |
| 13 | CustomFields Array of objects | Id (integer): 1 Value (string): “Example value” | Custom fields. Useful for passing additional transaction information for reports and data collection. Id is the custom-field identifier; Value is its value. |
Values of the Advanced object (14)
Red parameter – required
Bold parameter – recommended
Parameter that is neither red nor bold – optional
| No. | Parameter name | Example values | Description |
|---|---|---|---|
| 1 | ApiPassword | kzFKfohEvL6AOF8aMEJz | API password, intended for refunds and transaction cancellations. |
| 2 | IsRefund | boolean – true / false | Whether this is a refund transaction. |
| 3 | ISOCoinName | ILS / USD / EUR | Equivalent to ISOCoinId; this parameter receives the currency name rather than its numeric code. |
| 4 | JValidateType | integer – 2 / 5 | Operation to perform on the card details/token: 2 – J2: perform a card check only. 5 – J5: capture a credit limit and perform a credit check. |
| 5 | SapakMutav | string, e.g. 1234 | Customer number in the multiple-beneficiary arrangement. |
| 6 | CreditType | 1 – regular charge 6 – installment credit | Note: 1. Credit card companies limit the number of installments to a minimum of 3. Accordingly, the number of installments is automatically set to at least 3. 2. Credit card companies set a minimum amount for credit transactions. Be sure to send an appropriate amount. Otherwise, the customer is redirected to a failure page. |
| 7 | MTI | 420 (fixed value) | Parameter for releasing a credit limit. It must be sent together with the approval number—the Cardcom transaction number of the actual credit-limit capture (ApprovalNumber). |
| 8 | AccountIdToGetCardNumber | 123 | Set this parameter to the AccountID (customer-card identifier). The card number and expiration date will be retrieved from the account. If account information is needed for the invoice, send the account identifier in Document.AdvancedDefinition.AccountID and set Document.AdvancedDefinition.IsLoadInfoFromAccountID=true. |
| 9 | ApprovalNumber | 12345 | One-time approval number received when creating a token with a J5 check in Step 1. To charge a captured credit limit, send this approval number together with the token and amount to charge. |
| 10 | FirstPayment | 50 | Optional – amount of the first installment. Amounts are in agorot; see the note at the end of the table. |
| 11 | ConstPayment | 20 | Optional – amount of the remaining installments. Amounts are in agorot; see the note at the end of the table. |
| 12 | IsAutoRecurringPayment | boolean – true / false | When It is mainly intended for replacement-card processing, so the transaction is classified as a direct-debit transaction and the card enters the replacement-card service. Set this parameter to A direct-debit terminal is intended for receiving replacement-card files from credit card companies; transactions are displayed to the cardholder as direct-debit transactions. There is no restriction on the card type used for direct debit. The system identifies the card type and operates accordingly, including postal cards and immediate-charge cards. |
| 13 | IsCreateToken | boolean – true / false | Whether to create a token from the card details. |
| 14 | SendNote | boolean – true / false | Whether to send a receipt slip for the completed transaction. |
Values of the Document object (15)
Important: Although the Products array is not mandatory, the document will not be generated without it; therefore, it is marked as recommended.
Red parameter – required
Bold parameter – recommended
Parameter that is neither red nor bold – optional
| No. | Parameter name | Example values | Description |
|---|---|---|---|
| 1 | DocumentTypeToCreate | Auto, TaxInvoiceAndReceipt, TaxInvoiceAndReceiptRefund, Receipt, ReceiptRefund, Quote, Order, OrderConfirmation, OrderConfirmationRefund, DeliveryNote, DeliveryNoteRefund, ProformaInvoice, DemandForPayment, DemandForPaymentRefund, ProformaDealInvoice, ProformaDealInvoiceRefund, TaxInvoice, ProformaInvoiceRefund, TaxInvoiceRefund, ReceiptForTaxInvoice, DonationReceipt, DonationReceiptRefund, ReceiptForTaxInvoiceRefund | Type of document to generate. Auto selects the type according to settings 3→4. The other values represent tax invoices and receipts, refunds, quotes, orders, order confirmations, delivery notes, pro forma invoices, payment demands, donation receipts, and related refunds. |
| 2 | Name | Mr. Test | Customer name. |
| 3 | TaxId | 040617640 | Identity number or company registration number. |
| 4 | israel@gmail.com | Customer email address to which the document will be sent. Multiple email addresses may be separated by semicolons (;). | |
| 5 | IsSendByEmail | true / false | Whether to send the document by email. |
| 6 | AddressLine1 | Saharov 22 | Customer address, first line. |
| 7 | AddressLine2 | P.O. 1234 | Customer address, second line. |
| 8 | City | Rishon LeZion | City. |
| 9 | Mobile | 03-9619611 | Landline telephone number. |
| 10 | Phone | 0549876543 | Mobile telephone number. In the SMS module, the SMS will be sent to this number. |
| 11 | Comments | One-year warranty from the invoice date (up to 250 characters) | Document notes, printed at the bottom of the document. |
| 12 | IsVatFree | true = 0% VAT false = 18% VAT | Whether the entire document is VAT-exempt; suitable for an overseas customer. |
| 13 | DepartmentId | 123 (int) | Department code displayed in reports and transferred to accounting. See the terminal’s department settings. |
| 14 | AdvancedDefinition Object with parameters | IsAutoCreateUpdateAccount (bool) AccountForeignKey (string) SiteUniqueId (string) AccountID (integer) IsLoadInfoFromAccountID (boolean) |
If it is not sent, the system searches first by foreign key, then by site unique identifier, and finally by customer email. The first match found is used.
|
| 15 | Products Array of objects | ProductID (string) Description (string) Quantity (integer) UnitCost (number) TotalLineCost (number) IsVatFree (boolean) |
|
| 16 | ExternalId | String | External system identifier at the document level only; it is not stored at the customer-card level. |
| 17 | ManualNumber | 585177 | Manual document numbering. Available only when creating a document without a charge, and requires special authorization. In rare cases, this can replace the system’s internal counter. If counters conflict, the invoice will not be created. |
| 18 | DocumentDateDDMMYYYY | 05/03/2025 | Document issue date. |
| 19 | ValueDate | 12/03/2025 | Document value date, intended for journal entries. |
| 20 | Languge | he / en | Document language. |
| 21 | IsSendSMS | boolean – true / false | Whether to send the document by SMS; requires the SMS model. |
Do Transaction response
After sending a POST request to this function, the following values are returned in the response:
| No. | Parameter | Example | Description |
|---|---|---|---|
| 1 | ResponseCode | 0 | 0 – operation successful; any other value indicates a development error. |
| 2 | Description | Transaction completed successfully | Response description. If a different response is received, the transaction was not completed successfully. |
| 3 | TranzactionId | 654354685 | Unique number of the transaction completed during the credit charge. The response may be Int64/BigInt. |
| 4 | TerminalNumber | 1001 | Terminal number. |
| 5 | Amount | 100.50 | Amount charged. |
| 6 | CoinId | 1 – ILS; 2 – USD | Currency of the transaction. |
| 7 | CouponNumber | 38022395 | Receipt-slip number; may sometimes be used for reconciliation. |
| 8 | CreateDate | 2025-03-12T08:46:45 | Transaction creation date. |
| 9 | Last4CardDigits | 5796 | Last four digits of the card (integer). |
| 10 | Last4CardDigitsString | 5796 | Last four digits of the card (string). |
| 12 | FirstCardDigits | 440066 | First six digits. |
| 13 | JParameter | 0 / 2 / 5 | J parameter, indicating the type of check performed on the card: 0 – default according to credit card company settings; 2 – check of the check digit only; 5 – approval from the credit card companies. |
| 14 | CardMonth | 12 | Card month. |
| 15 | CardYear | 2021 | Card year. |
| 16 | ApprovalNumber | 009491B | Approval number. Essential for J5. If J5 was used and the business wants to charge the captured credit limit later, this approval number is required. |
| 17 | FirstPaymentAmount | 50.00 | First payment amount. |
| 18 | ConstPaymentAmount | 20.00 | Amount of each additional payment. |
| 19 | NumberOfPayments | 5 | Number of payments. |
| 20 | CardInfo | Israeli / NonIsraeli / FuelCard / ImmediateChargeCard / GiftCard | Card type. |
| 21 | CardOwnerName | daniel | Cardholder name. |
| 22 | CardOwnerPhone | 0522222222 | Cardholder telephone number. |
| 23 | CardOwnerEmail | test@gmail.com | Cardholder email. |
| 24 | CardOwnerIdentityNumber | 213654987 | Identity-document number. |
| 25 | Token | 4cf8e168-261e-4613-8d20-000332986b24 | Token number; save it in the database. |
| 26 | CardName | Standard Visa | Card name. |
| 27 | SapakMutav | 1234 | Customer number in the multiple-beneficiary arrangement. |
| 28 | Uid | 21121517002429612920744 | Unique transaction identifier. If a refund or charge is made outside the transaction, such as a new transaction using a token, the UID will be new and different from the original transaction. |
| 29 | ConcentrationNumber | Concentration number | Deposit/concentration number. |
| 30 | DocumentNumber | 300394 | Document number. |
| 31 | DocumentType | Auto, TaxInvoiceAndReceipt, TaxInvoiceAndReceiptRefund, Receipt, ReceiptRefund, Quote, Order, OrderConfirmation, DeliveryNote, ProformaInvoice, DemandForPayment, TaxInvoice, ReceiptForTaxInvoice, DonationReceipt, and related refund types | Document type. |
| 32 | Rrn | 500301575449 | Identifier at the credit card companies. |
| 33 | Brand | PrivateCard / MasterCard / Visa / Maestro / AmericanExpress / Isracard / JBC / Discover / Diners | Card brand. |
| 34 | Acquire | Unknown / Isracard / CAL / Diners / AmericanExpress / Laumicard / CardCom / PayPal / Upay / PayMe | Acquirer. |
| 35 | Issuer | NonIsrael / Isracard / CAL / Diners / AmericanExpress / JCB / Laumicard | Issuer. |
| 36 | PaymentType | Unknown / Standard / SpecialCredits / ImmediateCharge / CreditClub / SuperCredit / InstallmentCredit / Payments / ClubPatments | Credit type: regular charge, installment, credit, discounting, etc. |
| 37 | CardNumberEntryMode | MagneticStrip / SelfService / Contactless / EmvContactless / MobileContactless / EmvMobileContactless / MobileNumber / Emv / Phone / SignatureOnly / Internet / Fallback / EmptyCandidateList | Transaction source: online, EMV, telephone, etc. |
| 38 | DealType | Information / Debit / Discharge / ForcedCharge / CashBack / CashTransaction / Recurring / BalanceQuery / Cancel / Refund / Recharge | Transaction type and source: cancellation, charge, direct debit, refund, etc. |
| 39 | IsRefund | boolean – true / false | Whether this was a refund transaction. |
| 40 | DocumentUrl | Document URL | URL of the document. |
| 41 | CustomFields | Array of objects: Id, Value | Values of the custom fields. |
| 42 | IsAbroadCard | boolean – true / false | Whether the card is issued abroad. |
Example code for using tokens
Charging a token created in Step 1:
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"Token": "4cf8e168-261e-4613-8d20-000332986b24",
"CardExpirationMMYY": "0628",
"ExternalUniqTranId": "h7rZ3#קV3Tp!7kLb0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1
}Charging a token created in Step 1 and generating a document:
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"Token": "4cf8e168-261e-4613-8d20-000332986b24",
"CardExpirationMMYY": "0628",
"ExternalUniqTranId": "h7rZ3#קV3Tp!7kL-b0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1,
"Document": {
"DocumentTypeToCreate": "TaxInvoiceAndReceipt",
"Name": "תעבוד",
"TaxId": "040617640",
"Email": "test@gmail.com",
"IsSendByEmail": false,
"IsVatFree": false,
"Products": [{"Description": "hey", "Quantity": 1, "UnitCost": 200}]
}
}Charging a credit limit captured in Step 1:
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"Token": "4cf8e168-261e-4613-8d20-000332986b24",
"CardExpirationMMYY": "1225",
"ExternalUniqTranId": "h7rZ3#קV3Tp4!76-kLb0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1,
"Advanced": {"ApprovalNumber": 204394904}
}Charging a credit limit captured in Step 1 and generating a document:
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"Token": "4cf8e168-261e-4613-8d20-000332986b24",
"CardExpirationMMYY": "1225",
"ExternalUniqTranId": "h7rZ3#קV3Tp4!76-kLb0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1,
"Advanced": {"ApprovalNumber": 204394904},
"Document": {
"DocumentTypeToCreate": "TaxInvoiceAndReceipt",
"Name": "תעבוד",
"TaxId": "040617640",
"Email": "test@gmail.com",
"Products": [{"Description": "hey", "Quantity": 1, "UnitCost": 30}]
}
}Releasing a credit limit captured in Step 1:
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"Token": "4cf8e168-261e-4613-8d20-000332986b24",
"CardExpirationMMYY": "1225",
"ExternalUniqTranId": "h7rZ3#קV3Tp4!76-kLb0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1,
"Advanced": {"ApprovalNumber": 204394904, "MTI": 420}
}Credit card charge (direct interface):
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"CardNumber": "4580000000000000",
"CardExpirationMMYY": "0628",
"CVV2": "569",
"ExternalUniqTranId": "h7rZs#4V3Tp!7kLb0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1
}Credit card charge and document generation:
{
"TerminalNumber": 1001,
"ApiName": "test2025",
"Amount": 200,
"CardNumber": "4580000000000000",
"CardExpirationMMYY": "0628",
"CVV2": "569",
"ExternalUniqTranId": "h7rZs#4V3Tp!7kLb0wUeG3zC",
"ExternalUniqUniqTranIdResponse": false,
"NumOfPayments": 1,
"Document": {
"DocumentTypeToCreate": "TaxInvoiceAndReceipt",
"Name": "בדיקה",
"TaxId": "040617640",
"Email": "t@t.com",
"IsSendByEmail": false,
"IsVatFree": false,
"Products": [{"Description": "מוצר בדיקה", "Quantity": 1, "UnitCost": 200}]
}
}