Skip to main content

Tokenization a transaction in CG without opening a payment window

To perform a transaction without opening a payment window, you must save a token for the account key with which you want to generate.

In order to save a token for any account key, the following POST call must be made (of course, with the session sent in HEADERS as usual): https://dafna2.wizcloud.co.il/docsApi/createToken

with the BODY containing the accountkey

{

"accountkey":"20002"

}

The call will return a link to a payment page for a total of 0, after entering the details and clicking OK, the unique token and the necessary details for a transaction without a payment window will be saved in the DB.

Example of a receipt tax invoice without a payment window:

In order to make a transaction without a payment window, send a parameter called istoken in the CREDIT object and enter TRUE / FALSE accordingly.

{
"data": {
"flagwarnings": 0,
"main_info": {
"issueStock": "1",
"deleteTemp": "false",
"DocumentID": "2",
"AccountKey": "20002",
"tftal": 117
},
"moves": [
{
"ItemKey": "1",
"Price": "100",
"Quantity": "1",
"Tftal": "100"
}
],
"Payment": {
"credit": {
"suF": 117,
"url": "https://dafna2.wizcloud.co.il/IWIZ/html/kabala_User_temp.html",
"istoken": true
}
}
}
}