Collect payment for a class booking by using a new credit/debit card

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.

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
ProcessorIdstringProcessor ID of the payment processsor.
TokenFKstringToken for initializing the payment.
HostedPaymentURLstringURL to initiate the payment, which then redirects to the payment screen.
ModeintMode of the payment.
TokenDetailsdictionary of string [key] and string [value]Token details such as a short Description for payment, CurrencyCode, ClientId, and Payment Destination.
MetaDatadictionary of string [key] and string [value]MetaData includes Fee details, Transaction details, and CenterId for initializing the payment.
ErrorobjectObject that contains error-related details: StatusCode, Error Message, and Internal error message. For more information, refer to the Error Object table.

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!