Process Payment
Process Cart with Payment is used to create a new booking from the cart contents.
zapiProcessCartWithPayment
POST
https://{yourdomainname}.zaui.net/zapi/
Request Body
zapiToken*
integer
Token that must be used for a reseller to communicate with the supplier system.
cartId*
integer
The ID of the cart which the transaction is to be applied to.
methodName*
string
The method being called.
zapiUserId*
integer
Generated by the supplier system when a new contact is created.
zapiAccountId*
integer
Generated by the supplier system.
paymentMethodType*
integer
See Payment Method Type IDs in the appendix.
location*
object
Object describing where this transaction took place, required for logging
deviceData*
string
Data from the device payment is being processed on.
creditCardDetails*
object
Object containing either standard credit card info. Required only for payment type 2000.
gratuityDetails
object
Object containing amount and type of gratuity to add to transaction/booking.
voucherDetails
object
Object containing information pertaining to the voucher. Required only for payment type 2004.
transactionType*
integer
See Payment Method Type IDs in the appendix.
transactionAmount*
integer
Amount to charge to the provided payment method (with no currency formatting). This does not include gratuity amount. This value cannot be 0 (unless payment method is 2003).
currency/isoCode*
string
Currency in which to charge to the provided payment method.
<?xml version="1.0" encoding="utf-8"?>
<response>
<zapiVersion>2.1</zapiVersion>
<error>0</error>
<message>OK</message>
<methodResponse>
<methodName>zapiProcessCartWithPayment</methodName>
<methodErrorCode>0</methodErrorCode>
<methodErrorMessage>Booking Processed</methodErrorMessage>
<bookingInformation>
<bookingId>40245</bookingId>
<bookingReference>3QX932R</bookingReference>
<bookingMessage>
<![CDATA[Client booking has been created.]]>
</bookingMessage>
</bookingInformation>
<transactionResult>
<transactionErrorCode>0</transactionErrorCode>
<bookingId>40245</bookingId>
<bookingReference>3QX932R</bookingReference>
<transactionId>99783</transactionId>
<transactionAmount>0</transactionAmount>
<transactionMethod>2002</transactionMethod>
<bookingMessage>
<![CDATA[Client booking has been created.]]>
</bookingMessage>
</transactionResult>
</methodResponse>
</response>
For information on payment types, please see Payment Method Type IDs in the appendix.
<request>
<zapiToken></zapiToken>
<zapiAccountId></zapiAccountId>
<zapiUserId></zapiUserId>
<zapiMethod>
<methodName>zapiProcessCartWithPayment</methodName>
<location>
<altitude></altitude>
<latitude></latitude>
<longitude></longitude>
<locationTimestamp></locationTimestamp>
<primaryAccountId></primaryAccountId>
<secondaryAccountId></secondaryAccountId>
</location>
<deviceData>
<deviceUUID></deviceUUID>
</deviceData>
<cartId></cartId>
<paymentMethod>
<paymentMethodType></paymentMethodType>
</paymentMethod>
<transactionDetails>
<transactionType></transactionType>
<transactionAmount></transactionAmount>
<currency>
<isoCode></isoCode>
</currency>
<creditCardDetails>
<nameOnCard></nameOnCard>
<number></number>
<expMonth></expMonth>
<expYear></expYear>
<csv></csv>
<cartType></cardType>
<rawSwipeData></rawSwipeData>
<track1Data></track1Data>
<track2Data></track2Data>
</creditCardDetails>
<gratuityDetails>
<gratuityId>0</gratuityId>
<gratuityTypeId>0</gratuityTypeId>
</gratuityDetails>
<voucherDetails>
<companyName></companyName>
<companyAgentId></companyAgentId>
<companyId></companyId>
<voucherNumber></voucherNumber>
</voucherDetails>
</transactionDetails>
</zapiMethod>
</request>
Last updated
Was this helpful?