API documentation
Method list
Test your request
Changelog


addConnectContractorCreditSettlement
The method allows you to add a manual credit settlement (repayment) for a chosen contractor in BaseLinker Connect. A settlement reduces the blocked credit amount for the contractor, effectively recording a payment received for previously charged orders. The settlement amount cannot exceed the contractor's currently blocked credit amount (credit_to_pay).


Input parameters
connect_contractor_idintContractor ID. The list of contractor identifiers can be retrieved using the getConnectIntegrationContractors method
amountfloatSettlement amount. Must be a positive value and cannot exceed the contractor's currently blocked credit amount (credit_to_pay). Can be passed as string or number in JSON
messagevarchar(255)Settlement note/comment describing the repayment, e.g., payment reference, bank transfer ID, etc. Maximum 255 characters
order_idintRelated order ID if the settlement is connected to a specific order. Use 0 or omit if not related to any specific order



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
credit_entry_idintThe ID of the created credit settlement entry in the trade credit history
new_blocked_creditfloatThe contractor's new blocked credit amount (credit_to_pay) after the settlement
new_available_creditfloatThe contractor's new available credit amount after the settlement



Sample
Input data:
Output data:
A sample request in PHP: