customers

Grant customer credits by external ID

Immediately grant credits to a customer looked up by external ID using an active credit currency key.

post/customers/external/{externalId}/credits/grants

Request

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

Path parameters

externalIdstring required

Customer ID from the integrator's system, stored on Paid as externalId.

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.