
Deduct balancePOST
OpenStock Docs
POST
/
api/customer-balance-api/customers/deduct-balancecustomer_balance_api100 requests / hourDebits a customer’s store balance. Fails if the customer does not exist or has insufficient balance.
Authorization#
AuthorizationBearer <token>In: header. A store API key starting with sk_ that has the customer_balance_api permission.
Request body#
application/json
emailrequiredstringCustomer email address.
amountrequirednumberPositive amount to deduct.
reasonstringShown in the customer’s transaction history. Default: "API balance deduction"
metadataobjectStored with the transaction.
Responses#
- 200Balance updated.
- 400Insufficient balance or invalid input.
- 404Unknown customer.
- 401Missing, malformed, disabled or expired API key.