Create a split rule
create_split_ruleCreates a split rule that shares each payment's net amount with one or more subaccounts, leaving the remainder in your balance.
Instructions
Create a split rule.
Create a split rule that shares each payment’s net amount (after fees) with one or more subaccounts. The rest stays in your balance.
percentage shares are basis points (2500 = 25%); flat shares are kobo, capped at the net amount. Pass the rule id as split when you create a payment, checkout session, payment link, invoice or subscription. The split is frozen on each payment when it is created.
In live mode this sends real money or changes where money is paid, and it cannot be undone. Before calling, confirm the exact amount (in kobo) and the destination with the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | Yes | ||
| metadata | No | ||
| allocations | Yes | ||
| idempotency_key | No | Optional. A unique key for this request; retrying with the same key returns the original result instead of acting twice. One is generated if omitted. |