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 used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.

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>

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
string
required

How the grant was created

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