CreditGrants
Customers
Wallets
Invoices
Entitlements
Environments
Events
Features
Payments
Integrations
Subscriptions
Tenants
Users
CreditGrants
Create a new credit grant
Create a new credit grant with the specified configuration
POST
/
creditgrants
curl --request POST \
--url https://api.cloud.flexprice.io/v1/creditgrants \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"amount": 123,
"cadence": "ONETIME",
"currency": "<string>",
"expire_in_days": 123,
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"subscription_id": "<string>"
}'
{
"amount": 123,
"cadence": "ONETIME",
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"environment_id": "<string>",
"expire_in_days": 123,
"id": "<string>",
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
application/json
Credit Grant configuration
The body is of type object
.
Response
201
application/json
Created
The response is of type object
.
curl --request POST \
--url https://api.cloud.flexprice.io/v1/creditgrants \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"amount": 123,
"cadence": "ONETIME",
"currency": "<string>",
"expire_in_days": 123,
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"subscription_id": "<string>"
}'
{
"amount": 123,
"cadence": "ONETIME",
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"environment_id": "<string>",
"expire_in_days": 123,
"id": "<string>",
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.