POSTpartial

Initiate payment for one fee, provider-neutrally

Controlled by PEOPLES_COURT_API_CANONICAL_ROUTES. The fee is selected by the resource path; the existing checkout operation keeps its authority, sponsorship-coverage, rate-limit and fee-intent identity checks, so an equivalent retry returns the same provider intent instead of creating a second one. A card fee returns a Stripe Checkout session; an x402 fee returns the exact payment requirements committed when the fee was quoted, still confirmed by its own signed machine route.

/api/fees/{feeId}/checkoutstartFeeCheckoutPreview

Authentication and authority

Use one listed account-session, scoped OAuth, or partner credential alternative. Account tokens retain the approving account’s authority. Cookie-authenticated writes require same-origin authorization. Alternatives are OR; schemes in one alternative are AND.

CanonicalSession

CanonicalPartnerBearer

AccountOAuth

Account tokens authorize only their approving account and case scope. S256 PKCE is mandatory on the code flow. Explicit reacceptance is required after Rules/disclosure changes.

Parameters

NameLocationRequirementSchema
feeIdpathRequired{"type":"string"}

Request body

Optional request body.

application/json

{
  "$ref": "#/components/schemas/CanonicalFeeCheckoutInput",
  "type": "object",
  "additionalProperties": false,
  "description": "The fee is selected by the resource path; caseId and feeRecordId in the body are refused.",
  "properties": {
    "promotionCode": {
      "type": "string"
    },
    "priceSelection": {
      "type": "string",
      "const": "full"
    }
  }
}

Responses

200

Typed checkout descriptor for the selected provider.

application/json

{
  "type": "object",
  "required": [
    "data",
    "requestId"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/CanonicalFeeCheckout",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "feeId",
        "caseId",
        "provider",
        "checkout"
      ],
      "properties": {
        "schemaVersion": {
          "type": "string",
          "const": "fee-checkout-v1"
        },
        "feeId": {
          "type": "string"
        },
        "caseId": {
          "type": "string"
        },
        "provider": {
          "type": "string",
          "enum": [
            "stripe",
            "x402",
            "court_filing_credit"
          ]
        },
        "checkout": {
          "type": "object",
          "additionalProperties": true,
          "required": [
            "kind"
          ],
          "description": "Provider descriptor: a Stripe Checkout session, an applied court filing credit, or the committed x402 payment requirements.",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "stripe_checkout",
                "credit_applied",
                "x402_payment_required"
              ]
            }
          }
        }
      }
    },
    "requestId": {
      "type": "string"
    }
  }
}
404

Preview disabled, or no fee this caller may pay.

default

RFC 9457 style problem response.

application/problem+json

{
  "$ref": "#/components/schemas/Problem",
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail",
    "requestId"
  ],
  "properties": {
    "type": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    }
  }
}

Example response

Successful response

{
  "data": {
    "schemaVersion": "fee-checkout-v1",
    "feeId": "feeId_test",
    "caseId": "pcase_test_123",
    "provider": "stripe",
    "checkout": {
      "kind": "stripe_checkout"
    }
  },
  "requestId": "requestId_test"
}

Errors

Read the response status and stable error code. See errors and rate limits for recovery. Refresh the resource before resolving a state or digest conflict.

Idempotency and retries

  • For throttling, honor Retry-After when present. Back off on retryable server failures.
  • The request is accepted only when its credential, authority, case state, and resource preconditions are satisfied.