Credits

Add or remove credits

POST/credits/accounts/{id}/adjust/

manage Delete and money: deletes, credits, servers or panel settings. Scopes

Add credits to a reseller's balance, or remove them with a negative amount; reason is shown in their history. Panel operators who may add or remove credits only.

Path parameters

  • idstring (uuid)required

Headers

  • Idempotency-Keystring

    A fresh value (up to 100 characters) per action you may retry. Sent again with the same request, it answers what the first one did without doing it twice; with another request, 409. Kept 24 hours.

Body

  • amountstring (decimal)required
  • reasonstringrequired
  • typestring

    Why, for the history.

    • payment - They paid
    • refund - You refunded them
    • correction - A correction
    • promo - A promotion
    • other - Anything else

    Default: "other"

  • referencestring

Response

201 OK

  • entryobjectrequired

    The history row written.

    • idintegerrequiredread-only
    • created_atstring (date-time)requiredread-only
    • accountobjectrequiredread-onlycan be null
      • idstring (uuid)required
      • usernamestringrequired
    • account_namestringrequiredread-only
    • amountstring (decimal)requiredread-only
    • balance_afterstring (decimal)requiredread-only
    • kindstringrequiredread-only
    • kind_labelstringrequiredread-only
    • typestringrequiredread-only
    • type_labelstringrequiredread-only
    • descriptionstringrequiredread-only
    • actor_namestringrequiredread-only
    • by_mebooleanrequiredread-onlycan be null
    • counterparty_namestringrequiredread-only
    • lineobjectrequiredread-onlycan be null
      • idstring (uuid)required
      • usernamestringrequired
    • line_namestringrequiredread-only
    • package_namestringrequiredread-only
    • durationstringrequiredread-only
    • expires_atstring (date-time)requiredread-onlycan be null
    • reasonstringrequiredread-only
    • referencestringrequiredread-only
  • balancestring (decimal)required

    Their balance now.

Errors

  • 400 Something sent is not valid. Each field that is wrong is named with what is wrong.
  • 401 No credential, or one that is wrong, expired or revoked.
  • 403 The account, or the key's or app's scopes, may not do this.
  • 404 Nothing with this id, or nothing the account can see.
  • 429 Slow down: wait the seconds in the Retry-After header, then try again.

What each error means