Knowledge Base / API
עברית

Ask AI

✦ AI answer

Thinking…

Sources

    Partial / Full Transaction Refund by Transaction ID

    When should this function be used?

    Businesses that want to manage and refund transactions from their own systems, without accessing the Cardcom interface, can use this function.

    Note: Refunding a transaction does not generate a document.

    Below is a link to the JSON function.

    Request method: POST.

    Refund By Transaction Id

    https://secure.cardcom.solutions/api/v11/Transactions/RefundByTransactionId

    The following parameters must be sent to the Refund By Transaction Id function.

    Legend:

    Red parameter - required

    Bold parameter - recommended

    Parameter that is neither red nor bold - optional

    No.

    Parameter

    Example values

    Description

    1

    ApiName

    "test2025"

    API name.

    2

    ApiPassword

    "test5000$"

    API password.

    3

    TransactionId

    204961310

    Internal transaction number.

    4

    PartialSum

    100

    Partial amount to refund.

    5

    CancelOnly

    boolean - true \ false

    Cancel the transaction only, until the settlement date.

    6

    SapakMutav

     

    Customer number for work with a beneficiary account. 

    7

    AllowMultipleRefunds

    boolean - true \ false

    Whether multiple partial refunds can be made for the same transaction. If this is not sent after the first refund, it will not be possible to make additional partial refunds.

    8

    CustomFields

    Id - 20

    Value - "value" 

    Values of the custom fields.

    Important! When performing tests on the Cardcom test terminal, use the API details found under Settings > Company and User Settings > API Key Management, and not the details provided by the representative. 

     

    Refund By Transaction Id RESPONSE.

    No.
     

    Parameter

    Example values

    Description

    1

    ResponseCode

    0

    0 - The operation was successful
    Any other value - error, indicating a development error.

    2

    Description

    "The transaction was completed successfully"

    Response description. If a different response is received, the transaction was not completed successfully.

    3

    NewTranzactionId

    204972703

    Cancellation transaction number.

     

    Below is sample code for the function, together with the response.

    Transaction cancellation example:

    https://secure.cardcom.solutions/api/v11/Transactions/RefundByTransactionId

     
    {
    "ApiName": "kzFKfohEvL6AOF8aMEJz",
    "ApiPassword": "FIDHIh4pAadw3Slbdsjg",
    "TransactionId": 204966999,
    "CancelOnly": true,
    "AllowMultipleRefunds": true
    }
      
    

    Partial transaction refund example:

    {
    "ApiName": "kzFKfohEvL6AOF8aMEJz",
    "ApiPassword": "FIDHIh4pAadw3Slbdsjg",
    "TransactionId": 204966999,
    "PartialSum": 200,
    "CancelOnly": false,
    "AllowMultipleRefunds": true
    }
    
    

    Example of the response received:

    {
    "ResponseCode": 0,     
    "Description": "עסקה זוכתה בהצלחה",     
    "NewTranzactionId": 204972703 
    }
    

     

     

     

     

    Was this article helpful?