Integrations & ERP Custom Fields / API Developer Documentation

API Frequently Asked Questions

Q: API returned 200 "OK", but no data are shown/updated

A: Our API works in a transaction context. When you upload your data to YayPay using any `POST` endpoint (e.g. /adjustments, /contacts. etc) you should close (finish) this transaction by making a call to /batch/finish endpoint, only after that the data will be updated on the UI.  

Q: Does YayPay round numbers? In my ERP system invoice total is 145.54$ but in YayPay it is shown as 146.00$

A: No, YayPay does not do rounding, we consume and show numbers as they are.

Q: I have an invoice closed with payment, however on UI payment is not allocated on this invoice.

A: There are two possible causes:

1) payment was uploaded to YayPay prior to the invoice it should be allocated to. For example, you've uploaded a payment that closes the invoice on Feb 2, 2021, but the invoice appeared in YayPay only on Feb 3, 2021 - in this case, we are not able to link them. 

2) incorrect linking between entities, the invoice has internal id "INV_123432" but payment was allocated on invoice with internal id "INV123432". 


Q: I am uploading several invoice lines, but only one line is shown on the UI.

A: The example below shows a common issue when uploading invoice items.

As you can see, there are two items with the same internal ID, causing our system to interpret them as duplicates. To resolve this issue, use the quantity field.


Q: Does API delete only Open documents?

A: No, API deletes Open and Closed documents.

Q: What error codes could be returned by the API?

A: 

Error code Description 
200 OK
400 Bad request, check your data. Response from API will contain information about fields that did not pass validation. 
401 Unauthorized. Check that the correct IP address is whitelisted and the API KEY header has been sent. 
403 You don't have permission to use the resource or your integration has been blocked due to DDoS for example.
429 Too many requests. Your application exceeded request limits.
500 Server error. The server was not able to process your request.
502 The server is restarting now or deployment is in progress, such request should be re-tried with some delay.
504 Time out. Most likely you are trying to upload a huge amount of data in one request (for example, a request with 25 000 invoices will be time outed) or you have loaded a lot of data in one transaction and call to "/batch/finish" endpoint took longer than 25 minutes.


Q: Why invoice balance is negative?

 

A: You have to check the data you send to YayPay, it usually happens when invoice paid > (is greater than) invoice total. E.g. invoice paid amount is 10,588.05 but the invoice total amount is 10,588.00  

Q: Is there any specific order to upload entities?

A: Yes. Customers > Contacts > Documents -> Allocations. For example, you can upload a customer without any documents to YayPay, but if you upload an invoice when its customer does not exist in YayPay this invoice will not be shown even after the customer is uploaded, because we are not able to link them post factum. Same for allocations, if you upload a payment that is linked with an invoice that does not exist in YayPay the payment will not be linked with the invoice even later.

Q: What is the difference between batch and transaction in YayPay terminology?

A: A Batch is the collection of records sent in one request while a transaction is a collection of batches.  

A: optimal batch size (number of records per request) is 500.

A: At YayPay we recommend 5000-8000 records (customers + contacts + invoices + ...) to be committed in one transaction.

A: Please follow the link to read the article


Can't find what you need?

Contact our support team support@yaypay.com for help.