Panelr

Adjust Credits

POST ?action=referral_adjust

Grant or take back credits by hand. Writes an adjustment into the ledger — history is never edited, and another adjustment reverses anything. Taking back more than the customer holds is refused (422) — a balance never goes below zero.

Request Parameters

FieldTypeRequiredDescription
customer_emailstringRequiredone of these twoThe customer's email
customer_idintegerRequiredone of these twoThe customer id
deltaintegerRequiredCredits to add — negative takes back
notestringOptionalWhy — shows in the ledger
idempotency_keystringOptionalYour own reference for this adjustment. Sending the same key again returns the original result instead of adjusting twice

Response Fields

FieldTypeDescription
customer_idintegerThe customer
deltaintegerWhat was asked for
appliedbooleantrue when this call changed the balance; false when it matched an earlier idempotency_key and nothing more was applied
balanceintegerTheir new balance