post
https://api.zenoti.com/v1/invoices//payment/custom
This API inserts the details of a custom payment (which has been collected by using a third-party software) for an invoice into Zenoti.
For example, an organization uses a third-party software to collect guests' payment for an invoice. You can then use this API to insert the collected custom payment from that third-party software into Zenoti. Note: To integrate the required custom payment in your account, you must reach out to your respective Zenoti representative.
This custom payment information for an invoice enables you to display the relevant details in your Zenoti UI, and map it to the respective fields in Reports and Analytics.
You must specify appropriate data for the invoice_id parameter.
Request Body Details
| Name | Type | Description |
|---|---|---|
| amount | decimal | Total amount of the invoice, including the tip amount. |
| tip_amount | decimal | Tip amount included in the invoice. |
| cash_register_id | guid | Unique 32-character ID of the cash register to which the custom invoice payment amount was added. |
| custom_payment_id | guid | Unique 32-character ID of the custom invoice payment. |
| additional_data | string | Any additional information on the custom invoice payment. |
| collected_by_id | guid | Unique 32-character ID of the employee who collected the payment. |
Response Details
| Name | Type | Description |
|---|---|---|
| transaction | object | Object that contains details about various transaction-related elements. For more information, refer to the transaction table below. |
| error | object | Object that contains error message and error code details. For more information, refer to the error table below. |
transaction
| Name | Type | Description |
|---|---|---|
| payment_option | object | Object that contains details about various payment option-related elements. For more information, refer to the payment_option table below. |
| total_amount_paid | decimal | Total amount paid by the guest, including the tip amount. |
| amount_paid | decimal | Amount paid by the guest for the invoice, excluding the tip amount. |
| tip_amount | decimal | Tip amount paid by the guest. |
| ssg_amount | decimal | The service charge amount paid by the guest. |
| fee_amount | decimal | The environment fee amount paid by the guest. |
| cash_back_amount | decimal | The amount received by the guest as cashback for making the custom payment. |
| transaction_id | guid | Unique 32-character ID of the guest's transaction. |
| payment_date | datetime | Date and time on which the guest made the custom invoice payment. |
| cash_regester_id | guid | Unique 32-character ID of the cash register to which the custom invoice payment amount was added. |
payment_option
| Name | Type | Description |
|---|---|---|
| id | guid | Unique 32-character ID of the payment option used by the guest to make the custom payment. |
| payment_mode | enum | Indicates the mode of custom payment: NotSpecified = -1, Cash = 0, GiftCard = 1, Membership = 2, Package = 3, Custom = 4, CreditCard = 5, Cheque = 6, LoyaltyPoints = 7, Cashback = 8, and PrepaidCard = 9. |
| payment_name | string | Name of the payment option used by the guest. |
| card_number | string | Number of the card that the guest used to make the custom payment. |
| additional_data | string | Any additional details on the payment option used by the guest. |
error
| Name | Type | Description |
|---|---|---|
| StatusCode | int | Status code that represents the type of the error. |
| Message | string | Message that describes the error. |
| InternalMessage | string | Internal message that describes about the error in more detail. |
Error Message Details
| Name | Type | Description |
|---|---|---|
| invalid invoiceid. | 502 | If the specified invoice ID is not valid. |
| invalid custompaymentId. | 502 | If the specified custom payment ID is not valid. |
| invalid cashregisterid. | 502 | If the specified cash register ID is not valid. |
| Group Invoice Not Supported. | 492 | If custom payment is to be inserted for a Group invoice. Currently, you cannot insert custom payment for Group invoices. |
| Payment cannot be added for closed invoice. | 728 | If the invoice has already been closed, you cannot insert custom payment for that invoice into Zenoti. |
| Amount has to be greater than 0. | 4002 | If the custom payment amount for the invoice is zero or fewer than zero. |
| Amount should be greater than tip amount. | 4064 | If the service payment amount for the invoice is fewer than the tip amount. |
| User was not found. | 405 | If the guest details could not be retrieved. |
| Payment is already made in full. | 460 | If full payment for the invoice has already been completed. |
