# `Stripe.Services.PromotionCodeService`
[🔗](https://github.com/jeffhuen/tiger_stripe/blob/main/lib/stripe/services/promotion_code_service.ex#L2)

PromotionCode

A Promotion Code represents a customer-redeemable code for an underlying promotion.
You can create multiple codes for a single promotion.

If you enable promotion codes in your [customer portal configuration](https://docs.stripe.com/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal.
Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.

# `create`

```elixir
@spec create(Stripe.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

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.

# `list`

```elixir
@spec list(Stripe.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

List all promotion codes

Returns a list of your promotion codes.

# `retrieve`

```elixir
@spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Retrieve a promotion code

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing `code` use [list](https://docs.stripe.com/docs/api/promotion_codes/list) with the desired `code`.

# `update`

```elixir
@spec update(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Update a promotion code

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
