Skip to main content

-- Receipts - Automatic Credit

Import Receipts - Credit

The following parameters should be included in a credit object with maunualcreditflag=0 (see examples below)

Name-transTypeDescriptionתיאורDefault
maunualcreditflagbooleanדגל המציין האם אשראי ידני / רגיל: 1= ידני 0= רגיל A flag indicating whether the credit is manual or regular: 1= manual 0=regular0
URL
Required
string max(90)כתובת URL להפניה לאחר התשלוםA URL to redirect to after successful payment
istoken booleanהאם לשמור את פרטי האשראי (כטוקן) Should the the credit card information be saved (as a token)false
masofidsmallintמספר מסוףmasof (terminal) idManual/default terminal
suf
Required
float numberסכוםsum
fstarstotalfloat numberסכום כוכבים /מיילים /נקודות0
typestring max(50)סוג תשלוםType of paymentDefault
paymentssmallintמספר תשלומיםNumber of paymentsDefined by card type
firstpaymentfloat numberתשלום ראשוןFirst PaymentCalculated based on number of payments
paymentssumfloat numberתשלום קבועFixed paymentCalculated based on number of payments
fvoucher
Required
string max(7)מספר אישורconfirmation number
fshovarinteger numberמספר שוברshovar number0
creditfirmstring max(50)חברת אשראיcredit CompanyDefault
last4dig
Required
string max(4)4 ספרות אחרונותLast 4 digits
fvalidmonthstring max(2)תוקף חודשvalid monthCurrent month
fvalidyearstring max(2)תוקף שנהvalid yearCurrent year
fidstring max(60)ת.ז (באשראי ידני)""
detailsstring max(250)פרטיםdetails""
sufdlrfloat numberסכום משוערךReevaluated amount0
currencydlr
Required for foreign currency documents
string max(5)
values
מטבע השערוךThe revaluation currency From company definition

JSON Examples


{
"rows": {
"main_info": {
"accountKey":"30001",
"documentid":"31"
},
"pay_types": {
"credit": {
"suF":50,
"url":"https://lb1.wizcloud.co.il/IWIZ/html/kabala_User_temp.html"
}
}
}
}

{
"rows": {
"flagwarnings": true,
"main_info": {
"accountKey": "30002",
"documentid": "31",
},
"pay_types": {
"credit": {
"URL": "https://lb1.wizcloud.co.il/IWIZ/html/kabala_User_temp.html",
"suF": 100.00,
"sufdlr": 30,
"currencydlr": "$",
"fstarstotal": 0,
"masofid":5,
"payments": 3,
"firstPayment": "34",
"paymentsSum": "33",
"type": "תשלומים",
"details": " API Example"
}
}
}
}

Receipts Credit Responses

Success

If the requests is successful it will return a response with a statusCode 206.

statusCode206 - Success
stockidThe ID that's added to the "stock" table
CGUrlA link to a Credit Guard page, where the user needs to fill in their credit card info

Example

{
"statusCode": 206,
"stockid": 6443,
"CGUrl": "https://cgmpiuat.creditguard.co.il/CGMPI_Server/PerformTransaction?txId=dae90e12-fd1c-4519-b625-f2bc939fceeb"

}

After a successful request the user will be redirected to the address submited in the "URL" parameter.

Error

status"error"
statusCodebetween 400-600
message

An array of errors, each error containing:

typeerror or warning
numErrorAPI Error number
messageErrorTextual Error

Error - Call Credit Card Comapny

If the error says to "Call the credit card company", you'll need to send a followup request with the confirmation number the credit card company provides.

/docsApi/responseCG_confirmNum

ParametersDescriptionRequired
stockidfrom the error responserequired
confirmNumcredit card company's confirmation numberrequired
cardTokenfrom the error responserequired
parmxfrom the error response
urlresponse destination url