palbaseDocs

Palbase Payments · API

POST/payments/splits/{split_id}/close

Close a payment split its buyer paid nothing of

Closes a split its buyer paid nothing of — the platform's discount paid its seller's share (a top-up) and its fee —, its sale canceled whole: its capture is undone, the platform's top-up and fee go back to the platform, the debt of a sale made at a loss goes back with it, and the split is refunded. The buyer paid nothing: nothing is given back to them. Closed already, it answers as it is. A split its buyer paid is given back by a refund instead (409 split_not_closable), and so is one let go to its seller (409 split_not_closable: pull it back first); one of a payment that never went through holds nothing to close (409 split_not_captured). A paid payment's splits not settled yet are settled first: the payment is read of its provider, and one it cannot be read of answers 5xx. A close answered 5xx is asked again: asked again, it finishes what it began, its books with it. An approval of the split under way at its provider answers 409 approval_pending: ask again. Made beside no refund or approval of its payment: 409 refund_in_progress, ask again under the same Idempotency-Key.

Called by your server, with the project's secret key.

Path

split_idstring · requiredPayment split UUID.
curl
curl -X POST "https://<your-ref>.palbase.studio/payments/splits/<split_id>/close" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200Split closed

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation ClosePaymentSplit of payments's contract.