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

PayTraq Direct

The PayTraq Direct is an inbound webhook call that can be used by suppliers with other accounting software to deliver their invoices directly to PayTraq client's Purchase Inbox by means of an electonic channel.

Request

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

An actual Request URI should be provided by a PayTraq user.
To get this URI a user should activate the PayTraq Direct channel in Purchase 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>
      <ExternalLink>
        <DocumentURI></DocumentURI>
        <PDF></PDF>
      </ExternalLink>
      <SupplierData>
        <SupplierName></SupplierName>
      </SupplierData>
      <ClientData>
        <ClientName></ClientName>
      </ClientData>
    </Document>
    <SaleType></SaleType>
    <Operation></Operation>
    <Currency></Currency>
    <TaxBasis></TaxBasis>
    <IncludeTax></IncludeTax>
    <PayTerm>
      <PayTermType></PayTermType>
      <PayTermDays></PayTermDays>
    </PayTerm>
    <DateDue></DateDue>
    <Deposit></Deposit>
    <Comment></Comment>
    <PaymentMethod></PaymentMethod>
    <ShippingData>
      <ShippingType></ShippingType>
    </ShippingData>
  </Header>
  <LineItems>
    <LineItem>
      <Item>
        <ItemCode></ItemCode>
        <ItemBarCode></ItemBarCode>
        <ItemName></ItemName>
      </Item>
      <Description></Description>
      <Qty></Qty>
      <Price></Price>
      <LineDiscount></LineDiscount>
      <LineTotal></LineTotal>
      <Unit>
        <UnitName></UnitName>
      </Unit>
    </LineItem>
  </LineItems>
  <Adjustments>
      <Adjustment>
         <Amount></Amount>
         <Description />
         <TypeID></TypeID>
         <PctOrAmount></PctOrAmount>
      </Adjustment>
   </Adjustments>
  <ShippingCharge>
    <Amount></Amount>
  </ShippingCharge>
  <Totals>
    <GrossAmount></GrossAmount>
    <NetAmount></NetAmount>
  </Totals>
</Sale>
   

Tag Description
<DocumentDate> Document date.
Should be passed in the following format YYYY-MM-DD e.g. 2014-01-30
<DocumentRef> Document number
<SaleType> Possible values:
  • sales_order - Sales Order
  • sales_proforma - Proforma Invoice
  • sales_invoice - Invoice
  • sales_receipt - Receipt
  • sales_estimate - Quote/Estimate
  • credit_note - Credit Note/Refund
<Operation> Possible values:
  • sell_goods - Selling Goods
  • sell_services - Selling Services
  • other_income - Other Income
<SupplierName> Supplier name
<ClientName> Client name
<Currency> 3-letter currency code
<TaxBasis> Possible values:
  • 1 - Accrual
  • 2 - Cash
<IncludeTax> Boolean value (false | true)
Shows that amounts are tax inclusive
<PayTermType> Possible values:
  • 0 - Other date
  • 1 - Due days
  • 2 - EOM+
  • 3 - Cash on delivery
  • 4 - Open date of payment
<PayTermDays> Number of days. Can be used only with <PayTermType> values 1 and 2
<DateDue> Document due date.
Can be used only with <PayTermType> value 0
Should be passed in the following format YYYY-MM-DD e.g. 2014-01-30
<PaymentMethod> Possible values:
  • 0 - Not Defined
  • 1 - Bank
  • 2 - Cash
  • 3 - Card
  • 4 - Prepayment
  • 5 - Offsetting
  • 6 - Factoring
<ShippingType> Possible values:
  • 0 - Not Defined
  • 1 - Supply of goods
  • 2 - Movement of goods
  • 3 - Product returns
<ItemCode> Product/Service SKU
<ItemName> Product/Service name
<LineDiscount> Line discount in %
<GrossAmount> Total amount with taxes
<NetAmount> Total amount before taxes
<TypeID> Possible values:
  • charge - Charge
  • discount - Discount
<PctOrAmount> Possible values:
  • pct - Percent
  • amount - Amount