Function: ApplyVendorCredit
The ApplyVendorCredit function applies vendor credit to bills in Tipalti. The vendor credit and bills must exist in Tipalti before this function can be applied.
- If the vendor credit has not yet been applied to the bill in Tipalti (i.e., the vendor credit/ bill relation does not exist), then a new relation will be created and the bill will be credited.
- If part of the vendor credit has already been applied to the bill in Tipalti (i.e., the vendor credit/ bill relation exists), then the existing applied amount will be updated.
In both cases, the bill and vendor credit statuses and the amounts due are updated accordingly.
- EAT Encryption Additional Terms parameter: None
- API version: V7
The following is a sample SOAP 1.2 request and response. In the request, you need to replace the data types in yellow with actual values.
SOAP 1.2: Request
POST /v7/payerfunctions.asmx HTTP/1.1
Host: api.tipalti.com
ContentType: application/soap+xml; charset=utf8
ContentLength: length
<?xml version="1.0" encoding="utf8"?>
<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/soapenvelope">
<soap12:Body>
<ApplyVendorCredit xmlns="http://Tipalti.org/">
<payerName>string</payerName>
<timestamp>double</timestamp>
<key>string</key>
<vendorCreditRefCode>string</vendorCreditRefCode>
<relatedInvoices>
<RelatedInvoice>
<InvoiceRefCode>string</InvoiceRefCode>
<AppliedAmount>decimal</AppliedAmount>
</RelatedInvoice>
<RelatedInvoice>
<InvoiceRefCode>string</InvoiceRefCode>
<AppliedAmount>decimal</AppliedAmount>
</RelatedInvoice>
</relatedInvoices>
</ApplyVendorCredit>
</soap12:Body>
</soap12:Envelope>
SOAP 1.2: Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf8
Content-Length: length
<?xml version="1.0" encoding="utf8"?>
<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/soapenvelope">
<soap12:Body>
<ApplyVendorCreditResponse xmlns="http://Tipalti.org/">
<ApplyVendorCreditResult>
<errorMessage>string</errorMessage>
<errorCode>string</errorCode>
<b>boolean</b>
<i>integer</i>
<d>double</d>
<s>string</s>
<InvoiceResponses>
<TipaltiApplyVendorCreditItemResponse>
<ErrorMessage>string</ErrorMessage>
<Succeeded>boolean</Succeeded>
<InvoiceRefCode>string</InvoiceRefCode>
</TipaltiApplyVendorCreditItemResponse>
<TipaltiApplyVendorCreditItemResponse>
<ErrorMessage>string</ErrorMessage>
<Succeeded>boolean</Succeeded>
<InvoiceRefCode>string</InvoiceRefCode>
</TipaltiApplyVendorCreditItemResponse>
</InvoiceResponses>
<VendorCreditResponse>
<ErrorMessage>string</ErrorMessage>
<Succeeded>boolean</Succeeded>
<InvoiceRefCode>string</InvoiceRefCode>
</VendorCreditResponse>
</ApplyVendorCreditResult>
</ApplyVendorCreditResponse>
</soap12:Body>
</soap12:Envelope>
Request parameters
element |
description |
limitation |
Mandatory? |
data type |
---|---|---|---|---|
payerName | The name of the payer, as assigned by Tipalti |
|
Mandatory | string |
timestamp |
Current time (UTC) when the request is sent |
Unix time | Mandatory | double |
key | Encryption key | Mandatory | string | |
vendorCreditRefCode |
|
|
Mandatory | string |
relatedInvoices |
|
Mandatory | Array of Related Invoice |
RelatedInvoice
element |
description |
LIMITATION |
Mandatory? |
data type |
---|---|---|---|---|
InvoiceRefCode |
|
|
Optional | string |
AppliedAmount | The amount of vendor credit to apply to the bill |
|
Optional | decimal |
Response parameters
element |
description |
data type |
---|---|---|
ApplyVendorCreditResult | Contains the response parameters | TipaltiApplyVendorCreditResponse (extension of TipaltiResponse) |
TipaltiApplyVendorCreditResponse
element |
description |
Limitation |
data type |
---|---|---|---|
errorMessage | A description of the error | See API error codes. | string |
errorCode | The status of the error | See API error codes. | string |
b | If the return code is Boolean, this parameter will carry the value. | boolean | |
i | If the return code is integer, this parameter will carry the value. | integer | |
d | If the return code is double, this parameter will carry the value. | double | |
s | If the return code is string, this parameter will carry the value. | string | |
InvoiceResponses |
|
Array of TipaltiApplyVendor CreditItemResponse |
|
VendorCreditResponse | Contains the results for the vendor credit that was applied to the bills | TipaltiApplyVendor CreditItemResponse |
TipaltiApplyVendorCreditItemResponse
element |
description |
Limitation |
data type |
---|---|---|---|
ErrorMessage | A description of the error related to the application of the vendor credit | string | |
Succeeded |
|
boolean | |
InvoiceRefCode | The reference code for the bill or vendor credit |
|
string |