Give a subscriber credit
Puts credit on the subscriber's account with you. It comes off their next invoice, reducing what their card is charged; no money moves out, and no receipt already issued changes. The credit belongs to the CUSTOMER, so if the same buyer has two subscriptions with you in the same currency it goes to whichever invoice falls due first. The amount is positive integer minor units and may cover the whole of the next invoice — at most its amount due. A credit that covers it in full charges the card nothing, and that month is still recorded as a sale of zero with an invoice and a receipt saying the credit covered it. More than the amount due is refused, and the error names the largest amount you can give. The currency is the subscription's; there is no currency field. Only an owner or admin may do this, from a signed-in session: an API key cannot, because the credit must name the person who gave it.
Request
- Base URL: https://api.agentaos.ai/api/v1
- URL: https://api.agentaos.ai/api/v1/gateway/subscriptions/{id}/credits
- Auth: SessionAuth (a scheme the document does not define)
Path parameters
Subscription UUID (the id field from the list response, not stripeSubscriptionId).
Headers
Required, not optional. Mint one string per credit you mean to give, and send the same one again if the call times out and you retry. Nothing on our side survives a retry to recognise it by, so a retry without a key credits the subscriber a second time. Two different keys for the same amount give two credits, which is how you deliberately credit someone twice.
Request body
Response
The credit was given.
Changes
No recorded changes to this operation across all 1 revision of this API.