Stripe · Schema

PostPromotionCodesRequest

CommerceFinancial ServicesFintechPaymentsT1StripeAgentic CommercePoint-of-SalePayment Processing

Properties

Name Type Description
active boolean Whether the promotion code is currently active.
code string The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.
coupon string The coupon for this promotion code.
customer string The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
expand array Specifies which fields in the response should be expanded.
expires_at integer The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
max_redemptions integer A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redempti
metadata object Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individu
restrictions object Settings that restrict the redemption of the promotion code.
View JSON Schema on GitHub

JSON Schema

stripe-post-promotion-codes-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-post-promotion-codes-request-schema.json",
  "title": "PostPromotionCodesRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stripe-promotion-codes-api-openapi.yml#/components/schemas/PostPromotionCodesRequest",
  "type": "object",
  "required": [
    "coupon"
  ],
  "properties": {
    "active": {
      "description": "Whether the promotion code is currently active.",
      "type": "boolean"
    },
    "code": {
      "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.",
      "maxLength": 500,
      "type": "string"
    },
    "coupon": {
      "description": "The coupon for this promotion code.",
      "maxLength": 5000,
      "type": "string"
    },
    "customer": {
      "description": "The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.",
      "maxLength": 5000,
      "type": "string"
    },
    "expand": {
      "description": "Specifies which fields in the response should be expanded.",
      "items": {
        "maxLength": 5000,
        "type": "string"
      },
      "type": "array"
    },
    "expires_at": {
      "description": "The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.",
      "format": "unix-time",
      "type": "integer"
    },
    "max_redemptions": {
      "description": "A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.",
      "type": "integer"
    },
    "metadata": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.",
      "type": "object"
    },
    "restrictions": {
      "description": "Settings that restrict the redemption of the promotion code.",
      "properties": {
        "currency_options": {
          "additionalProperties": {
            "properties": {
              "minimum_amount": {
                "type": "integer"
              }
            },
            "title": "currency_option",
            "type": "object"
          },
          "type": "object"
        },
        "first_time_transaction": {
          "type": "boolean"
        },
        "minimum_amount": {
          "type": "integer"
        },
        "minimum_amount_currency": {
          "type": "string"
        }
      },
      "title": "restrictions_params",
      "type": "object"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/stripe-post-promotion-codes-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.