---
updatedAt: 2025-08-14T05:57:11.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# CreateSale

### Create a New Sale

> 📘 To complete the sale creation process use method - CompleteSale

> 🚀 For Production method URL - remove "test" from the link.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Create a new sale",
    "version": "1.0.0"
  },
  "paths": {
    "/API/PaymentPageRequest.svc/CreateSale": {
      "post": {
        "summary": "CreateSale",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "GroupPrivateToken": {
                    "type": "string",
                    "format": "uuid",
                    "example": "a1408bfc-18da-49dc-aa77-d65870f7943e",
                    "description": "Payment Page Identifier.\n\n**Default:** No\n",
                    "nullable": false,
                    "deprecated": false
                  },
                  "Items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "Id": {
                          "type": "integer",
                          "example": 0,
                          "description": "Rivhit Item Identifier.\n\n**Range:** 0 to 999999999\n**Default:** iCredit item settings\n",
                          "nullable": false,
                          "deprecated": false
                        },
                        "CatalogNumber": {
                          "type": "string",
                          "example": "abc123",
                          "description": "Item Catalog Number (SKU).\n\n**Length:** 1 to 15 \n**Default:** iCredit item settings\n",
                          "nullable": true,
                          "deprecated": false
                        },
                        "UnitPrice": {
                          "type": "number",
                          "format": "double",
                          "example": 10,
                          "description": "The Item Price.\n\n**Range:** Decimal limit (can be negative)\n**Default:** No\n",
                          "nullable": false,
                          "deprecated": false
                        },
                        "Quantity": {
                          "type": "number",
                          "format": "double",
                          "example": 1,
                          "description": "The Item Quantity.\n\n**Range:** 0.1 to 99999999.99\n**Default:** iCredit item settings\n",
                          "nullable": false,
                          "deprecated": false
                        },
                        "Description": {
                          "type": "string",
                          "example": "item test",
                          "description": "The Item Description.\n\n**Length:** 1 to 100\n**Default:** No\n",
                          "nullable": false,
                          "deprecated": false
                        }
                      },
                      "required": [
                        "UnitPrice",
                        "Quantity",
                        "Description"
                      ]
                    },
                    "example": [
                      {
                        "Id": 0,
                        "CatalogNumber": "1a",
                        "UnitPrice": 5,
                        "Quantity": 1,
                        "Description": "item1"
                      },
                      {
                        "Id": 0,
                        "CatalogNumber": "2a",
                        "UnitPrice": 5,
                        "Quantity": 1,
                        "Description": "item2"
                      }
                    ]
                  },
                  "IPNMethod": {
                    "type": "integer",
                    "example": 1,
                    "description": "IPN Method Type.\n\n**Options:** (1=POST 2=GET)\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false,
                    "enum": [
                      1,
                      2
                    ]
                  },
                  "IPNURL": {
                    "type": "string",
                    "format": "url",
                    "example": "http://9188dde0.ngrok.io/test/ipn_listener.php",
                    "description": "IPN URL - After Success Payment.\n\n**Length:** 15 to 500\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "ExemptVAT": {
                    "type": "boolean",
                    "example": false,
                    "description": "The Payment Document VAT Settings.\n\n**Default:** Page Rivhit settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Reference": {
                    "type": "integer",
                    "example": 12345,
                    "description": "The Reference Value - Will be Saved in the Invoice.\n\n**Range:** 0 to 9999999999\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Order": {
                    "type": "string",
                    "example": "ab12345",
                    "description": "The Sale Order Value.\n\n**Length:** 1 to 15\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "EmailAddress": {
                    "type": "string",
                    "format": "email",
                    "example": "a@a.com",
                    "description": "Customer Email Address.\n\n**Length:** 6 to 50\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CustomerLastName": {
                    "type": "string",
                    "example": "Israeli",
                    "description": "Customer Last Name/Company Name.\n\n*Length:** 1 to 30\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CustomerFirstName": {
                    "type": "string",
                    "example": "Moshe",
                    "description": "Customer First Name.\n\n**Length:** 1 to 20\n**Default:** Rivhit Customer@\n",
                    "nullable": false,
                    "deprecated": false
                  },
                  "Address": {
                    "type": "string",
                    "example": "Ben Yehuda 1",
                    "description": "Customer Address.\n\n**Length:** 1 to 30\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "POB": {
                    "type": "integer",
                    "example": 12345,
                    "description": "Customer Post Office Box.\n\n**Range:** 0 to 9999999\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "City": {
                    "type": "string",
                    "example": "Tel Aviv",
                    "description": "Customer City.\n\n**Length:** 1 to 20\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Zipcode": {
                    "type": "string",
                    "example": 6329302,
                    "description": "Customer Zip Code (to print on invoice - send numbers).\n\n**Length:** 1 to 7\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "PhoneNumber": {
                    "type": "string",
                    "example": "054-4444444",
                    "description": "Customer Phone Number.\n\n**Length:** 1 to 15\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "PhoneNumber2": {
                    "type": "string",
                    "example": "054-4444444",
                    "description": "Customer Second Phone Number.\n\n**Length:** 1 to 15\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "FaxNumber": {
                    "type": "string",
                    "example": "03-3333333",
                    "description": "Customer Fax Number.\n\n**Length:** 1 to 15\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "IdNumber": {
                    "type": "integer",
                    "example": 123456790,
                    "description": "Customer Israeli Id (by Custom Format).\n\n**Range:** 8-9 digits\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "VatNumber": {
                    "type": "integer",
                    "example": 123456790,
                    "description": "Customer VAT Number (by custom format).\n\n**Range:** 8-9 digits\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom1": {
                    "type": "string",
                    "example": "Custom1 value",
                    "description": "Custom Open Field 1.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom2": {
                    "type": "string",
                    "example": "Custom2 value",
                    "description": "Custom Open Field 2.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom3": {
                    "type": "string",
                    "example": "Custom3 value",
                    "description": "Custom Open Field 3.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom4": {
                    "type": "string",
                    "example": "Custom4 value",
                    "description": "Custom Open Field 4.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom5": {
                    "type": "string",
                    "example": "Custom5 value",
                    "description": "Custom Open Field 5.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom6": {
                    "type": "string",
                    "example": "Custom6 value",
                    "description": "Custom Open Field 6.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom7": {
                    "type": "string",
                    "example": "Custom7 value",
                    "description": "Custom Open Field 7.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom8": {
                    "type": "string",
                    "example": "Custom8 value",
                    "description": "Custom Open Field 8.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Custom9": {
                    "type": "string",
                    "example": "Custom9 value",
                    "description": "Custom Open Field 9.\n\n**Length:** 2GB\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CustomerId": {
                    "type": "integer",
                    "example": 0,
                    "description": "Customer Id Serial Number (Rivhit system).\n\n**Range:** 0 to 999999999\n**Default:** Page Settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "AgentId": {
                    "type": "integer",
                    "example": 0,
                    "description": "Agent Id Serial Number (Rivhit system).\n\n**Range:** 0 to 999999999\n**Default:** Page Settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Comments": {
                    "type": "string",
                    "example": "Comments will be here",
                    "description": "The Customer Comments (to print on the invoice).\n\n**Length:** 1 to 400\n**Default:** Rivhit system settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "ProjectId": {
                    "type": "integer",
                    "example": 0,
                    "description": "Project Id Serial Number (Rivhit system).\n\n**Range:** 0 to 999999999\n**Default:** Page Settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "EmailBcc": {
                    "type": "string",
                    "format": "email",
                    "example": "a@a.com",
                    "description": "Bcc Email Address.\n\n**Length:** 6 to 50\n**Default:** Rivhit email settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "DocumentLanguage": {
                    "type": "string",
                    "example": "en",
                    "description": "Set the Automatic Invoice/Receipt Language.\n\n**Options:** (he/en)\n**Default:** Page Rivhit settings\n",
                    "nullable": true,
                    "deprecated": false,
                    "enum": [
                      "he",
                      "en"
                    ]
                  },
                  "Discount": {
                    "type": "number",
                    "format": "double",
                    "example": 10,
                    "description": "Discount Amount - For Invoice/Receipt.\n\n**Range:** Decimal limit (only positive)\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Currency": {
                    "type": "integer",
                    "example": 1,
                    "description": "The Charge Currency Type.\n\n**Options:** (1 = NIS 2 = USD 3 = EURO 4 = GBP 5 = AUD 6 = CAD 7 = CHF 8 = SEK 9 = DKK 10 = NOK)\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false,
                    "enum": [
                      1,
                      2,
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9,
                      10
                    ]
                  },
                  "SendMail": {
                    "type": "boolean",
                    "example": true,
                    "description": "Send the Document/Receipt to the Customer.\n\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CreateCustomer": {
                    "type": "boolean",
                    "example": true,
                    "description": "Create a New Customer in Rivhit System.\n\n~ When exsiting customer can't be found  \n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CreateItems": {
                    "type": "boolean",
                    "example": true,
                    "description": "Create New Items (in Rivhit system).\n\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "FindByMail": {
                    "type": "boolean",
                    "example": true,
                    "description": "Locate Customer by Email Address.\n\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "FindById": {
                    "type": "boolean",
                    "example": true,
                    "description": "Locate Customer by Israeli Id/VAT Number.\n\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "FindByPhone": {
                    "type": "boolean",
                    "example": true,
                    "description": "Locate Customer by Phone Number.\n\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "SaleType": {
                    "type": "integer",
                    "example": 1,
                    "description": "The Sale Type.\n\n**Options:** (1 = Immediate 2 = Pending 3 = Only token)\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false,
                    "enum": [
                      1,
                      2,
                      3
                    ]
                  },
                  "ConvertToNIS": {
                    "type": "boolean",
                    "example": false,
                    "description": "Convert Items Price Currency to ILS.\n\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "ExchangeRate": {
                    "type": "number",
                    "format": "double",
                    "example": 3.8,
                    "description": "Fixed Currency Exchange Rate to ILS.\n\n~ Combine with ConvertToNIS\n**Range:** Decimal limit (only positive)\n**Default:** Page Settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CrmUserId": {
                    "type": "integer",
                    "example": 0,
                    "description": "Rivhit User Id (Document/Receipt producer).\n\n**Range:** 0 to 99999\n**Default:** Page Rivhit settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "CreateRecurringSale": {
                    "type": "boolean",
                    "example": false,
                    "description": "Turn On/Off Recurring Sale Creation.\n\n~ **Requires a recurring sale service**\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "RecurringSaleCycle": {
                    "type": "integer",
                    "example": 3,
                    "description": "Set Time Phrase to Charge a Recurring Sale.\n\n**Options** (1 = day 2 = week 3 = month)\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false,
                    "enum": [
                      1,
                      2,
                      3
                    ]
                  },
                  "RecurringSaleDay": {
                    "type": "integer",
                    "example": 10,
                    "description": "Set the Charge Day of the month in a Recurring Sale.\n\n**Range:** 1-28\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false,
                    "enum": [
                      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
                    ]
                  },
                  "RecurringSaleStep": {
                    "type": "integer",
                    "example": 1,
                    "description": "Set the Time Phrase to Charge a Recurring Sale.\n\n~ Every X day/week/month\n**Range:** 1 to 999\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "RecurringSaleCount": {
                    "type": "integer",
                    "example": 12,
                    "description": "Limit Number of Charges for a Recurring Sale.\n\n~ For non stop charge = 0\n**Range:** 1 to 999\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "RecurringSaleStartDate": {
                    "type": "string",
                    "format": "date",
                    "example": "01-03-2025",
                    "description": "Set Start Date for a Recurring Sale.\n\n~ Date format DD-MM-YYYY\n**Length:** 10 characters\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "RecurringSaleAutoCharge": {
                    "type": "boolean",
                    "example": true,
                    "description": "Activate Recurring Sale Automatic Charge.\n\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "RecurringSaleProRata": {
                    "type": "boolean",
                    "example": false,
                    "description": "Create Recurring Sale with Pro Rata First Charge.\n\n**Default:** Page recurring settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "ReceiptType": {
                    "type": "integer",
                    "example": 0,
                    "description": "Set the Automatic Receipt Type.\n\n**Range:** 1 to 999\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "DocumentType": {
                    "type": "integer",
                    "example": 2,
                    "description": "Set the Automatic Document Type.\n\n**Range:** 1 to 999\n**Default:** Page settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "PriceIncludeVAT": {
                    "type": "boolean",
                    "example": true,
                    "description": "Items Sent With or Without VAT.\n\n**Default:** Page Rivhit settings\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "Country": {
                    "type": "string",
                    "example": "Israel",
                    "description": "Customer Country.\n\n**Length:** 1 to 39\n**Default:** Rivhit Customer@\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "State": {
                    "type": "string",
                    "example": "Texas",
                    "description": "Customer State.\n\n**Length:** 1 to 10\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  },
                  "IPNFailureURL": {
                    "type": "string",
                    "format": "url",
                    "example": "http://9188dde0.ngrok.io/test/ipn_listener.php",
                    "description": "IPN URL - After Failure in Payment.\n\n**Length:** 15 to 500\n**Default:** No\n",
                    "nullable": true,
                    "deprecated": false
                  }
                },
                "required": [
                  "GroupPrivateToken",
                  "Items",
                  "CustomerLastName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "New Sale Created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ClientMessage": {
                      "type": "string",
                      "description": "The Client Error Message."
                    },
                    "CreditboxToken": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Terminal Credit Box Identifier."
                    },
                    "Currency": {
                      "type": "integer",
                      "description": "The Charge Currency Type."
                    },
                    "DebugMessage": {
                      "type": "string",
                      "description": "The Response Error Message."
                    },
                    "PrivateSaleToken": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Private Sale Token Identifier."
                    },
                    "SaleToken": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Sale Inner Unique Identifier."
                    },
                    "Status": {
                      "type": "integer",
                      "description": "The Response Error/Status Number (0 = Success)."
                    },
                    "TotalAmount": {
                      "type": "number",
                      "format": "double",
                      "description": "The Sale Total Amount (**Returns Without Decimal Dot** Part X/100 To Get the Right Amount)"
                    }
                  }
                },
                "example": {
                  "ClientMessage": "",
                  "CreditboxToken": "7196ca68-1658-4e9a-bb12-a20e0fc79827",
                  "Currency": 1,
                  "DebugMessage": "",
                  "PrivateSaleToken": "d7057949-bf51-4b01-be4e-579b6e1a50fe",
                  "SaleToken": "b3cebae4-4bb8-40ca-92e0-c268dbc753fb",
                  "Status": 0,
                  "TotalAmount": 1000
                }
              }
            }
          },
          "400": {
            "description": "Request Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Request Error"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Internal Server Error"
                    }
                  }
                },
                "example": {
                  "ClientMessage": "אירעה שגיאה ביצירת המכירה",
                  "CreditboxToken": "00000000-0000-0000-0000-000000000000",
                  "Currency": 0,
                  "DebugMessage": "System.NullReferenceException: Object reference not set to an instance of an object.",
                  "PrivateSaleToken": "00000000-0000-0000-0000-000000000000",
                  "SaleToken": "00000000-0000-0000-0000-000000000000",
                  "Status": -1,
                  "TotalAmount": 0
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://testicredit.rivhit.co.il"
    }
  ]
}
```