get https://api.zenoti.com/api/Catalog/Payments/Invoice/IntializePayment
This API helps you to save the new credit/debit card details of the guest and then collect payment for the class booking.
You must specify appropriate details for the parameters in the API request body. For more information, refer to the Request Body Parameters table.
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. |
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. |
Email | 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. |
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. |
Email | 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. |
Name | Type | Description |
---|
TransactionAmount | decimal | Amount of money for the transaction. |
UseInvoiceValues | boolean | If true, it indicates that invoice values will be used. |
Name | Type | Description |
---|
ProcessorId | string | Processor ID of the payment processsor. |
TokenFK | string | Token for initializing the payment. |
HostedPaymentURL | string | URL to initiate the payment, which then redirects to the payment screen. |
Mode | int | Mode of the payment. |
TokenDetails | dictionary of string [key] and string [value] | Token details such as a short Description for payment, CurrencyCode, ClientId, and Payment Destination. |
MetaData | dictionary of string [key] and string [value] | MetaData includes Fee details, Transaction details, and CenterId for initializing the payment. |
Error | object | Object that contains error-related details: StatusCode, Error Message, and Internal error message. For more information, refer to the Error Object table. |
StatusCode | Message |
---|
503 | Invoice Id is empty. |
728 | Payment cannot be added for closed invoice. |
4002 | Amount has to be greater than 0. |