PayTraq Connect
Overview
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 API.
API Call
Request
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: application/xml" header.
Every successful request should always return HTTP 200 OK code.
Payload
<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>
<TaxKey>
<TaxKeyID></TaxKeyID>
</TaxKey>
</LineItem>
...
</LineItems>
<Adjustments>
<Adjustment>
<Amount></Amount>
<Description />
<TypeID></TypeID>
<PctOrAmount></PctOrAmount>
</Adjustment>
...
</Adjustments>
<ShippingCharge>
<Amount></Amount>
<TaxKey>
<TaxKeyID></TaxKeyID>
</TaxKey>
</ShippingCharge>
<AutoProcessing>
<Process></Process>
<Approve></Approve>
<Send></Send>
<AddPayment>
<MoneyAccountID></MoneyAccountID>
<DatePaid></DatePaid>
</AddPayment>
</AutoProcessing>
</Sale>
No tags are required.
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 |
<Country> | 2-letter ISO country code |
<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> | 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 % |
<TaxKeyID> | Unique system identifier for tax key. See Get Tax Key |
<TypeID> | Possible values:
|
<PctOrAmount> | Possible values:
|
Auto Processing
For automatic processing of each order received in Sales Inbox, the <Process> tag should be enabled. In this case, when an order is received in Sales Inbox, a sales document will be immediately created from it based on the selected document and operation types.
|
|
<Process> | Boolean value (false | true) |
<Approve> | Boolean value (false | true) |
<Send> | Boolean value (false | true) |
<MoneyAccountID> | Unique system identifier for bank or cash account. See Get Bank Accounts and Get Cash Accounts |
<DatePaid> | Date of the payment Should be passed in the following format YYYY-MM-DD e.g. 2014-01-30 |
<SaleType> | Document type If not defined the default value from the connector settings will be used. Possible values:
|