POST /v1/credits/grants
BillingService_GrantCredits
The server validates credentials, tenant, environment and permissions. This page does not send requests. Replace example values; deployed server validation remains authoritative.
Parameters
No path or query parameters.
Request body
amountstringcustomer_account_idstringeligible_api_key_idstringeligible_meter_codestringeligible_offer_idstringeligible_product_idstringMarketing scopes are accepted only when source_type=PROMOTION. Each configured scope must match the server-derived spend context to be used.
expires_atstringidempotency_keystringpriorityinteger · int32reasonstringsource_idstringsource_typestring
cURL
curl --request POST 'https://nexus-api.rainlib.com/v1/credits/grants' \
--header 'Authorization: Bearer <NEXUS_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"amount": "<value>",
"customer_account_id": "<value>",
"eligible_api_key_id": "<value>",
"eligible_meter_code": "<value>",
"eligible_offer_id": "<value>",
"eligible_product_id": "<value>",
"expires_at": "<value>",
"idempotency_key": "<value>",
"priority": 0,
"reason": "<value>",
"source_id": "<value>",
"source_type": "<value>"
}'Response contract
200 · OK
asset_codestringavailablestringreservedstringversionstringwallet_idstring
Generated responses do not enumerate every runtime error. See the integration guide for authentication, conflicts and retries.