Integrations & ERP Custom Fields / API Developer Documentation

Data Validation in API

This section provides an overview of how to validate API data.

Some basic concepts used in YayPay API integration:

  • Batch – A collection of records that are sent together in a single request.
  • Transaction – A collection of batches.
     

In YayPay API integration, the main entity is the customer, represented by the customer element. It is essential that all invoices, payments, and other related data are connected with a particular customer.

Delete

Warning

YayPay will not display data that is not connected to any customer.

 

Data Issues

To verify the data validity, use a /transaction-info endpoint.


You can use this endpoint after completing the batch uploading process, which initiates data synchronization. This is displayed, e.g. on the Aging Report page.
During this synchronization, certain entities are updated, while others are created, deleted, or undergo other modifications. At the same time, the existence of a customer element is verified for each entity listed in the individual API calls (e.g. invoices, payments, adjustments, credit memos, etc.).

IDs of any entities that are not associated with any customer, will be listed in the issues array of the response. For example:

 

Other Issues

When there are logical and business-related errors in the data, the issues array will be empty. To identify such issues, compare the responses from the total_in_transaction and created_or_updated endpoints.

For example, if YayPay rreceives two payments with identical internal IDs, the issues array will be empty. 

Additionally, pay attention to the following elements in the entities array:

  • deleted_in_transaction –  Indicates the number of records that were marked for deletion and sent within a transaction.
  • marked_as_deleted – Indicates the number of records that were marked as deleted.

     
Delete

Note

For more information on committing transactions, see the Getting Started with Swagger UI article.

Can't find what you need?

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