POST /api/v1/operations/prepare_721_pay/plans
Parameters
| Name | Location | Details |
|---|---|---|
X-Juicebox-Account | header / required | Enrolled account identity, including authority chain and lowercase owner address. Enrollment derives this identity before the account exists. |
X-Juicebox-Signer | header / required | Owner wallet or authorized bot address that signed this request. |
X-Juicebox-Issued-At | header / required | Unix seconds, sent as 1–13 decimal digits without leading zeros; at most 30 seconds ahead of server time. |
X-Juicebox-Expires-At | header / required | Unix seconds, sent as 1–13 decimal digits without leading zeros; in the future and within 300 seconds of issuedAt. |
X-Juicebox-Nonce | header / required | Fresh random 32-byte lowercase nonce. A consumed nonce cannot be retried. |
X-Juicebox-Signature | header / required | EIP-712 CenterRequest signature over every signed field. Contract-owner signatures may vary in length. This is a computed request proof, not a reusable API key. |
X-Juicebox-Grant | header / optional | Authorized bot grant ID. Required for a bot; omit for the owner, signing grantId as the empty string. |
Idempotency-Key | header / required | Signed retry identity. Required on plan creation and transaction submission. Preserve exact method, target, Content-Type, and body bytes; use a fresh request nonce and signature. |
Request body
| Field | Type | Details | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
project | object required | Fields
| ||||||||||||
account | string required | |||||||||||||
token | string required | Token address; native ETH is 0x000000000000000000000000000000000000EEEe. | ||||||||||||
amount | string required | Fresh payment amount in the token’s smallest units. Use 0 for free tiers or eligible NFT-credit purchases. | ||||||||||||
beneficiary | string required | |||||||||||||
tierIds | array required | |||||||||||||
slippageBps | integer optional | Slippage in basis points, 0–4950. Default 100. Raise it only within what the payer accepts, such as a payFailure's retrySlippageBps. Default: | ||||||||||||
minReturnedTokens | string optional | Explicit minimum fungible project tokens for the beneficiary, in 18-decimal base units, replacing the quoted count less slippageBps. Needed when the quote warns that the default minimum sits above the simulated fill (a buyback hook beside the NFT hook). NFT delivery is checked either way. | ||||||||||||
allowOverspending | boolean optional | Default: | ||||||||||||
skipSplits | boolean optional | Buyback 1.4 only. Unset means on wherever the project's buyback hook is 1.4 and no metadata is given, as the apps pay: the hook buys from the pool when that beats the payer's share of a mint, and the tokens it buys go to the beneficiary without the reserved split (they already exist, so nothing is issued for them and the split gets none). Minting still pays the split. The default minimum is then the SDK's (prepareUserPay): with a pool quote, the beneficiary's part of the floored quote, which the hook also enforces. Pass false when the payment should honor the project's splits, such as routing fees or revenue into a project. Where it cannot apply (no buyback hook, hook 1.0 or 1.1.1, the caller's own metadata) unset means off, and an explicit true is refused. The quote's skipSplits says which applied and why. |
JSON schema
{
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"chainId": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 10
},
{
"type": "number",
"const": 8453
},
{
"type": "number",
"const": 42161
},
{
"type": "number",
"const": 11155111
},
{
"type": "number",
"const": 11155420
},
{
"type": "number",
"const": 84532
},
{
"type": "number",
"const": 421614
}
]
},
"projectId": {
"type": "string",
"maxLength": 78,
"pattern": "^(0|[1-9][0-9]*)$"
},
"version": {
"default": 6,
"type": "number",
"const": 6
}
},
"required": [
"chainId",
"projectId"
],
"additionalProperties": false
},
"account": {
"type": "string"
},
"token": {
"description": "Token address; native ETH is 0x000000000000000000000000000000000000EEEe.",
"type": "string"
},
"amount": {
"type": "string",
"maxLength": 78,
"pattern": "^(0|[1-9][0-9]*)$",
"description": "Fresh payment amount in the token’s smallest units. Use 0 for free tiers or eligible NFT-credit purchases."
},
"beneficiary": {
"type": "string"
},
"tierIds": {
"minItems": 1,
"maxItems": 32,
"type": "array",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
}
},
"slippageBps": {
"default": 100,
"description": "Slippage in basis points, 0–4950. Default 100. Raise it only within what the payer accepts, such as a payFailure's retrySlippageBps.",
"type": "integer",
"minimum": 0,
"maximum": 4950
},
"minReturnedTokens": {
"description": "Explicit minimum fungible project tokens for the beneficiary, in 18-decimal base units, replacing the quoted count less slippageBps. Needed when the quote warns that the default minimum sits above the simulated fill (a buyback hook beside the NFT hook). NFT delivery is checked either way.",
"type": "string",
"maxLength": 78,
"pattern": "^(0|[1-9][0-9]*)$"
},
"allowOverspending": {
"default": false,
"type": "boolean"
},
"skipSplits": {
"description": "Buyback 1.4 only. Unset means on wherever the project's buyback hook is 1.4 and no metadata is given, as the apps pay: the hook buys from the pool when that beats the payer's share of a mint, and the tokens it buys go to the beneficiary without the reserved split (they already exist, so nothing is issued for them and the split gets none). Minting still pays the split. The default minimum is then the SDK's (prepareUserPay): with a pool quote, the beneficiary's part of the floored quote, which the hook also enforces. Pass false when the payment should honor the project's splits, such as routing fees or revenue into a project. Where it cannot apply (no buyback hook, hook 1.0 or 1.1.1, the caller's own metadata) unset means off, and an explicit true is refused. The quote's skipSplits says which applied and why.",
"type": "boolean"
}
},
"required": [
"project",
"account",
"token",
"amount",
"beneficiary",
"tierIds"
],
"additionalProperties": false
}Response 201
| Field | Type | Details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | string (uuid) required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | string required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operation | string required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
draft | object required | Fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commitment | string required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | integer required | Unix timestamp in milliseconds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiresAt | integer required | Unix timestamp in milliseconds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
revision | integer required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
smartAccount | object optional | Fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | string required | Values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps | array required | Fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
confirmationScope | string required |
JSON schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"account": {
"$ref": "#/components/schemas/Address"
},
"operation": {
"type": "string"
},
"draft": {
"$ref": "#/components/schemas/PlanDraft"
},
"commitment": {
"$ref": "#/components/schemas/Hash"
},
"createdAt": {
"$ref": "#/components/schemas/UnixMilliseconds"
},
"expiresAt": {
"$ref": "#/components/schemas/UnixMilliseconds"
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"smartAccount": {
"type": "object",
"properties": {
"bindingId": {
"$ref": "#/components/schemas/Hash"
},
"stateHash": {
"$ref": "#/components/schemas/Hash"
},
"chainId": {
"$ref": "#/components/schemas/ChainId"
},
"address": {
"$ref": "#/components/schemas/Address"
},
"manifestRevision": {
"$ref": "#/components/schemas/Hash"
}
},
"required": [
"bindingId",
"stateHash",
"chainId",
"address",
"manifestRevision"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"prepared",
"pending",
"partial",
"blocked",
"reorged",
"expired",
"transactions_confirmed"
]
},
"steps": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PlanStep"
},
"minItems": 1,
"maxItems": 32
},
"confirmationScope": {
"type": "string"
}
},
"required": [
"id",
"account",
"operation",
"draft",
"commitment",
"createdAt",
"expiresAt",
"revision",
"status",
"steps",
"confirmationScope"
],
"additionalProperties": false
}