{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/outpost-ai/json-schema/outpost-ai-payment-intent-request-schema.json",
  "title": "PaymentIntentRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/outpost-ai-stripe-mor.yaml#/components/schemas/PaymentIntentRequest",
  "type": "object",
  "required": [
    "amount",
    "currency",
    "merchant_customer"
  ],
  "properties": {
    "amount": {
      "type": "integer",
      "description": "Smallest currency unit (e.g. cents for USD, centavos for BRL).",
      "minimum": 1
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3
    },
    "merchant_customer": {
      "$ref": "#/$defs/MerchantCustomer"
    },
    "description": {
      "type": "string",
      "description": "Free-form description shown on the underlying PaymentIntent.",
      "maxLength": 255
    },
    "tax_calculation_id": {
      "type": "string",
      "description": "Reference to a tax calculation returned by\n`POST /api/tax/calculate`. Binds the calculated tax breakdown to\nthis payment.\n"
    }
  },
  "$defs": {
    "MerchantCustomer": {
      "type": "object",
      "description": "Pointer to the Customer record on **your own Stripe account**.\nOutpost stores this on its empty MoR-side Customer as metadata so the\nrenewal flow can map `invoice.created.customer` → saved PaymentMethod.\n",
      "required": [
        "stripe_id"
      ],
      "properties": {
        "stripe_id": {
          "type": "string",
          "description": "Customer ID on your Stripe account."
        },
        "email": {
          "type": "string",
          "description": "Customer email. Used for receipt routing and fraud signals."
        },
        "name": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "address": {
          "type": "object",
          "description": "Billing address (line1, city, postal_code, etc.).",
          "additionalProperties": true
        }
      }
    }
  }
}