---
title: "Create credit grant"
method: POST
path: "/creditgrants"
tags: ["Credit Grants"]
---

# Create credit grant

`POST /creditgrants`

Use when giving a customer or plan credits (e.g. prepaid balance or promotional credits). Scope can be plan or subscription; supports start/end dates.

## Request body

- CreateCreditGrantRequest
  - `addon_id` string
  - `cadence` 'ONETIME' | 'RECURRING', required
  - `conversion_rate` string — amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits
  - `credits` string, required
  - `end_date` string, date-time
  - `expiration_duration` integer
  - `expiration_duration_unit` 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
  - `expiration_type` 'NEVER' | 'DURATION' | 'BILLING_CYCLE'
  - `metadata` TypesMetadata
  - `name` string, required
  - `period` 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'ANNUAL' | 'QUARTERLY' | 'HALF_YEARLY'
  - `period_count` integer
  - `plan_id` string
  - `priority` integer
  - `scope` 'PLAN' | 'SUBSCRIPTION' | 'ADDON', required
  - `start_date` string, date-time
  - `subscription_id` string
  - `topup_conversion_rate` string — topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits

## Response `201`

Created

- CreditGrantResponse
  - `addon_id` string
  - `cadence` 'ONETIME' | 'RECURRING'
  - `conversion_rate` string — amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits
  - `created_at` string, date-time
  - `created_by` string
  - `credit_grant_anchor` string, date-time
  - `credits` string
  - `end_date` string, date-time
  - `environment_id` string
  - `expiration_duration` integer
  - `expiration_duration_unit` 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
  - `expiration_type` 'NEVER' | 'DURATION' | 'BILLING_CYCLE'
  - `id` string
  - `metadata` TypesMetadata
  - `name` string
  - `period` 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'ANNUAL' | 'QUARTERLY' | 'HALF_YEARLY'
  - `period_count` integer
  - `plan_id` string
  - `priority` integer
  - `scope` 'PLAN' | 'SUBSCRIPTION' | 'ADDON'
  - `start_date` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `subscription_id` string
  - `tenant_id` string
  - `topup_conversion_rate` string — topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

- `400` — Invalid request
- `500` — Server error

## Changes

> 108 revisions in range; 5 could not be searched.

- **2026-07-15** `f8ecf435d25d` — 3 warning, 3 info
  - added the new `ADDON` enum value to the `scope` response property for the response status `201`
  - added the new `not_implemented` enum value to the `code` response property for the response status `400`
  - added the new `not_implemented` enum value to the `code` response property for the response status `500`
  - added the new optional request property `addon_id`
  - …2 more
- **2026-07-09** `646d6658479b` — 2 breaking
  - the `end_date` request property type/format changed from `string`/`` to `string`/`date-time`
  - the `start_date` request property type/format changed from `string`/`` to `string`/`date-time`
- **2026-07-09** `7d57386313c7` — 3 breaking, 3 warning
  - the `metadata` request property type/format changed from ``/`` to `object`/``
  - the `metadata` response's property type/format changed from ``/`` to `object`/`` for status `201`
  - the `status` response's property type/format changed from ``/`` to `string`/`` for status `201`
  - added the new `archived` enum value to the `status` response property for the response status `201`
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/creditgrants/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/9cd0dab91f5c/schema)
