{
  "info": {
    "name": "Solana Developer Platform Public API",
    "description": "Public Postman collection generated from the SDP OpenAPI contract. Internal-only endpoint families are excluded.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{sdpApiKey}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const header = pm.request.headers.find((h) => h.key.toLowerCase() === \"idempotency-key\");",
          "const saved = header && /^\\{\\{(idempotencyKey\\.[^}]+)\\}\\}$/.exec(header.value);",
          "const variable = saved && saved[1];",
          "if (variable && !pm.collectionVariables.get(variable)) {",
          "  pm.collectionVariables.set(variable, pm.variables.replaceIn(\"{{$guid}}\"));",
          "}",
          "if (variable) pm.variables.set(\"idempotencyKeySent\", pm.collectionVariables.get(variable));"
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const header = pm.request.headers.find((h) => h.key.toLowerCase() === \"idempotency-key\");",
          "const saved = header && /^\\{\\{(idempotencyKey\\.[^}]+)\\}\\}$/.exec(header.value);",
          "const variable = saved && saved[1];",
          "const sent = pm.variables.get(\"idempotencyKeySent\");",
          "if (variable && sent && pm.collectionVariables.get(variable) === sent) {",
          "  const status = pm.response.code;",
          "  const replayed = pm.response.headers.get(\"Idempotent-Replayed\") === \"true\";",
          "  let body;",
          "  try { body = pm.response.json(); } catch (e) {}",
          "  const code = body && body.error ? body.error.code : undefined;",
          "  const rejected = status === 422 && code !== \"IDEMPOTENCY_KEY_REUSED\";",
          "  const data = body && typeof body.data === 'object' ? body.data : null;",
          "  const moving = new Set([\"pending\",\"processing\",\"awaiting_payment\",\"settling\",\"activating\",\"canceling\",\"updating\",\"submitted\"]);",
          "  const inFlight = data !== null && [data.transfer, data.batch, data.recurringPayment, data.collectionAttempt]",
          "    .some((record) => record && moving.has(record.status));",
          "  // A 2xx whose body is unreadable or names no data says nothing final: keep the key.",
          "  const settled = status >= 200 && status < 300 ? data !== null && !inFlight : replayed;",
          "  if (settled || rejected) {",
          "    pm.collectionVariables.unset(variable);",
          "  }",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.solana.com",
      "type": "string"
    },
    {
      "key": "sdpApiKey",
      "value": "sf_your_api_key",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Health",
      "item": [
        {
          "name": "Health check",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/health",
            "description": "Returns service health and build metadata."
          }
        },
        {
          "name": "Readiness check",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/health/ready",
            "description": "Performs readiness checks for downstream dependencies."
          }
        }
      ]
    },
    {
      "name": "Wallets",
      "item": [
        {
          "name": "List wallets",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/wallets",
            "description": "Lists active wallets under active Config and Connection owners, oldest first. Provider narrows the list to one custody provider."
          }
        },
        {
          "name": "Create wallet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/wallets",
            "description": "Provisions a new wallet under exactly one provider account: the project's Managed config for `provider`, or the Custody Connection named by `connectionId`. A body naming both, or neither, is rejected with `400`.\n\nWith an `Idempotency-Key`, SDP never records a second wallet for one key: a retry returns the wallet an earlier attempt recorded, even after the 24-hour key window. A provider that accepts a request id also receives one derived from the key.\n\nOn a provider that dedupes on the request id, a `5xx` is not stored: a same-key retry runs again and gets back the wallet the first attempt made, even when SDP failed to record it, for as long as the provider keeps the request id (permanently, or for 24 hours; the Idempotency guide lists each provider). On any other provider a failure is stored as a `503`, and a new key is a new provider request. A `503` can mean the provider created the wallet before the error. With a provider that accepts no request id, a failure that left no SDP wallet row makes even the same key a new provider request after 24 hours. Before any retry after an ambiguous failure, whatever the key, check `GET /v1/wallets` and, if the wallet is not there, the provider account.\n\nThe provider request id and the recorded-wallet lookup both include the credential. After an API key rotation, once the key's 24-hour record has expired, the same key under the new credential is a new provider request and can create a second wallet: list wallets with `GET /v1/wallets` and check the provider account before retrying a create.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"provider\": \"privy\",\n  \"label\": \"Treasury wallet\",\n  \"purpose\": \"transfer\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete wallet",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/wallets",
            "description": "Deletes the wallet from its exact owning custody target when that Provider supports wallet deletion. Provider, when supplied, is a consistency assertion.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"provider\": \"privy\",\n  \"walletId\": \"privy_wallet_123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List wallet signing configs",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/wallets/configs",
            "description": "Returns the active Config-owned wallet signing configurations for the requested scope, one per provider."
          }
        },
        {
          "name": "Aggregate wallet balances",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/wallets/aggregate",
            "description": "Aggregates tracked balances for active wallets under the same owner-aware inclusion rules as the wallet list, without exposing one aggregate-level owner or runtime-admission value. Returns 503 if any included wallet balance cannot be read, rather than returning an incomplete total."
          }
        },
        {
          "name": "Get wallet public key",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/wallets/public-key",
            "description": "Returns the persisted public key for an exact active walletId. walletId is required (400 without it); an API key with selected wallets gets 404 for a wallet it does not list. Resolution is DB-backed only."
          }
        },
        {
          "name": "Check signer via simulated memo transaction",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/wallets/signer-check",
            "description": "Signs a server-authored memo message with the named wallet, verifies the signature, and simulates the transaction. Nothing is broadcast and no sponsorship is spent. The wallet is the only readonly signer and the request cannot supply memo text.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"walletId\": \"privy_wallet_123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get wallet by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/wallets/{{walletId}}",
            "description": "Returns active wallet metadata, exact Config or Connection ownership, runtime execution admission, Provider, public key, and by default the current SOL balance. If the balance read fails, returns 503 instead of a zero balance. Set includeBalance=false for a metadata-only read."
          }
        },
        {
          "name": "Update wallet",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/wallets/{{walletId}}",
            "description": "Updates the display label of an active wallet under its exact Config or Connection owner.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Treasury signer\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Projects",
      "item": [
        {
          "name": "List projects",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/projects",
            "description": "Lists projects in the organization."
          }
        },
        {
          "name": "Get project",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/projects/{{projectId}}",
            "description": "Gets project details."
          }
        },
        {
          "name": "Get project provider availability",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/projects/{{projectId}}/provider-availability",
            "description": "Lists every provider this deployment's release channel publishes, with whether this project can use it, counting the deployment's provider credentials for the project's environment. The same rule gates every provider entry point, so a provider reported unavailable is refused there with 403, or 503 when the deployment does not hold its credentials. A project outside the caller's organization, or another project for a project-bound API key, returns 404."
          }
        },
        {
          "name": "List project integrations",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/integrations",
            "description": "Lists the project's integrations and how each reaches the project. A provider is listed only when the project can use it, decided by the same rule that admits its use, so an integration listed here is never refused for availability at its entry point. The project comes from the `x-project-id` header, or from the API key's own project."
          }
        }
      ]
    },
    {
      "name": "Payments",
      "item": [
        {
          "name": "Get wallet balances",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/wallets/{{walletId}}/balances",
            "description": "Retrieves balances for a custody wallet. If any SOL or SPL balance read fails, returns 503 instead of partial or zero balances. Optional minimumSlot requires confirmed account state at or after that Solana slot; the response acknowledges the bound in data.balanceReadContext.minimumSlot. Wallet lifecycle and provisioning are managed through /v1/wallets."
          }
        },
        {
          "name": "List transfers",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/transfers",
            "description": "Lists persisted payment transfers for the authenticated scope. Set custodyWalletId to select one exact SDP wallet; observed address history is opt-in with includeObserved=true."
          }
        },
        {
          "name": "Execute transfer (custody)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.createPaymentTransfer}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/transfers",
            "description": "Executes an on-chain transfer using the exact SDP Wallet ID (`id` from `/v1/wallets`) and server-side custody signing. Requires an Idempotency-Key: a retry with the same key and request returns the original transfer instead of sending a second one. A 200 may return a processing transfer with its signature when broadcast or confirmation is still being reconciled; do not create a replacement transfer for that payment. A native SOL transfer is refused with 409 `AMOUNT_BELOW_RENT_MINIMUM`, before anything is written or sent, when it pays less than the rent-exempt minimum to an address with no account or would leave the source wallet holding more than nothing but less than the minimum. When the source wallet's policy at its custody provider refuses to sign, the transfer fails with 422 `CUSTODY_POLICY_REFUSED` and nothing is signed or sent; the message names the provider whose policy to review. When the source wallet holds less SOL, or less of the token in its token account, than the amount, the transfer fails with 400 `TRANSACTION_FAILED` and is recorded `failed` with that reason in `error`; a retry with the same Idempotency-Key returns the same error, so fund the wallet and send again with a new key. A source wallet with no token account for the token is refused earlier with 400 `BAD_REQUEST`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"projectId\": \"prj_example\",\n  \"sourceCustodyWalletId\": \"cwlt_example\",\n  \"destination\": \"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU\",\n  \"token\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n  \"amount\": \"100.00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get transfer",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/transfers/{{transferId}}",
            "description": "Retrieves details for a specific transfer."
          }
        },
        {
          "name": "Estimate transfer batch",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/transfer-batches/estimate",
            "description": "Validates an exact-wallet transfer batch request and estimates transaction chunking and fees. `warnings` lists what would make the batch fail: a native SOL amount below the rent-exempt minimum sent to an address with no account, or a source wallet left below the minimum; create refuses those with 409 `AMOUNT_BELOW_RENT_MINIMUM`. Returns 503 `ESTIMATE_NOT_AVAILABLE` when Solana RPC cannot price a chunk's fee; the estimate stores nothing, so retry it.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"projectId\": \"prj_example\",\n  \"sourceCustodyWalletId\": \"cwlt_example\",\n  \"token\": \"SOL\",\n  \"recipients\": [\n    {\n      \"externalId\": \"payroll_row_001\",\n      \"counterpartyId\": \"cpty_example\",\n      \"counterpartyAccountId\": \"cpacct_example\",\n      \"amount\": \"25.00\"\n    }\n  ],\n  \"externalId\": \"payroll_2026_06_30\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List transfer batches",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/transfer-batches",
            "description": "Lists transfer batches for the authenticated organization or project scope."
          }
        },
        {
          "name": "Create transfer batch",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.createPaymentTransferBatch}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/transfer-batches",
            "description": "Executes an outbound transfer batch from one exact SDP Wallet ID, chunks recipients into Solana transactions, and returns the batch, recipient, and transfer records. Requires an Idempotency-Key: a retry with the same key and request returns the original batch without another on-chain submission. Recipient order does not change the request. A native SOL batch is refused with 409 `AMOUNT_BELOW_RENT_MINIMUM`, before anything is written or sent, when a recipient whose address has no account gets less than the rent-exempt minimum (`details.recipientIndexes`) or the source wallet would be left holding more than nothing but less than the minimum (`details.sourceRemainder`). A token batch is refused with 409 `SPONSORED_RENT_OVER_CAP` when one recipient's new token account costs more rent than the sponsor funds in a transaction (`details.recipientIndex`). A recipient's counterparty account archived while the batch is being prepared returns 404, and one whose address changed returns 409 `TRANSFER_BATCH_DESTINATION_CHANGED` (`details.counterpartyAccountIds`); either way nothing is written or sent, so the same request can be sent again. A chunk the source wallet cannot fund fails its recipients and transfer with the reason in `error` (the wallet does not have enough funds); the batch still returns 200. An `externalId` already used by a batch on the same project and source wallet never pays again: the same request from the same credential returns that batch, and any other returns `409 TRANSFER_BATCH_RUN_EXISTS` with its `batchId` in `error.details`. To finish a batch after a partial failure, call `POST /v1/payments/transfer-batches/{batchId}/retry`: it sends only the batch's `failed` recipients. Never resend the whole batch under a new Idempotency-Key, which pays the recipients that succeeded again.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"projectId\": \"prj_example\",\n  \"sourceCustodyWalletId\": \"cwlt_example\",\n  \"token\": \"SOL\",\n  \"recipients\": [\n    {\n      \"externalId\": \"payroll_row_001\",\n      \"counterpartyId\": \"cpty_example\",\n      \"counterpartyAccountId\": \"cpacct_example\",\n      \"amount\": \"25.00\"\n    }\n  ],\n  \"externalId\": \"payroll_2026_06_30\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Retry a transfer batch's failed recipients",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.retryPaymentTransferBatch}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/transfer-batches/{{batchId}}/retry",
            "description": "Sends the batch's `failed` recipients again, from the same source wallet, and no other recipient. A failed recipient was not paid: its transaction never reached the network or the network rejected it. Recipients still `pending` or `processing` may land and are never sent again. Each resent recipient keeps its row and links to its new chunk transfer.\n\nTakes no body and requires an `Idempotency-Key`. A retry with the same key sends nothing again: while its response is stored, it returns that saved response, and after a server error or once the response has expired, the batch as it stands. Read the batch's current state with `GET /v1/payments/transfer-batches/{batchId}`, and use a new key for each retry you mean to send.\n\nAny credential that may send from the batch's wallet can retry it. Each recipient is paid the address the batch recorded for it. Only recipients that are still `failed` are ever sent, so a retry under a new key never pays anyone twice.\n\nReturns `409`, sending nothing: `TRANSFER_BATCH_NOTHING_TO_RETRY` when the batch has no failed recipients (while it is `processing`, its unsent recipients become `failed` only once its request can no longer send them), `TRANSFER_BATCH_RETRY_CLAIMED` when a concurrent retry claimed them first, and `TRANSFER_BATCH_DESTINATION_CHANGED` (`details.recipientIds`) when a failed recipient's counterparty account has changed its address since (send that recipient in a new batch). A native SOL retry is refused with `409` `AMOUNT_BELOW_RENT_MINIMUM`, as create is, when a failed recipient would still be paid less than the rent-exempt minimum at an address with no account; its recipients stay `failed`."
          }
        },
        {
          "name": "Get transfer batch",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/transfer-batches/{{batchId}}",
            "description": "Retrieves a transfer batch with recipient rows and chunk transfer summaries."
          }
        },
        {
          "name": "List recurring payments",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/recurring-payments",
            "description": "Lists SDP-custody outbound recurring payments for the authenticated organization or project scope."
          }
        },
        {
          "name": "Create recurring payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.createPaymentRecurringPayment}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/recurring-payments",
            "description": "Creates an SDP-custody outbound recurring payment intent from a custody wallet to a counterparty crypto-wallet account. This stores backend state only; activation and collection are added by follow-up endpoints.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sourceCustodyWalletId\": \"cwlt_example\",\n  \"counterpartyId\": \"cpty_example\",\n  \"counterpartyAccountId\": \"cpacct_example\",\n  \"token\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n  \"amount\": \"25.00\",\n  \"periodHours\": 720,\n  \"firstCollectionAt\": \"2099-01-01T00:00:00.000Z\",\n  \"metadataUri\": \"https://example.com/subscriptions/monthly-usdc.json\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get recurring payment",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}",
            "description": "Retrieves an SDP-custody outbound recurring payment record."
          }
        },
        {
          "name": "Update recurring payment",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.updatePaymentRecurringPayment}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}",
            "description": "Updates an SDP-custody recurring payment. Pending records are updated directly. Active metadata and due-date edits are applied in place, while active term, source, destination, or token edits create a replacement Solana subscription, authorize it, cancel the old subscription, and then swap the recurring payment to the replacement records.\n\nSend `expectedUpdatedAt` from the version you reviewed to make the edit apply to that version only: when the recurring payment has changed since, the edit returns `409` `RECURRING_PAYMENT_CHANGED` and changes nothing.\n\nRequires an `Idempotency-Key`, because an edit can sign and broadcast a replacement subscription. A same-key retry of a completed edit replays its answer. A retry of an interrupted edit gets `409` `IDEMPOTENCY_KEY_IN_FLIGHT` with `Retry-After` until the attempt is stale, then resumes from the last step SDP recorded. If a step was sent but not yet recorded when the edit was interrupted, which is rare, the retry can fail or send that step again, so read the recurring payment with `GET` before editing it again.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sourceCustodyWalletId\": \"cwlt_example\",\n  \"counterpartyId\": \"cpty_example\",\n  \"counterpartyAccountId\": \"cpacct_example\",\n  \"token\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n  \"amount\": \"25.00\",\n  \"periodHours\": 720,\n  \"firstCollectionAt\": \"2099-01-01T00:00:00.000Z\",\n  \"nextCollectionDueAt\": \"2099-02-01T00:00:00.000Z\",\n  \"metadataUri\": \"https://example.com/subscriptions/monthly-usdc.json\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Activate recurring payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.activatePaymentRecurringPayment}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}/activate",
            "description": "Activates a pending SDP-custody recurring payment by creating the Solana subscriptions plan, authorizing the subscription, and storing the resulting on-chain identifiers and signatures.\n\nA fresh activation signs the terms it read: when an edit lands while it runs, or `expectedUpdatedAt` names an earlier version, it returns `409` `RECURRING_PAYMENT_CHANGED` before claiming the schedule or signing.\n\nBoth the counterparty and its account must be active before a fresh activation; an unavailable recipient returns `404` before claiming the schedule or signing. Recovery can confirm saved transactions, but cannot sign a new step for an unavailable recipient.\n\nThe source wallet gives the Subscriptions program's authority for that token an approval of 0, and each collection approves exactly its own amount in the same transaction as the pull, so the token program's `Approve` instruction appears in activation and collection transactions. If your custody provider's wallet policy allowlists programs or instructions, allow `Approve` to that authority, or the provider refuses the collection and SDP pauses the recurring payment with `pausedReason` `custody_policy_refused`.",
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Cancel recurring payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.cancelPaymentRecurringPayment}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}/cancel",
            "description": "Permanently stops an active or paused SDP-custody recurring payment by submitting the Solana subscriptions immediate cancellation, which ends its on-chain subscription at once rather than at the end of the billing period. A canceled recurring payment never collects or resumes again.\n\nEvery recurring payment from one wallet in one token relies on one token approval. When no other live recurring payment uses it, it is revoked right after the cancel; otherwise it stays for the schedules that still use it. The response's `tokenApproval` says which: `revoked`, `kept` with the recurring payments still using it in `sharedWith`, or `revoking` while a collection that was already processing settles, after which the background sweep revokes it. `GET` returns the same `tokenApproval` for a canceled recurring payment."
          }
        },
        {
          "name": "List payment requests",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/requests",
            "description": "Lists the caller's project's payment requests, newest first. Requires `payment_requests.read`. An open request past its `expiresAt` reads as `expired`. Records never carry `publicToken`."
          }
        },
        {
          "name": "Create payment request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/requests",
            "description": "Creates a payment request: an amount of one token for a payer to send to a custody wallet in the caller's project, through the request's hosted payment link. Requires `payment_requests.manage`. `walletId` is the provider wallet ID (`walletId` from `GET /v1/wallets`), not the SDP Wallet ID transfers take; an unknown wallet, or one outside the project, returns 404. `amount` is a decimal string with at most the mint's decimals, so `0.05` and `0.050` are the same request; more decimals return 400. A native SOL request is refused with 409 `AMOUNT_BELOW_RENT_MINIMUM` when the wallet has no account and the amount is below the rent-exempt minimum. The response is the only one besides `GET /v1/payments/requests/{paymentRequestId}/link` that carries `publicToken`. Accepts an Idempotency-Key: a retry with the same key and request returns the original payment request instead of creating a second one.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"walletId\": \"privy_wallet_123\",\n  \"token\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n  \"amount\": \"10.00\",\n  \"expiresAt\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get payment request",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/requests/{{paymentRequestId}}",
            "description": "Retrieves one payment request in the caller's project; another project's request returns 404. Requires `payment_requests.read`. An open request past its `expiresAt` reads as `expired`. The record never carries `publicToken`; use `GET /v1/payments/requests/{paymentRequestId}/link`."
          }
        },
        {
          "name": "Get payment request link",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/requests/{{paymentRequestId}}/link",
            "description": "Returns the token behind a payment request's hosted payment link, `/pay/{publicToken}`. Anyone holding it can build the request's fee-sponsored payment transaction, so this route requires `payment_requests.manage`, not `payment_requests.read`. Another project's request returns 404. The token is returned whatever the request's status."
          }
        },
        {
          "name": "Cancel payment request",
          "request": {
            "method": "POST",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/requests/{{paymentRequestId}}/cancel",
            "description": "Cancels an open payment request, so its payment link stops building and sponsoring transactions. Requires `payment_requests.manage`. Canceling a request that is already canceled returns it unchanged. A paid or expired request returns 409, and so does one whose fee-sponsored transaction can still land: retry once that transaction's blockhash expires. A payer who signed before the cancel can still land the payment; SDP records it as paid, with `paidLate` set when it landed after the cancel."
          }
        },
        {
          "name": "Collect recurring payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.collectPaymentRecurringPayment}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}/collect",
            "description": "Manually starts a due active SDP-custody recurring payment collection, creating a linked payment transfer and collection attempt.\n\nWhen admitting a new collection, SDP requires an active counterparty and account in the schedule's project. Archival that commits before admission prevents a new collection from signing. If either recipient record is archived or unavailable, the schedule pauses with `pausedReason` `destination_unavailable` and the request returns `409` without signing. That `409`, and every later collect or resume while the recipient stays unavailable, tells the caller to cancel the schedule and create a new one. A collection admitted earlier may still finish or recover.\n\nIf submission cannot be confirmed immediately, a `200` response returns the same transfer as `processing` with its known signature; reconciliation settles it, and the next due time advances only after exact on-chain confirmation.\n\nWhen the source wallet cannot cover the amount, the request returns `400` `TRANSACTION_FAILED`, and the failed collection attempt and its transfer record the same reason in `error`, so the collection history shows why."
          }
        },
        {
          "name": "Resume recurring payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{idempotencyKey.resumePaymentRecurringPayment}}",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}/resume",
            "description": "Resumes a paused SDP-custody recurring payment. SDP pauses a recurring payment when a due period fails 5 times, at once when the custody provider's policy refuses to sign a collection, or before a new collection when its counterparty or account is archived or unavailable.\n\nResume requires both recipient records to be active; while either is archived or unavailable it returns 409, telling the caller to cancel the schedule and create a new one. Its on-chain subscription is still in place, so nothing is signed: the recurring payment returns to active, the failure count starts again, and a due period that has already ended moves to the next one. A canceled recurring payment cannot be resumed."
          }
        },
        {
          "name": "List recurring payment collection attempts",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/payments/recurring-payments/{{id}}/collection-attempts",
            "description": "Lists every collection attempt a recurring payment has made over its whole history, newest first: its current subscription and every subscription an edit replaced. A recurring payment that has not been activated has none."
          }
        },
        {
          "name": "List transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/transactions",
            "description": "Lists the project's transactions across SDP modules with stable cursor pagination.\n\nRequires `transactions.read`. Every row also needs the `read` action of the module it comes from (which its `manage` or `execute` includes): a Payments row needs `transfers.read` for a transfer or deposit, `transfer_batches.read` for a batch item, `recurring.read` for a recurring collection, `payment_requests.read` for a payment request's fulfilment; every other module's rows need that module's `read`. Rows the caller cannot read are left out. Requesting a module, or a Payments `kind`, without its action returns `403` `INSUFFICIENT_PERMISSIONS` naming it.\n\n`search` matches transaction id, module id, or signature as a prefix, not a substring. The endpoint is metered (60/min per credential, 240/min per organization); exceeding the quota returns `429`, and `503` indicates the quota backend was unavailable."
          }
        }
      ]
    },
    {
      "name": "Counterparties",
      "item": [
        {
          "name": "Get counterparty field options",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties/metadata",
            "description": "Returns the enum option sets and country list needed to build a counterparty form."
          }
        },
        {
          "name": "List counterparties",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties",
            "description": "Lists counterparties for the authenticated organization."
          }
        },
        {
          "name": "Create counterparty",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/counterparties",
            "description": "Creates a counterparty. If externalId is provided, it must be unique within the organization.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"customer_42\",\n  \"entityType\": \"individual\",\n  \"displayName\": \"Jane Doe\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get counterparty",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}",
            "description": "Gets counterparty details by id."
          }
        },
        {
          "name": "Update counterparty",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}",
            "description": "Updates counterparty attributes. At least one field must be provided. Use null on externalId to clear it.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"customer_42\",\n  \"entityType\": \"business\",\n  \"displayName\": \"Jane Q. Doe\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Archive counterparty",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}",
            "description": "Archives a counterparty and its active accounts and provider links atomically. Archived counterparties are hidden from default lists. New transfers and batches cannot use those accounts. Recurring payments pause before their next new collection; work already in flight keeps its recovery path."
          }
        },
        {
          "name": "List counterparty accounts",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}/accounts",
            "description": "Lists payment accounts for a counterparty. Crypto-wallet accounts can be used by payment flows that send funds to a counterparty wallet."
          }
        },
        {
          "name": "Create counterparty account",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}/accounts",
            "description": "Creates a payment account for a counterparty. For accountKind \"crypto_wallet\", details.network must be \"solana\" and details.address must be a Solana wallet address. A counterparty holds one active account per network and address: an address already on one of its active accounts answers 409 `CONFLICT` (\"This address is already on this counterparty\"). An archived account does not count, so re-adding its address creates a new account.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"accountKind\": \"crypto_wallet\",\n  \"label\": \"USDC wallet\",\n  \"details\": {\n    \"network\": \"solana\",\n    \"address\": \"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU\"\n  },\n  \"providerAccountData\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get counterparty account",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}/accounts/{{counterpartyAccountId}}",
            "description": "Gets a counterparty payment account by id."
          }
        },
        {
          "name": "Update counterparty account",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}/accounts/{{counterpartyAccountId}}",
            "description": "Updates a counterparty payment account. At least one field must be provided. Changing details to an address already on another of the counterparty's active accounts answers 409 `CONFLICT`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Primary USDC wallet\",\n  \"details\": {\n    \"network\": \"solana\",\n    \"address\": \"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU\"\n  },\n  \"providerAccountData\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Archive counterparty account",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": "{{baseUrl}}/v1/counterparties/{{counterpartyId}}/accounts/{{counterpartyAccountId}}",
            "description": "Archives a counterparty payment account. Archived accounts are hidden from default lists."
          }
        }
      ]
    }
  ]
}
