Levain LabsLevain Labs
ApiBilling

Redeem Coupon

Redeem a credit coupon, adding its value to the workspace balance.

Redeem a credit coupon, adding its value to the workspace balance.

Each coupon can be redeemed once. Returns the credit applied and the resulting balance.

POST
/api/v1/billing/redeem-coupon

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Header Parameters

X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.levainlabs.com/api/v1/billing/redeem-coupon" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{
  "amount_usd_micros": 0,
  "balance_usd_micros": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}