Do you have any cURL examples

Home/Developers / Knowledge Base / FAQs / Do you have any cURL examples

The Cayan Certification Engineering team will occasionally receive inquiries relating to the use of cURL for staging a Genius transaction. We have put together a few common examples that you may use as a reference for debugging purposes.


Stage Transaction
  • Command Line Format: curl.exe https://transport.merchantware.net/v4/transportService.asmx -H "Content-Type:text/xml" -X POST -d @"StageTransaction.txt"
  • Request Format
<?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>
    <CreateTransaction xmlns="http://transport.merchantware.net/v4/">
    <merchantName>Zero Inc</merchantName>
    <merchantSiteId>00000000</merchantSiteId>
    <merchantKey>00000-00000-00000-00000-00000</merchantKey>
    <request>
        <TransactionType>SALE</TransactionType>
        <Amount>1.23</Amount>
        <ClerkId>ABC123</ClerkId>
        <OrderNumber>ABC123</OrderNumber>
        <Dba>ZERO BRANDS</Dba>
        <SoftwareName>ABC SOFTWARE</SoftwareName>
        <SoftwareVersion>1.0.0.0</SoftwareVersion>
        <Cardholder>VISA TEST CARD</Cardholder>
        <TransactionId>ABC123</TransactionId>
        <ForceDuplicate>false</ForceDuplicate>
        <CustomerCode>ABC123</CustomerCode>
        <PoNumber>ABC123</PoNumber>
        <TaxAmount>0.10</TaxAmount>
        <TerminalId>01</TerminalId>
        <HealthCareAmountDetails>
            <HealthCareTotalAmount>0.00</HealthCareTotalAmount>
            <ClinicalAmount>0.00</ClinicalAmount>
            <CopayAmount>0.00</CopayAmount>
            <DentalAmount>0.00</DentalAmount>
            <PrescriptionAmount>0.00</PrescriptionAmount>
            <VisionAmount>0.00</VisionAmount>
        </HealthCareAmountDetails>
        <TipDetails>
            <EligibleAmount>0.00</EligibleAmount>
        </TipDetails>
    </request>
</CreateTransaction>
</soap:Body>
</soap:Envelope>

Initiate Transaction
  • Command Line Format: curl.exe "http://[CED IP Address]:8080/v2/pos?TransportKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&Format=XML"

Retrieve Transaction Details
  • Command Line Format: curl.exe https://genius.merchantware.net/v1/Reporting.asmx -H "Content-Type:text/xml" -X POST -d@"Details.txt"
  • Request Format
<?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>
    <DetailsByTransportKey xmlns="http://schemas.merchantwarehouse.com/genius/10/Reporting">
    	<merchantName>Zero Inc</merchantName>
    	<merchantSiteId>00000000</merchantSiteId>
    	<merchantKey>00000-00000-00000-00000-00000</merchantKey>
    	<TransportKey>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</TransportKey>
    </DetailsByTransportKey>
  </soap:Body>
</soap:Envelope>