PayTraq - A Cloud-based Business Suite - more than just online accounting

PayTraq Connect

The PayTraq Connect is a webhook call that can be used by any self-hosted e-commerce platform extensions to push all orders straight to PayTraq Sales Inbox for further processing.

The general use case is to use a webhook to trigger a POST request every time a new order is created.
This web service can be used only as a simple, straightforward solution to integrate an e-commerce platform with PayTraq. If you need something more complicated please look at our REST API.

Request

POST https://go.paytraq.com/ext/webhooks/inbox/{ChannelID}

To get an actual Request URI, a user should activate the PayTraq Connect channel in Sales Inbox
This request should be made in XML format with "Content-Type: text/xml" header.
Every successful request should always return HTTP 200 OK code.


<Sale>
   <Header>
      <Document>
         <DocumentDate></DocumentDate>
         <DocumentRef></DocumentRef>
         <Client>
            <ClientName></ClientName>
            <ClientRegNumber></ClientRegNumber>
            <ClientTaxNumber></ClientTaxNumber>
            <ClientEmail></ClientEmail>
            <BillingAddress>
              <Address></Address>
              <Zip></Zip>
              <Country></Country>
            </BillingAddress>
            <IsCompany></IsCompany>
         </Client>
      </Document>
      <Total></Total>
      <Taxes></Taxes>
      <Currency></Currency>
      <IncludeTax></IncludeTax>
      <Comment />
      <ShippingData>
         <ShippingAddress>
            <ShipTo></ShipTo>
            <Address></Address>
            <Zip></Zip>
            <Country></Country>
         </ShippingAddress>
      </ShippingData>
   </Header>
   <LineItems>
      <LineItem>
         <Item>
            <ItemCode></ItemCode>
            <ItemBarCode></ItemBarCode>
            <ItemName></ItemName>
         </Item>
         <Qty></Qty>
         <Price></Price>
         <LineDiscount></LineDiscount>
         <Unit>
            <UnitName></UnitName>
         </Unit>
      </LineItem>
      ...
   </LineItems>
   <Adjustments>
      <Adjustment>
         <Amount></Amount>
         <Description />
         <TypeID></TypeID>
         <PctOrAmount></PctOrAmount>
      </Adjustment>
      ...
   </Adjustments>
   <ShippingCharge>
      <Amount></Amount>
   </ShippingCharge>
</Sale>
   

Tag Description
<DocumentDate> Order date.
Should be passed in the following format YYYY-MM-DD e.g. 2014-01-30
<DocumentRef> Order number
<ClientName> Client name
<BillingAddress> Client billing address
<IsCompany> Boolean value (false | true)
<Total> Total order amount.
If <IncludeTax> is true <Total> includes <Taxes>.
If <IncludeTax> is false <Total> excludes <Taxes>.
<Taxes> Total tax amount
<Currency> 3-letter currency code
<IncludeTax> Boolean value (false | true)
Shows that amounts are tax inclusive
<ShippingAddress> Client shipping address
<ItemCode> Product SKU
<ItemName> Product name
<LineDiscount> Line discount in %
<TypeID> Possible values:
  • charge - Charge
  • discount - Discount
<PctOrAmount> Possible values:
  • pct - Percent
  • amount - Amount