billing

Redeem a coupon for an organization

Redeems a coupon code for the organization identified by the path, crediting the org and returning the credit and resulting balance. The org is taken from the route; the body carries only the coupon code. Idempotent per org: a second redemption of the same coupon returns 409 coupon_already_claimed.

post/api/v0/billing/coupon/redeem/{org}

Request

  • Base URL: https://api.harmont.dev
  • URL: https://api.harmont.dev/api/v0/billing/coupon/redeem/{org}
  • Auth: HTTP bearer

Path parameters

orgstring required

The organization slug.

Request body

codestring required

The coupon code to redeem.

Response

The credit granted and resulting balance

balance_centsinteger required

The organization's balance after the credit, in cents.

credit_centsinteger required

The credit granted by the coupon, in cents.

Changes

No recorded changes to this operation across all 1 revision of this API.