Home / Servers / Stripe API / post_promotion_codes

Create a promotion code

An MCP tool from the Stripe API server, hosted on mcp.hjlabs.in.

Create a promotion code A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. [POST /v1/promotion_codes]

Name on the gateway: stripe_api__post_promotion_codes · may change things.

Parameters

NameTypeDescription
activebooleanWhether the promotion code is currently active.
codestringThe customer-facing code. Regardless of case, this code must be unique across…
customerstringThe customer who can use this promotion code. If not set, all customers can…
customer_accountstringThe account representing the customer who can use this promotion code. If not…
expandarraySpecifies which fields in the response should be expanded.
expires_atintegerThe timestamp at which this promotion code will expire. If the coupon has…
max_redemptionsintegerA positive integer specifying the number of times the promotion code can be…
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful…
promotion requiredobjectThe promotion referenced by this promotion code.
restrictionsobjectSettings that restrict the redemption of the promotion code.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "stripe_api__post_promotion_codes",
  "arguments": {
    "promotion": "…"
  }
}

Or connect the Stripe API server directly, which lists 606 tools including this one:

Run in your terminal
claude mcp add --transport http hj-stripe-api https://mcp.hjlabs.in/mcp/stripe-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create a promotion code tool with active set to ….

More from Stripe API