HCService
Click here for a complete list of operations.
InitializePayment
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /hcws/hcservice.asmx HTTP/1.1 Host: hc.mercurycert.net Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.mercurypay.com/InitializePayment" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <InitializePayment xmlns="http://www.mercurypay.com/"> <request> <MerchantID>string</MerchantID> <Password>string</Password> <Invoice>string</Invoice> <TotalAmount>double</TotalAmount> <TaxAmount>double</TaxAmount> <AVSAddress>string</AVSAddress> <AVSZip>string</AVSZip> <TranType>string</TranType> <CardHolderName>string</CardHolderName> <Frequency>string</Frequency> <CustomerCode>string</CustomerCode> <Memo>string</Memo> <ProcessCompleteUrl>string</ProcessCompleteUrl> <ReturnUrl>string</ReturnUrl> <DisplayStyle>string</DisplayStyle> <BackgroundColor>string</BackgroundColor> <FontColor>string</FontColor> <FontFamily>string</FontFamily> <FontSize>string</FontSize> <LogoUrl>string</LogoUrl> <PageTitle>string</PageTitle> <SecurityLogo>string</SecurityLogo> <OrderTotal>string</OrderTotal> <SubmitButtonText>string</SubmitButtonText> <CancelButtonText>string</CancelButtonText> <VoiceAuthCode>string</VoiceAuthCode> <Keypad>string</Keypad> <DefaultSwipe>string</DefaultSwipe> <AVSFields>string</AVSFields> <PartialAuth>string</PartialAuth> <OperatorID>string</OperatorID> <TerminalName>string</TerminalName> <ButtonTextColor>string</ButtonTextColor> <ButtonBackgroundColor>string</ButtonBackgroundColor> <JCB>string</JCB> <Diners>string</Diners> <CUP>string</CUP> <CardEntryMethod>string</CardEntryMethod> <SubmitButtonDefaultImageUrl>string</SubmitButtonDefaultImageUrl> <SubmitButtonHoverImageUrl>string</SubmitButtonHoverImageUrl> <CancelButtonDefaultImageUrl>string</CancelButtonDefaultImageUrl> <CancelButtonHoverImageUrl>string</CancelButtonHoverImageUrl> <PageTimeoutDuration>string</PageTimeoutDuration> <PageTimeoutIndicator>string</PageTimeoutIndicator> <CancelButton>string</CancelButton> <TotalAmountBackgroundColor>string</TotalAmountBackgroundColor> <CVV>string</CVV> <ForceManualTablet>string</ForceManualTablet> <LaneID>string</LaneID> <CanadianZip>string</CanadianZip> <AlternateMCC>string</AlternateMCC> <TokenType>string</TokenType> <RecurringDataRequest>string</RecurringDataRequest> </request> </InitializePayment> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <InitializePaymentResponse xmlns="http://www.mercurypay.com/"> <InitializePaymentResult> <ResponseCode>int</ResponseCode> <PaymentID>string</PaymentID> <Message>string</Message> </InitializePaymentResult> </InitializePaymentResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /hcws/hcservice.asmx HTTP/1.1 Host: hc.mercurycert.net Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <InitializePayment xmlns="http://www.mercurypay.com/"> <request> <MerchantID>string</MerchantID> <Password>string</Password> <Invoice>string</Invoice> <TotalAmount>double</TotalAmount> <TaxAmount>double</TaxAmount> <AVSAddress>string</AVSAddress> <AVSZip>string</AVSZip> <TranType>string</TranType> <CardHolderName>string</CardHolderName> <Frequency>string</Frequency> <CustomerCode>string</CustomerCode> <Memo>string</Memo> <ProcessCompleteUrl>string</ProcessCompleteUrl> <ReturnUrl>string</ReturnUrl> <DisplayStyle>string</DisplayStyle> <BackgroundColor>string</BackgroundColor> <FontColor>string</FontColor> <FontFamily>string</FontFamily> <FontSize>string</FontSize> <LogoUrl>string</LogoUrl> <PageTitle>string</PageTitle> <SecurityLogo>string</SecurityLogo> <OrderTotal>string</OrderTotal> <SubmitButtonText>string</SubmitButtonText> <CancelButtonText>string</CancelButtonText> <VoiceAuthCode>string</VoiceAuthCode> <Keypad>string</Keypad> <DefaultSwipe>string</DefaultSwipe> <AVSFields>string</AVSFields> <PartialAuth>string</PartialAuth> <OperatorID>string</OperatorID> <TerminalName>string</TerminalName> <ButtonTextColor>string</ButtonTextColor> <ButtonBackgroundColor>string</ButtonBackgroundColor> <JCB>string</JCB> <Diners>string</Diners> <CUP>string</CUP> <CardEntryMethod>string</CardEntryMethod> <SubmitButtonDefaultImageUrl>string</SubmitButtonDefaultImageUrl> <SubmitButtonHoverImageUrl>string</SubmitButtonHoverImageUrl> <CancelButtonDefaultImageUrl>string</CancelButtonDefaultImageUrl> <CancelButtonHoverImageUrl>string</CancelButtonHoverImageUrl> <PageTimeoutDuration>string</PageTimeoutDuration> <PageTimeoutIndicator>string</PageTimeoutIndicator> <CancelButton>string</CancelButton> <TotalAmountBackgroundColor>string</TotalAmountBackgroundColor> <CVV>string</CVV> <ForceManualTablet>string</ForceManualTablet> <LaneID>string</LaneID> <CanadianZip>string</CanadianZip> <AlternateMCC>string</AlternateMCC> <TokenType>string</TokenType> <RecurringDataRequest>string</RecurringDataRequest> </request> </InitializePayment> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <InitializePaymentResponse xmlns="http://www.mercurypay.com/"> <InitializePaymentResult> <ResponseCode>int</ResponseCode> <PaymentID>string</PaymentID> <Message>string</Message> </InitializePaymentResult> </InitializePaymentResponse> </soap12:Body> </soap12:Envelope>