Skip to main content
POST
Preview a settlement rule

Authorizations

Authorization
string
header
required

Bearer token authentication for agent-scoped endpoints. The token is the accessToken returned when redeeming a device code via POST /agents/device-codes/redeem. Agent credentials are user-scoped: all requests are automatically bound to the agent's associated customer and subject to the agent's policy.

Body

application/json

A draft rule and a payment to split by it. The draft's fields sit at the top level, beside amount.

currency
string
required

Code of the payments the rule splits, which is the currency of the Embedded Wallet its selectors name.

Example:

"USDB"

match
object[]
required
Required array length: 1 - 20 elements
splits
object[]
required

The shares, in the order they are paid. At most 20.

Minimum array length: 1
amount
integer<int64>
required

A payment to split, in the smallest unit of the draft's currency.

Required range: 1 <= x <= 9000000000000000
Example:

1000000

Response

The preview

currency
string
required
Example:

"USD"

amount
integer<int64>
required

The payment previewed.

Example:

1000000

splits
object[]
required

Every row of the rule, in row order.

ownerKeeps
integer<int64>
required

What stays with the customer.

Example:

450000

recentMatches
object[]
required
skipReason
enum<string>

Why an execution paid nothing.

Available options:
RULE_PAUSED,
INCOMING_PAYMENT_RETURNED,
AMOUNT_BELOW_RULE,
LIMIT_EXCEEDED,
CANCELLED,
CREATOR_REVOKED,
AGENT_PAUSED