Order Purchase

The OrderPurchase method validates a request for a transaction, by verifying that the vendor key and the end user details are valid. If so, the method returns a token representing the transaction. The end user is not charged when OrderPurchase is called; he or she is charged only after performing the final approval of the transaction.

Pay attention
Before calling the Cellarix API, the business client must obtain a vendor identification key, generated by Cellarix. This key must be passed with each API call. The format of the key is:
<Key> <KeyObj> <PhoneNumber>Supplier phone number</PhoneNumber> <SecureKey>Secure key from Cellarix</SecureKey> </KeyObj> </Key>
Note

Input Parameters
m-Mandatory fields
Parameter Type Description
(m) sKey string The business client’s vendor identification key.
(m) Items string A list of Item tags, each of which represents an item purchased in the transaction.
(m) Item string A tag representing an item purchased in the transaction.
(m) Item:Name string The name of the item.
(m) Item:Code int An internal vendor code for the item.
(m) Item:Count string The number of item units being purchased.
(m) Item:UnitPrice string The price in NIS per item unit.
(m) Item:TotalPrice decimal The total price in NIS for all units of this item (Count * UnitPrice).
(m) TotalIncVat decimal The total transaction price in NIS, including VAT.
PhoneNumber string The end user’s cell phone number.
SupplierDealId string Optional. A unique ID, generated by the client application, which identifies the transaction.
(m) ServiceId int Optional. The numeric ID of the vendor service. This value is useful for differentiating between several consumer services offered by the same business client. After registration, the business client must request Cellarix to allocate the number of service IDs that it needs.
MaxNumOfPayments int The maximum number of credit card paymenst that will be offered to the end user.
(m) IsCCAllow bool Whether to allow the end user to pay directly by credit card (not via Cellarix). False by default.
ImageLogoUrl string URL of the supplier logo, which is displayed on the Cellarix page.
MobileImageLogoUrl string URL of the supplier logo, which is displayed on the Cellarix mobile page.
ShippingType int A value that determines which shipping options will be displayed in the Cellarix page:
0 – No shipping options are displayed
1 – Physical address is displayed
2 – Email address is displayed (for the case of a virtual product such as a voucher or coupon)
3 – Phone number is displayed (for the case of a virtual smartphone product such as an app)
(m) SupplierRedirectPage string The page to which the end user is redirected at the end of the payment process.
SupplierURL string The URL that the Cellarix server will call when the end user approves the transaction, supplying details about the transaction. See SupplierURL Callback Method for more details.
UseAddress\City string The end user’s city.
UseAddress\Street string The end user’s street name.
UseAddress\HouseNumber string The end user’s house number.
UseAddress\ZipCode string The end user’s zip code.
UseAddress\EmailAddress string The end user’s email address (to be used for display as a “virtual shipping address”).
UseAddress\PhoneNumberAddress string The end user’s cell phone number (to be used for display as a “mobile shipping address”).
UseAddress\Email string The end user’s email address.
UseAddress\UserFirstName string The end user’s first name.
UseAddress\UserLastName string The end user’s last name.
UseAddress\UserIdNumber string The end user’s ID number.
(m) validation string Possible values are:
• Verify – when the end user approves the transaction, a credit check is performed, verifying that the transaction can be carried out.
• AutoComm (the default) – auto-commit – when the end user approves the transaction, it is charged immediately.
NOTE:
When the Verify value is used, the transaction will only be charged when the client application calls PurchaseAfterVerify. See PurchaseAfterVerify Method for more details.
FlowType int Possible values are:
• 1 – Login page as default.
• 2 - Credit card payment page as default.
IsEmailMandatory bool Whether to make the email feild mandtory for the end user.
OrderTokenDurationInMinutes int The number of minutes until the Order Token will expire.
Output Parameters
Parameter Type Description
Status\Number string A numeric value indicating success or failure of the call.
1 indicates success. A negative value indicates failure.
See Appendix: Cellarix API Error Codes for more details about error codes.
Status\Message string A textual description of the call’s status (an error message in case of failure).