Skip to main content
POST
Grant credits to a subscription

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Headers

Alguna-Version
enum<string>
required
Available options:
2026-04-01
Idempotency-Key
string

A unique string that makes a retried write safe. If you send the same request with the same key within 24 hours, the API returns the stored response and does not run the request again. A 5xx or 429 response is not stored, so a retry with that key runs the request again.

Maximum string length: 255
Example:

"ik_a1b2c3d4e5f6"

Path Parameters

id
string
required

Unique identifier for the subscription

Body

application/json
amount
string
required

Credit amount to grant

Example:

"100.00"

reason
string
required

Reason for the credit grant

Example:

"API promotional credit"

credit_type
enum<string>
default:monetary

Type of credit

Available options:
monetary,
units
Example:

"monetary"

expires_at
string<date-time> | null

When the credit grant expires

Example:

"2027-01-01T00:00:00Z"

Response

Success

amount
string
required

Grant amount

Example:

"100.00"

created_at
string<date-time>
required

When the grant was created

customer_id
string
required

Customer ID

grant_type
enum<string>
required

How the grant was created

Available options:
allocation,
manual,
rebalance,
api
Example:

"api"

id
string
required

Credit grant ID

Example:

"cg_abc123"

expires_at
string<date-time> | null

Expiration date

reason
string | null

Reason for the grant

subscription_id
string | null

Subscription ID