---
title: "CreateSale"
method: POST
path: "/API/PaymentPageRequest.svc/CreateSale"
---

# CreateSale

`POST /API/PaymentPageRequest.svc/CreateSale`

## Request body

- object
  - `GroupPrivateToken` string, uuid, required — Payment Page Identifier. **Default:** No
  - `Items` object[], required
    - `Id` integer — Rivhit Item Identifier. **Range:** 0 to 999999999 **Default:** iCredit item settings
    - `CatalogNumber` string, nullable — Item Catalog Number (SKU). **Length:** 1 to 15 **Default:** iCredit item settings
    - `UnitPrice` number, double, required — The Item Price. **Range:** Decimal limit (can be negative) **Default:** No
    - `Quantity` number, double, required — The Item Quantity. **Range:** 0.1 to 99999999.99 **Default:** iCredit item settings
    - `Description` string, required — The Item Description. **Length:** 1 to 100 **Default:** No
  - `IPNMethod` 1 | 2, nullable — IPN Method Type. **Options:** (1=POST 2=GET) **Default:** Page settings
  - `IPNURL` string, url, nullable — IPN URL - After Success Payment. **Length:** 15 to 500 **Default:** Page settings
  - `ExemptVAT` boolean, nullable — The Payment Document VAT Settings. **Default:** Page Rivhit settings
  - `Reference` integer, nullable — The Reference Value - Will be Saved in the Invoice. **Range:** 0 to 9999999999 **Default:** No
  - `Order` string, nullable — The Sale Order Value. **Length:** 1 to 15 **Default:** No
  - `EmailAddress` string, email, nullable — Customer Email Address. **Length:** 6 to 50 **Default:** Rivhit Customer@
  - `CustomerLastName` string, nullable, required — Customer Last Name/Company Name. *Length:** 1 to 30 **Default:** No
  - `CustomerFirstName` string — Customer First Name. **Length:** 1 to 20 **Default:** Rivhit Customer@
  - `Address` string, nullable — Customer Address. **Length:** 1 to 30 **Default:** Rivhit Customer@
  - `POB` integer, nullable — Customer Post Office Box. **Range:** 0 to 9999999 **Default:** No
  - `City` string, nullable — Customer City. **Length:** 1 to 20 **Default:** Rivhit Customer@
  - `Zipcode` string, nullable — Customer Zip Code (to print on invoice - send numbers). **Length:** 1 to 7 **Default:** Rivhit Customer@
  - `PhoneNumber` string, nullable — Customer Phone Number. **Length:** 1 to 15 **Default:** Rivhit Customer@
  - `PhoneNumber2` string, nullable — Customer Second Phone Number. **Length:** 1 to 15 **Default:** No
  - `FaxNumber` string, nullable — Customer Fax Number. **Length:** 1 to 15 **Default:** Rivhit Customer@
  - `IdNumber` integer, nullable — Customer Israeli Id (by Custom Format). **Range:** 8-9 digits **Default:** No
  - `VatNumber` integer, nullable — Customer VAT Number (by custom format). **Range:** 8-9 digits **Default:** No
  - `Custom1` string, nullable — Custom Open Field 1. **Length:** 2GB **Default:** No
  - `Custom2` string, nullable — Custom Open Field 2. **Length:** 2GB **Default:** No
  - `Custom3` string, nullable — Custom Open Field 3. **Length:** 2GB **Default:** No
  - `Custom4` string, nullable — Custom Open Field 4. **Length:** 2GB **Default:** No
  - `Custom5` string, nullable — Custom Open Field 5. **Length:** 2GB **Default:** No
  - `Custom6` string, nullable — Custom Open Field 6. **Length:** 2GB **Default:** No
  - `Custom7` string, nullable — Custom Open Field 7. **Length:** 2GB **Default:** No
  - `Custom8` string, nullable — Custom Open Field 8. **Length:** 2GB **Default:** No
  - `Custom9` string, nullable — Custom Open Field 9. **Length:** 2GB **Default:** No
  - `CustomerId` integer, nullable — Customer Id Serial Number (Rivhit system). **Range:** 0 to 999999999 **Default:** Page Settings
  - `AgentId` integer, nullable — Agent Id Serial Number (Rivhit system). **Range:** 0 to 999999999 **Default:** Page Settings
  - `Comments` string, nullable — The Customer Comments (to print on the invoice). **Length:** 1 to 400 **Default:** Rivhit system settings
  - `ProjectId` integer, nullable — Project Id Serial Number (Rivhit system). **Range:** 0 to 999999999 **Default:** Page Settings
  - `EmailBcc` string, email, nullable — Bcc Email Address. **Length:** 6 to 50 **Default:** Rivhit email settings
  - `DocumentLanguage` 'he' | 'en', nullable — Set the Automatic Invoice/Receipt Language. **Options:** (he/en) **Default:** Page Rivhit settings
  - `Discount` number, double, nullable — Discount Amount - For Invoice/Receipt. **Range:** Decimal limit (only positive) **Default:** No
  - `Currency` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10, nullable — The Charge Currency Type. **Options:** (1 = NIS 2 = USD 3 = EURO 4 = GBP 5 = AUD 6 = CAD 7 = CHF 8 = SEK 9 = DKK 10 = NOK) **Default:** Page settings
  - `SendMail` boolean, nullable — Send the Document/Receipt to the Customer. **Default:** Page settings
  - `CreateCustomer` boolean, nullable — Create a New Customer in Rivhit System. ~ When exsiting customer can't be found **Default:** Page settings
  - `CreateItems` boolean, nullable — Create New Items (in Rivhit system). **Default:** Page settings
  - `FindByMail` boolean, nullable — Locate Customer by Email Address. **Default:** Page settings
  - `FindById` boolean, nullable — Locate Customer by Israeli Id/VAT Number. **Default:** Page settings
  - `FindByPhone` boolean, nullable — Locate Customer by Phone Number. **Default:** Page settings
  - `SaleType` 1 | 2 | 3, nullable — The Sale Type. **Options:** (1 = Immediate 2 = Pending 3 = Only token) **Default:** Page settings
  - `ConvertToNIS` boolean, nullable — Convert Items Price Currency to ILS. **Default:** Page settings
  - `ExchangeRate` number, double, nullable — Fixed Currency Exchange Rate to ILS. ~ Combine with ConvertToNIS **Range:** Decimal limit (only positive) **Default:** Page Settings
  - `CrmUserId` integer, nullable — Rivhit User Id (Document/Receipt producer). **Range:** 0 to 99999 **Default:** Page Rivhit settings
  - `CreateRecurringSale` boolean, nullable — Turn On/Off Recurring Sale Creation. ~ **Requires a recurring sale service** **Default:** Page recurring settings
  - `RecurringSaleCycle` 1 | 2 | 3, nullable — Set Time Phrase to Charge a Recurring Sale. **Options** (1 = day 2 = week 3 = month) **Default:** Page recurring settings
  - `RecurringSaleDay` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28, nullable — Set the Charge Day of the month in a Recurring Sale. **Range:** 1-28 **Default:** Page recurring settings
  - `RecurringSaleStep` integer, nullable — Set the Time Phrase to Charge a Recurring Sale. ~ Every X day/week/month **Range:** 1 to 999 **Default:** Page recurring settings
  - `RecurringSaleCount` integer, nullable — Limit Number of Charges for a Recurring Sale. ~ For non stop charge = 0 **Range:** 1 to 999 **Default:** Page recurring settings
  - `RecurringSaleStartDate` string, date, nullable — Set Start Date for a Recurring Sale. ~ Date format DD-MM-YYYY **Length:** 10 characters **Default:** Page recurring settings
  - `RecurringSaleAutoCharge` boolean, nullable — Activate Recurring Sale Automatic Charge. **Default:** Page recurring settings
  - `RecurringSaleProRata` boolean, nullable — Create Recurring Sale with Pro Rata First Charge. **Default:** Page recurring settings
  - `ReceiptType` integer, nullable — Set the Automatic Receipt Type. **Range:** 1 to 999 **Default:** Page settings
  - `DocumentType` integer, nullable — Set the Automatic Document Type. **Range:** 1 to 999 **Default:** Page settings
  - `PriceIncludeVAT` boolean, nullable — Items Sent With or Without VAT. **Default:** Page Rivhit settings
  - `Country` string, nullable — Customer Country. **Length:** 1 to 39 **Default:** Rivhit Customer@
  - `State` string, nullable — Customer State. **Length:** 1 to 10 **Default:** No
  - `IPNFailureURL` string, url, nullable — IPN URL - After Failure in Payment. **Length:** 15 to 500 **Default:** No

## Response `200`

New Sale Created successfully

- object
  - `ClientMessage` string — The Client Error Message.
  - `CreditboxToken` string, uuid — Terminal Credit Box Identifier.
  - `Currency` integer — The Charge Currency Type.
  - `DebugMessage` string — The Response Error Message.
  - `PrivateSaleToken` string, uuid — Private Sale Token Identifier.
  - `SaleToken` string, uuid — Sale Inner Unique Identifier.
  - `Status` integer — The Response Error/Status Number (0 = Success).
  - `TotalAmount` number, double — The Sale Total Amount (**Returns Without Decimal Dot** Part X/100 To Get the Right Amount)

## Other responses

- `400` — Request Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/rivhit/apis/get-payment-url-22-12.md) · [All operations](https://skmtc.net/rivhit/apis/get-payment-url-22-12/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rivhit/get-payment-url-22-12/versions/ed5261a52458/schema)
