跳转到主内容

伙伴关系

双方将资本投入共同经营,协议分享利润,并严格按照各自贡献的比例承担损失.

最后一个条款是整个产品。 利润按双方约定分割;亏损按出资份额分割,无协议变更. 一方在合同中受到保护,避免损失,而另一方则承担费用,这种合同不再是一种参与,而成为一种利息贷款,上面写着“伙伴关系”一词——每个对此加以审视的监管者都将将其作为一项合同对待。

那个... API 执行不对称 : profit_sharing_ratio 交给你了 bank_ownership_percent 来源于捐款,完全无法确定。

基础路径 : /api/v1/pfp/partnerships · 宗教读物: 木沙拉卡语Name


两种表格​

partnership_type发生什么事了何时结束
permanent双方将股权分给企业终身经营,分得一分一分双方解散
diminishing一方买断另一方在预定单位中的份额;所有权在全期内转移最后一个单位是买的

diminishing 是用于共同拥有某物的形状——财产、设备、车辆。融资方的股份随着每次买断而缩减,如果安排包括使用共有资产的租金,则租金随它而下降:你支付尚未拥有的部分。

选择 diminishing 生产 term_months 平台将获得买断单元:

units_total       = term_months / period_length(buyout_schedule)
buyout_unit_value = floor(bank_contribution / units_total)

buyout_schedule 也许是 monthly, quarterly, semi_annually or annually; 省略,是指月度。 30 天数,而不是日历月。


状态​

draft ──submit──> under_review ──review──> review_passed ──┐
│ │ │
│ └──reject──> rejected │
│ │
└────────────────── fund ────────────────────────────────┘
│
v
funded ──activate──> active
│
┌───────────────────┼──────────────┐
v v v
buyout_in_progress dissolved completed
状态含义
draft创建了,什么都没有移动
under_review提交供核准
review_passed兹附上结论。
rejected终端。 需要 a reason
funded捐款已到位;开始日期和预期结束日期已经确定
active企业正在运行;损益可以记录
buyout_in_progress正在购买稀释表, 单位
completed最后一个单位被买断了
dissolved提前结束,通过协议或其他方式结束

在世俗的阅读中 fund 可达从 draft 以及来自 review_passed 复议是可选的,只在宗教读物中 review_passed 资金。


建立伙伴关系​

POST /api/v1/pfp/partnerships
{
"customer_id": "8f2a1c44-0b6e-4d51-9a3f-1c8e5b7d2a90",
"region": "RU",
"partnership_type": "diminishing",
"currency": "RUB",
"total_value": "500000000",
"bank_contribution": "350000000",
"customer_contribution": "150000000",
"profit_sharing_ratio": { "bank": 60, "customer": 40 },
"term_months": 60,
"buyout_schedule": "quarterly",
"rental_amount": "1200000",
"asset_description": "Warehouse, 1 400 m², Kazan"
}
外地类型要求数说明
customer_iduuid✅对手
regionstring✅合同区;必须有一个有会计科目表支持的区域
partnership_typeenum✅permanent | diminishing
total_valuestring✅最小货币单位。 ** 必须等于两笔捐款的总和**
bank_contributionstring✅小单位
customer_contributionstring✅小单位
profit_sharing_ratioobject✅{"bank": n, "customer": m}整个百分比, 必须是总和 100
currencystring—ISO 4217
term_monthsinteger—需要时间 partnership_type is diminishing
buyout_scheduleenum—monthly | quarterly | semi_annually | annually
rental_amountstring—每期使用共有资产的次要单位.
asset_descriptionstring—免费文本
metadataobject—自己的数据, 返回未变

两次验证都否定了大多数最初的尝试:

  • bank_contribution + customer_contribution 必须是平等的 total_value 没错,没有四舍五入的松懈
  • profit_sharing_ratio 必须精确地相加 100.

回应 — 201 Created, status: "draft",与 bank_ownership_percent 和 customer_ownership_percent 来源于捐款:

{
"data": {
"id": "3b9c2f18-77a4-4e0d-8c15-6ad2f9e40b31",
"contract_number": "PRT-D-RU-20260823-4A7F1C",
"status": "draft",
"partnership_type": "diminishing",
"customer_id": "8f2a1c44-0b6e-4d51-9a3f-1c8e5b7d2a90",
"region": "RU",
"currency": "RUB",
"total_value": "500000000",
"bank_contribution": "350000000",
"customer_contribution": "150000000",
"bank_ownership_percent": 70,
"customer_ownership_percent": 30,
"profit_sharing_ratio": { "bank": 60, "customer": 40 },
"units_total": 20,
"buyout_unit_value": "17500000",
"units_bought": 0,
"buyout_history": [],
"total_profit": "0",
"total_loss": "0",
"bank_profit_share": "0",
"customer_profit_share": "0",
"rental_amount": "1200000",
"rental_paid_total": "0",
"term_months": 60,
"asset_description": "Warehouse, 1 400 m², Kazan",
"compliance_review": null,
"inserted_at": "2026-08-23T09:14:22Z"
}
}

注意该答复中的两种比率及其相差多远。 70/30; 利润为 60/40 这是正当的——从事工作的一方可能获得比其资本份额更大的利润——但如果风险损失,损失将减少。 70/30,没有 60/40.


列出伙伴关系​

GET /api/v1/pfp/partnerships
查询参数数值
status以上任何状态
region合同区
typepermanent | diminishing
envtest | prod (默认) prod)

返回简短的表格——身份、状况、缴款、所有者百分比。利润份额、买断历史和审查只是详细答复。

GET /api/v1/pfp/partnerships/{id}

生命周期过渡​

提交核准​

POST /api/v1/pfp/partnerships/{id}/submit

无身. draft → under_review.

附上核准书​

POST /api/v1/pfp/partnerships/{id}/review
{
"approved_by": "Investment Committee, minutes 14/2026",
"signed_at": "2026-08-01",
"document_ref": "IC-2026-014",
"note": "Approved subject to quarterly reporting"
}

approved_by 要求而且不得为空白。 under_review → review_passed.

拒绝​

POST /api/v1/pfp/partnerships/{id}/reject
{ "reason": "Collateral valuation not supported" }

原因被存储在 metadata.rejection_reason. under_review → rejected终点站

捐款情况​

POST /api/v1/pfp/partnerships/{id}/fund

没有尸体,有东西 start_date 致今天和 expected_end_date to term_months × 30 出门几天... 120 如果未给出期限,则在几个月内。对于正在缩小的合伙关系,它也会计算 next_buyout_date.

开工​

POST /api/v1/pfp/partnerships/{id}/activate

无身. funded → active.


损益​

分配利润​

POST /api/v1/pfp/partnerships/{id}/profit
{
"gross_profit": "8000000",
"period_end_date": "2026-09-30"
}

利润总额除以 profit_sharing_ratio,添加到 total_profit, bank_profit_share 和 customer_profit_share — 交易对手的股份通过分类账上账来转移,日期为 period_end_date。这不是纸面上的应计:资金留给企业的账户。

period_end_date 要求是因为分类账上的日期。

四舍五入的剩余部分流向对手,而不是融资方。 在许多分配中,替代部分会悄悄地在一方堆积可波克。

记录损失​

POST /api/v1/pfp/partnerships/{id}/loss
{ "amount": "3000000" }

除以 捐款份额,而不是按利润比率计算。 70/30 损失,如上所述, 3 000 000 拆分数 2 100 000 / 900 000 - 不论如何 60/40 利润协议。

拆分记录在 metadata.last_loss 累积于 total_loss:

{
"last_loss": {
"amount": "3000000",
"bank_share": "2100000",
"customer_share": "900000",
"date": "2026-09-30"
}
}

买断( 仅稀释形式)​

POST /api/v1/pfp/partnerships/{id}/buyout
{ "units": 1 }

units 默认为 1。每个单元移动 buyout_unit_value 从融资方到交易对手方,并重新计算两个所有权百分比:

customer_percent = floor((customer_contribution + buyout_unit_value × units_bought) × 100 / total_value)
bank_percent = 100 − customer_percent

对手自己的初始贡献是总和的一部分,所以所有权从已经存在的地方向前发展。 30 百分比并达到 33 在二十个单元中的第一个单元之后的%.

每个调用附件 buyout_history,将租金与融资方仍然拥有的股份的比例缩小,并将合同移至 completed 一旦购买了最后一个单位——此时对方持有 100 %.

被叫来的 permanent 其回报的伙伴关系 422 ——买断仅以逐渐减少的形式存在.

由于所有权百分比变动, 与它们一起拆分。在购买了一半的单元之后记录的损失与第一天记录的损失不同,这就是预期行为:损失沿用当时的所有权。

溶解​

POST /api/v1/pfp/partnerships/{id}/dissolve
{ "reason": "Parties agreed to wind up the venture" }

合同提前结束 终点站


工作实例​

合作基金与成员共同购买价值 5 000 000 RUB 的仓库。基金出资 3 500 000,成员出资 1 500 000。双方约定,由负责经营仓库的成员取得 40 % 的利润。成员在五年内按季度买回基金持有的份额。

"${AUTH[@]}" 下面是两个标题的每个 PFP 需要呼叫——会话符号,而不是 API ,会议安排如下:

AUTH=(-H "Authorization: Bearer $TOKEN" -H "x-organization-id: $ORG_ID")
# 1. Create — amounts in kopecks
curl -X POST https://4pay.online/api/v1/pfp/partnerships \
"${AUTH[@]}" -H "Content-Type: application/json" \
-d '{
"customer_id": "8f2a1c44-0b6e-4d51-9a3f-1c8e5b7d2a90",
"region": "RU", "partnership_type": "diminishing", "currency": "RUB",
"total_value": "500000000",
"bank_contribution": "350000000",
"customer_contribution": "150000000",
"profit_sharing_ratio": {"bank": 60, "customer": 40},
"term_months": 60, "buyout_schedule": "quarterly",
"rental_amount": "1200000"
}'

# 2. Contributions are in, work starts
curl -X POST .../partnerships/$ID/fund "${AUTH[@]}" -d '{}'
curl -X POST .../partnerships/$ID/activate "${AUTH[@]}" -d '{}'

# 3. First quarter earned 80 000 RUB
curl -X POST .../partnerships/$ID/profit "${AUTH[@]}" \
-d '{"gross_profit": "8000000", "period_end_date": "2026-11-30"}'
# fund 48 000 RUB, member 32 000 RUB — by the 60/40 agreement

# 4. First buyout unit
curl -X POST .../partnerships/$ID/buyout "${AUTH[@]}" \
-d '{"units": 1}'
# 175 000 RUB of ownership moves: the member goes from 30 % to 33 %,
# and the rent falls because less of the warehouse is rented
# (ownership percentages are whole numbers, rounded down)

如果这季度输了 80 000 RUB, 拆分结果为 56 000 / 24 000 —— 编著: 70/30 捐款,而不是由 60/40 协议。