customers

Grant customer credits

Immediately grant credits to a customer using an active credit currency key.

post/customers/{id}/credits/grants

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/customers/{id}/credits/grants
  • Auth: HTTP bearer

Path parameters

idstring required

Paid customer display id

Request body

creditCurrencyKeystring required

Stable machine-readable key for the active credit currency to grant.

amountnumber double required

Number of credits to grant, exact to at most 6 decimal places. This is not a monetary amount.

startsAtstring date-time

When these credits become spendable, as an RFC3339 datetime with timezone. Must be at or before the current server time. Defaults to the current server time when omitted.

expiresAtstring date-time nullable

When these credits expire, as an RFC3339 datetime with timezone. Omit or set null for credits that do not expire.

Response

201

createdboolean required

True when this request created a new grant.

createdAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.