# Split payment tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Split payment

### charge_unpaid_shares

Charge the organizer's saved card now for a split booking's unpaid shares, as the deadline would: guests' payments still open are canceled first (one paid meanwhile counts), then the card is charged once for what's left, never more than the organizer agreed to. A decline or the bank asking for authentication is a failed charge: the organizer is told and gets the grace period. It moves money, so a person always applies it (never an agent on its own), and it can't be undone (refund_order gives money back). Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write, orders:amounts

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders

#### Output

- `orderId` — string; required. 
- `code` — string; required. 
- `amount` — integer; required. What the saved card is being charged
- `status` — string; required. closing: the charge runs right after this (open share payments are canceled first); the booking page and the activity log say how it went Allowed: "open", "closing", "charging", "grace", "needs\_action", "settled", "released", "canceled"

### extend_split_deadline

Give a split booking's guests longer to pay their shares: a new deadline, later than the current one and before the session. After a failed charge (or once staff are asked to decide), it opens the shares again until the new deadline, when the card is charged (or the seats released) as before. The most the card can be charged stays what the organizer agreed to. Reminders move with it. Undo puts the old deadline back while it hasn't come and nothing was paid since (not after a failed charge). Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders
- `payBy` — string; required. The new deadline: later than the current one (or now, after a failed charge), and before the session starts format: "date-time"
- `note` — string; optional. Staff's own words; the guests never see it minLength: 1; maxLength: 500

#### Output

- `orderId` — string; required. 
- `code` — string; required. 
- `payBy` — string; required.  format: "date-time"
- `status` — string; required.  Allowed: "open", "closing", "charging", "grace", "needs\_action", "settled", "released", "canceled"

### release_unpaid_seats

Put a split booking's unpaid seats back on sale now (or the ones named), through the same seat removal as change_booking_seats: the seats that stay keep their price, a service charge already paid stays, and nothing is refunded by itself. The organizer's seat is never released. Once no guest's share is left unpaid, the split is over: nothing is charged at the deadline, and the saved card is forgotten. Can't be undone (the seats may be booked at once). Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders
- `positions` — array; optional. The unpaid seats to release (spot numbers); every unpaid seat by default. The organizer's own (1) is never released minItems: 1; maxItems: 500
  - `positions[]` — integer; optional.  minimum: 2; maximum: 10000

#### Output

- `orderId` — string; required. 
- `code` — string; required. 
- `released` — array; required. 
  - `released[]` — integer; optional.  minimum: -9007199254740991; maximum: 9007199254740991
- `partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `total` — integer or null; required. Minor units (cents) in the location's currency
- `balanceDue` — integer or null; required. Minor units (cents) in the location's currency
