post
https://api.zenoti.com/Catalog/Payments/Invoice/IntializeCloudPayment
This API helps you to collect payment for the class booking by using the guest's saved credit/debit card.
You must specify appropriate details for the parameters in the API request body. For more information, refer to the Request Body Parameters table.
transactionDetails Object
| Name | Type | Description |
|---|---|---|
| PaymentaccountID | guid | Unique Id of the guest's payment account. |
| Source | enum | Source of the transaction: 0 - Web, 1 - WebStore, 2 - CheckWeb, 3 - CheckWebStore, 4 - Dunning, 5 - Mobile, 6 - MobilePOS, or 7 - All. |
| transactionType | enum | Type of the transaction: Sale - 1, Authorize - 2, CreateAccount - 7, UpdateAccount - 8, RecurringSale - 0, Void - 10, Refund - 11, Reversal - 12, AuthorizationComplete - 13, PreAuthorize - 14, Release - 15, CreateBankAccount - 16, or RoyaltyCheckSale - 17. |
| SaveCard | boolean | If true, it indicates that the credit/debit card will be saved for further transactions. |
| Protocol | string | Web protocol includes http or https. |
| ShareCardsToWeb | boolean | If true, it indicates that the guest's credit/debit cards will shared to Web. |
| host | string | This is the custom domain URL. You do not need to send the protocol (for example, dev.custom.com). |
| ProcessorId | string | ID of the guest's payment processor. |
| InvoiceId | guid | ID of the invoice for which you want to initialize payment. |
| CenterId | guid | Unique Id of the center. |
| UserId | guid | Unique ID of the guest. |
| FirstRecurringCharge | boolean | If true, it indicates that it is the guest's first recurring payment. |
billingInfo Object
| Name | Type | Description |
|---|---|---|
| Address1 | string | Billing address of the guest. |
| City | string | City in which the guest resides. |
| CountryCode | string | Code of the country of the guest. |
| string | Email ID of the guest. | |
| Name | string | Full name of the guest. |
| FirstName | string | First name of the guest. |
| LastName | string | Last name of the guest. |
| Phone | string | Phone number of the guest. |
| State | string | State in which the guest resides. |
| HouseNumberOrName | string | Name or number of the house in which the guest resides. |
| Zipcode | string | Zip code of the area in which the guest resides. |
shippingInfo Object
| Name | Type | Description |
|---|---|---|
| Address1 | string | Shipping address of the guest. |
| City | string | City in which the guest resides. |
| CountryCode | string | Code of the country of the guest. |
| string | Email ID of the guest. | |
| Name | string | Full name of the guest. |
| FirstName | string | First name of the guest. |
| LastName | string | Last name of the guest. |
| Phone | string | Phone number of the guest. |
| State | string | State in which the guest resides. |
| HouseNumberOrName | string | Name or number of the house in which the guest resides. |
| Zipcode | string | Zip code of the area in which the guest resides. |
paymentDetails Object
| Name | Type | Description |
|---|---|---|
| TransactionAmount | decimal | Amount of money for the transaction. |
| UseInvoiceValues | boolean | If true, it indicates that invoice values will be used. |
Response Details
| Name | Type | Description |
|---|---|---|
| InvoiceTransactionId | guid | Unique ID of the invoice after the transaction has been processed. |
| PrintReciept | boolean | If true, it indicates that the transaction receipt will be printed. |
| TransactionId | string | ID of the transaction. |
| RequireSignature | boolean | If true, it indicates that the signature is required. |
| success | boolean | If true, it indicates that the transaction has been successful. |
| ToastMessage | string | Toast message to be displayed after the transaction has been successful. |
| Error | object | Object that contains error-related details: StatusCode, Error Message, and Internal error message. For more information, refer to the Error Object table. |
| HostedPaymentURL | string | URL to initiate the payment, which then redirects to the payment screen. |
| TokenFK | string | Token for initializing the payment. |
| ProcessingMessage | string | Message to display while processing the transaction. |
Error Object
| StatusCode | Message |
|---|---|
| 503 | Invoice Id is empty. |
| 728 | Payment cannot be added for closed invoice. |
| 4002 | Amount has to be greater than 0. |
