General Information
The funds received as a result of invoice payment are typically credited to the bank details specified during the Marketplace setup (unless other adjustments were made).
If the funds need to be distributed across different accounts (different contractors, service providers, etc.), the
amountDistribution
field is used when creating the invoice.
The amountDistribution
field is a JSON array consisting of objects in the following format:typescripttype TDistribution = { "recipient": { "name": string, "tin": string, "bic": string, "bankName": string, "bankAccount": string }, "amount": string, "order": number, "vor": boolean, "isFeePayer": boolean, "overpaymentPart": number }
Field | Type | Required | Description |
---|---|---|---|
recipient | object | Yes | These are the recipient details. It corresponds to the RecipientField type. You can see the description in the Playground API DOCS. |
amount | string | Yes | The amount to be transferred. |
order | number | No | The order of fund distribution. Default value is 0. It is used for fine-tuning in the case of partial payments. |
vor | boolean | No | Abbreviation for Victim of Rounding. Indicates who will bear the rounding result. For example, if 100 is divided by 3, two recipients will receive 33.33, and the one with vor: true will receive 33.34. |
isFeePayer | boolean | No | Shows which recipient will pay the service fee. |
overpaymentPart | number | No | Specifies the share of the overpayment that will be sent to the recipient. For example, if only one recipient has overpaymentPart: 1, they will receive the entire overpayment. If two recipients have overpaymentPart: 1, each will receive half of the overpayment. All fields and their types are specified in the data schema available in the sandbox: https://condo.d.doma.ai/admin/api. |
Recipient details must be validated in advance through technical support.
Limitations:
- Maximum number of recipients: 5.
- Recipient details must be pre-added to the system. This is done by contacting technical support.
- Recipients must be unique. Two recipients cannot have identical details in the distribution.
- The total distribution amount must match the invoice amount. You cannot distribute only part of the funds.
- In each group (recipients with the same
order
), there must be exactly one recipient withvor: true
. - The recipient with
vor: true
must also be one of the fee payers (isFeePayer: true
) and receive part of the overpayment (overpaymentPart
).
Distribution Examples
For simplicity, we will use a string instead of the recipient object.
Example 1: Basic
The simplest distribution. No partial payment, no overpayment. Just a regular invoice payment with two recipients.
Invoice amount: 1000
json{ "amountDistribution": [ {"recipient": "recipient1", "amount": "200", "vor": true, "isFeePayer": true, "overpaymentPart": 1 }, {"recipient": "recipient2", "amount": "800" } ] }
Payment amount: 1000
Fee: 5%
Distribution result:
Recipient | Amount |
---|---|
recipient1 | 150 |
recipient2 | 800 |
fee | 50 |
Example 2: Rounding
An example showing how
vor: true
works. Here there are three recipients, and all of them pay the fee.
No partial payment, no overpayment. Just a regular invoice payment with three recipients.Invoice amount: 300
json{ "amountDistribution": [ {"recipient": "recipient1", "amount": "100", "isFeePayer": true }, {"recipient": "recipient2", "amount": "100", "vor": true, "overpaymentPart": 1, "isFeePayer": true }, {"recipient": "recipient3", "amount": "100", "isFeePayer": true } ] }
Payment amount: 300
Fee: 10 (3.33333%)
Distribution result:
Recipient | Amount |
---|---|
recipient1 | 96.67 |
recipient2 | 96.66 |
recipient3 | 96.67 |
fee | 10 |
Sandbox
The sandbox below allows for distribution calculations.
Payment settings
Recipients
Options
Payment amount:
Payment fee: