---
updatedAt: 2025-08-12T09:56:00.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# Payment with Documents/Reciepts

## Payment Process Combined with Automatic Documents

The process will include 3 methods -

1. **[CreateSale](https://rivhit-api.readme.io/reference/post_api-paymentpagerequest-svc-createsale#/)** - Creating a Sale.
2. **[ChargeSimple](https://rivhit-api.readme.io/docs/direct-payment-process#/)** - Make the charge (Create a transaction).
3. **[CompleteSale](https://rivhit-api.readme.io/reference/post_api-paymentpagerequest-svc-completesale#/)** - Connect the Charge and the Sale together and produce an automatic document/receipt.

<br />

> 🚧 Note
>
> * This Process requires a payment pages service in iCredit account.
> * Making charges will require an internet permissions on the merchant terminal.
> * CreateSale method should be in the first step - in order to check the customer and items information.(before making the charge)
> * The automatic Document/Receipt will include the charge voucher with all the transaction info.

<br />

### CreateSale

The method request parameters will include:

* Customer details for the document/receipt
* Items array - to calculate the charge amount and display on the document items list (in case of receipt it will not include the items).
* Other payment settings available - sale type, recurring settings, etc.

<br />

The method response:

* `'TotalAmount'`- The value in the sale response will return as X 100 (15.5=1550.0).
* `'SalePrivateToken'` & `'SaleToken'` - The Sale identifiers that return in the response.

> 🚧 Save the SaleToken Value to use it in method CompleteSale method request.

&#x20;&#x20;

### CompleteSale

The method request parameters will include 2 mandatory values:

`'SaleToken'` - The value that received in CreateSale method response.

`'CustomerTransactionId'` - The value that received in ChargeSimple method response.

<br />

The method response will include:

* The status of the action that connects between the transaction and the sale.
* The document/receipt info and URL.

<br />

## Producing a Document/Receipt separately After a Charge

After using ChargeSimple in order to make the charge, in order to produce a document/Receipt it is possible to use one of the methods:

**[Document.New](https://rivhit-api.readme.io/reference/post_online-rivhitonlineapi-svc-document-new#/)** - Producing a new document

**[Receipt.New](https://rivhit-api.readme.io/reference/post_online-rivhitonlineapi-svc-receipt-new#/)** - Producing a new Receipt

<br />

> 🚧 Note:
>
> * This process will require only direct payment service and Rivhit account.
> * No need for internet permissions on the merchant terminal.
> * Both will produce a simple document/receipt without the charge voucher on it.
> * In order to send the specific payment values (credit card, voucher number etc.) use this guide - **Payment Type Values**.
> * This document/receipt will not appear on iCredit reports.