Knowledge Base / API
עברית

Ask AI

✦ AI answer

Thinking…

Sources

    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

    Request method: POST.

    Do Transaction

    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 nameExample valuesDescription
    1TerminalNumber1000The terminal performing the operation. This parameter must be obtained from the business. Internal terminal number, not the SHVA number.
    2ApiNameCardcomtest26Interface username. This parameter must be obtained from the business.
    3Amount100Amount to charge.
    4CardNumber4580280000000008Credit card number to charge; intended for the direct-interface module (without PCI compliance).
    5Token4cf8e168-261e-4613-8d20-000332986b24The token to charge.
    6CardExpirationMMYY1226Token expiration date – mandatory.
    7CVV2078The card’s three-digit security code; works only with a card number, not with a token.
    8ExternalUniqTranIdh9rZs#4VxTp!7kLb0wUeG3zCExternal 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.
    9ExternalUniqUniqTranIdResponseboolean – true / falsefalse – returns error 608 if the same ExternalUniqTranId is used again.
    true – does not charge the card, but returns the original transaction response.
    10NumOfPayments12Number of payments for the transaction.
    11CardOwnerInformation
    Object with parameters
    Phone: 0522222222
    FullName: Daniel Test
    IdentityNumber: 321654987
    CardOwnerEmail: test@gmail.com
    AvsZip, AvsAddress, AvsCity: string

    Phone – customer’s telephone number.

    FullName – customer’s name.

    IdentityNumber – customer’s identity-document number.

    CardOwnerEmail – customer’s email address.

    AvsZip, AvsAddress, AvsCity – AVS is active only on EMV terminals. An EMV terminal is any terminal opened from September 2017 onward; otherwise, check with Cardcom Support about conversion. These fields contain the customer’s ZIP code, address, and city.

    12ISOCoinId1 – ILS
    2 – USD
    Additional currency codes
    Currency in which the transaction is charged.
    13CustomFields
    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 nameExample valuesDescription
    1ApiPasswordkzFKfohEvL6AOF8aMEJzAPI password, intended for refunds and transaction cancellations.
    2IsRefundboolean – true / falseWhether this is a refund transaction.
    3ISOCoinNameILS / USD / EUREquivalent to ISOCoinId; this parameter receives the currency name rather than its numeric code.
    4JValidateTypeinteger – 2 / 5Operation 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.
    5SapakMutavstring, e.g. 1234Customer number in the multiple-beneficiary arrangement.
    6CreditType1 – 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.
    7MTI420 (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).
    8AccountIdToGetCardNumber123Set 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.
    9ApprovalNumber12345One-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.
    10FirstPayment50Optional – amount of the first installment. Amounts are in agorot; see the note at the end of the table.
    11ConstPayment20Optional – amount of the remaining installments. Amounts are in agorot; see the note at the end of the table.
    12IsAutoRecurringPaymentboolean – true / false

    When true, the interface transaction type becomes a direct-debit transaction rather than a low-profile transaction; this does not create a direct debit.

    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 true only when the terminal is configured as a direct-debit terminal with the credit card company and SHVA. If the terminal is a telephone/regular terminal without CVV, do not send this parameter.

    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.

    13IsCreateTokenboolean – true / falseWhether to create a token from the card details.
    14SendNoteboolean – true / falseWhether 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 nameExample valuesDescription
    1DocumentTypeToCreateAuto, TaxInvoiceAndReceipt, TaxInvoiceAndReceiptRefund, Receipt, ReceiptRefund, Quote, Order, OrderConfirmation, OrderConfirmationRefund, DeliveryNote, DeliveryNoteRefund, ProformaInvoice, DemandForPayment, DemandForPaymentRefund, ProformaDealInvoice, ProformaDealInvoiceRefund, TaxInvoice, ProformaInvoiceRefund, TaxInvoiceRefund, ReceiptForTaxInvoice, DonationReceipt, DonationReceiptRefund, ReceiptForTaxInvoiceRefundType 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.
    2NameMr. TestCustomer name.
    3TaxId040617640Identity number or company registration number.
    4Emailisrael@gmail.comCustomer email address to which the document will be sent. Multiple email addresses may be separated by semicolons (;).
    5IsSendByEmailtrue / falseWhether to send the document by email.
    6AddressLine1Saharov 22Customer address, first line.
    7AddressLine2P.O. 1234Customer address, second line.
    8CityRishon LeZionCity.
    9Mobile03-9619611Landline telephone number.
    10Phone0549876543Mobile telephone number. In the SMS module, the SMS will be sent to this number.
    11CommentsOne-year warranty from the invoice date (up to 250 characters)Document notes, printed at the bottom of the document.
    12IsVatFreetrue = 0% VAT
    false = 18% VAT
    Whether the entire document is VAT-exempt; suitable for an overseas customer.
    13DepartmentId123 (int)Department code displayed in reports and transferred to accounting. See the terminal’s department settings.
    14AdvancedDefinition
    Object with parameters
    IsAutoCreateUpdateAccount (bool)
    AccountForeignKey (string)
    SiteUniqueId (string)
    AccountID (integer)
    IsLoadInfoFromAccountID (boolean)

    IsAutoCreateUpdateAccount – whether to create a customer card in the system. If false, all customers are recorded as “various customers.” If true, a customer card is created for each transaction; if one already exists, the transaction is linked to it. When enabled, InvoiceHead.CompID (the customer’s identity/company number) must also be sent.

    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.

    AccountForeignKey – customer’s foreign-key/accounting number; active only when creating a customer card.

    SiteUniqueId – unique website identifier; informational only.

    AccountID – customer number in the Gold Confirmation page system, used to associate the document; not active for a delayed transaction.

    IsLoadInfoFromAccountID – when an AccountID is provided, whether to load the customer-card details associated with that number into the document.

    15Products
    Array of objects
    ProductID (string)
    Description (string)
    Quantity (integer)
    UnitCost (number)
    TotalLineCost (number)
    IsVatFree (boolean)

    ProductID – item code, SKU, or product code; recommended for reporting. For multiple products, use separate array entries.

    Description – product description.

    Quantity – quantity of items. When the quantity is greater than 1, multiply the price accordingly and send a suitable payment method.

    UnitCost – unit price.

    TotalLineCost – recommended when the quantity is fractional; may prevent price-rounding problems.

    IsVatFree – whether this product is VAT-exempt.

    16ExternalIdStringExternal system identifier at the document level only; it is not stored at the customer-card level.
    17ManualNumber585177Manual 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.
    18DocumentDateDDMMYYYY05/03/2025Document issue date.
    19ValueDate12/03/2025Document value date, intended for journal entries.
    20Langugehe / enDocument language.
    21IsSendSMSboolean – true / falseWhether 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.ParameterExampleDescription
    1ResponseCode00 – operation successful; any other value indicates a development error.
    2DescriptionTransaction completed successfullyResponse description. If a different response is received, the transaction was not completed successfully.
    3TranzactionId654354685Unique number of the transaction completed during the credit charge. The response may be Int64/BigInt.
    4TerminalNumber1001Terminal number.
    5Amount100.50Amount charged.
    6CoinId1 – ILS; 2 – USDCurrency of the transaction.
    7CouponNumber38022395Receipt-slip number; may sometimes be used for reconciliation.
    8CreateDate2025-03-12T08:46:45Transaction creation date.
    9Last4CardDigits5796Last four digits of the card (integer).
    10Last4CardDigitsString5796Last four digits of the card (string).
    12FirstCardDigits440066First six digits.
    13JParameter0 / 2 / 5J 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.
    14CardMonth12Card month.
    15CardYear2021Card year.
    16ApprovalNumber009491BApproval number. Essential for J5. If J5 was used and the business wants to charge the captured credit limit later, this approval number is required.
    17FirstPaymentAmount50.00First payment amount.
    18ConstPaymentAmount20.00Amount of each additional payment.
    19NumberOfPayments5Number of payments.
    20CardInfoIsraeli / NonIsraeli / FuelCard / ImmediateChargeCard / GiftCardCard type.
    21CardOwnerNamedanielCardholder name.
    22CardOwnerPhone0522222222Cardholder telephone number.
    23CardOwnerEmailtest@gmail.comCardholder email.
    24CardOwnerIdentityNumber213654987Identity-document number.
    25Token4cf8e168-261e-4613-8d20-000332986b24Token number; save it in the database.
    26CardNameStandard VisaCard name.
    27SapakMutav1234Customer number in the multiple-beneficiary arrangement.
    28Uid21121517002429612920744Unique 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.
    29ConcentrationNumberConcentration numberDeposit/concentration number.
    30DocumentNumber300394Document number.
    31DocumentTypeAuto, TaxInvoiceAndReceipt, TaxInvoiceAndReceiptRefund, Receipt, ReceiptRefund, Quote, Order, OrderConfirmation, DeliveryNote, ProformaInvoice, DemandForPayment, TaxInvoice, ReceiptForTaxInvoice, DonationReceipt, and related refund typesDocument type.
    32Rrn500301575449Identifier at the credit card companies.
    33BrandPrivateCard / MasterCard / Visa / Maestro / AmericanExpress / Isracard / JBC / Discover / DinersCard brand.
    34AcquireUnknown / Isracard / CAL / Diners / AmericanExpress / Laumicard / CardCom / PayPal / Upay / PayMeAcquirer.
    35IssuerNonIsrael / Isracard / CAL / Diners / AmericanExpress / JCB / LaumicardIssuer.
    36PaymentTypeUnknown / Standard / SpecialCredits / ImmediateCharge / CreditClub / SuperCredit / InstallmentCredit / Payments / ClubPatmentsCredit type: regular charge, installment, credit, discounting, etc.
    37CardNumberEntryModeMagneticStrip / SelfService / Contactless / EmvContactless / MobileContactless / EmvMobileContactless / MobileNumber / Emv / Phone / SignatureOnly / Internet / Fallback / EmptyCandidateListTransaction source: online, EMV, telephone, etc.
    38DealTypeInformation / Debit / Discharge / ForcedCharge / CashBack / CashTransaction / Recurring / BalanceQuery / Cancel / Refund / RechargeTransaction type and source: cancellation, charge, direct debit, refund, etc.
    39IsRefundboolean – true / falseWhether this was a refund transaction.
    40DocumentUrlDocument URLURL of the document.
    41CustomFieldsArray of objects: Id, ValueValues of the custom fields.
    42IsAbroadCardboolean – true / falseWhether 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}]
      }
    }

    Was this article helpful?