Collect payment for a class booking by using the guest's saved credit/debit card

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

NameTypeDescription
PaymentaccountIDguidUnique Id of the guest's payment account.
SourceenumSource of the transaction: 0 - Web, 1 - WebStore, 2 - CheckWeb, 3 - CheckWebStore, 4 - Dunning, 5 - Mobile, 6 - MobilePOS, or 7 - All.
transactionTypeenumType 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.
SaveCardbooleanIf true, it indicates that the credit/debit card will be saved for further transactions.
ProtocolstringWeb protocol includes http or https.
ShareCardsToWebbooleanIf true, it indicates that the guest's credit/debit cards will shared to Web.
hoststringThis is the custom domain URL. You do not need to send the protocol (for example, dev.custom.com).
ProcessorIdstringID of the guest's payment processor.
InvoiceIdguidID of the invoice for which you want to initialize payment.
CenterIdguidUnique Id of the center.
UserIdguidUnique ID of the guest.
FirstRecurringChargebooleanIf true, it indicates that it is the guest's first recurring payment.

billingInfo Object

NameTypeDescription
Address1stringBilling address of the guest.
CitystringCity in which the guest resides.
CountryCodestringCode of the country of the guest.
EmailstringEmail ID of the guest.
NamestringFull name of the guest.
FirstNamestringFirst name of the guest.
LastNamestringLast name of the guest.
PhonestringPhone number of the guest.
StatestringState in which the guest resides.
HouseNumberOrNamestringName or number of the house in which the guest resides.
ZipcodestringZip code of the area in which the guest resides.

shippingInfo Object

NameTypeDescription
Address1stringShipping address of the guest.
CitystringCity in which the guest resides.
CountryCodestringCode of the country of the guest.
EmailstringEmail ID of the guest.
NamestringFull name of the guest.
FirstNamestringFirst name of the guest.
LastNamestringLast name of the guest.
PhonestringPhone number of the guest.
StatestringState in which the guest resides.
HouseNumberOrNamestringName or number of the house in which the guest resides.
ZipcodestringZip code of the area in which the guest resides.

paymentDetails Object

NameTypeDescription
TransactionAmountdecimalAmount of money for the transaction.
UseInvoiceValuesbooleanIf true, it indicates that invoice values will be used.

Response Details

NameTypeDescription
InvoiceTransactionIdguidUnique ID of the invoice after the transaction has been processed.
PrintRecieptbooleanIf true, it indicates that the transaction receipt will be printed.
TransactionIdstringID of the transaction.
RequireSignaturebooleanIf true, it indicates that the signature is required.
successbooleanIf true, it indicates that the transaction has been successful.
ToastMessagestringToast message to be displayed after the transaction has been successful.
ErrorobjectObject that contains error-related details: StatusCode, Error Message, and Internal error message. For more information, refer to the Error Object table.
HostedPaymentURLstringURL to initiate the payment, which then redirects to the payment screen.
TokenFKstringToken for initializing the payment.
ProcessingMessagestringMessage to display while processing the transaction.

Error Object

StatusCodeMessage
503Invoice Id is empty.
728Payment cannot be added for closed invoice.
4002Amount has to be greater than 0.
Language
Authorization
Header
Click Try It! to start a request and see the response here!