Contents |
Purpose
This command is used to add credit to a client
Attributes
- clientid - the ID of the client the credit is to be added to
- description - reason for credit being added (stored in admin credit log)
- amount - the amount to be added
Example Command
External API
$postfields["action"] = "addcredit"; $postfields["clientid"] = "1"; $postfields["description"] = "Adding funds via custom module"; $postfields["amount"] = "40.00";
Internal API
$command = "addcredit"; $adminuser = "admin"; $values["clientid"] = "1"; $values["description"] = "Adding funds via custom module"; $values["amount"] = "40.00"; $results = localAPI($command,$values,$adminuser);
Successful Response
result = success newbalance = xx.xx - the total credit balance the client now has
Error Response
result=error&message=Client ID Not Found #Given Client ID is not found in the database.
API Functions
Client Management
Add Client - Update Client - Delete Client - Close Client - Get Clients
Get Clients Details - Get Clients Products - Get Clients Password - Add Contact - Update Contact
API:Delete Contact - Update Client Product - Upgrade Product - Validate Login - Send Email
Support Tickets
Get Support Departments - Get Support Statuses - Get Tickets - Get Ticket - Get Ticket Predefined Cats
Get Ticket Predefined Replies - Open Ticket - Reply Ticket - Add Ticket Note - Delete Ticket - Update Ticket
Quotes
Create Quote - Update Quote - Delete Quote - Send Quote - Accept Quote
Module Commands
Module Create - Module Suspend - Module Unsuspend - Module Terminate
Domain Commands
Renew Domain - Get Domain Lock - Get Nameservers - Get WHOIS - Request EPP
Update Lock - Update Nameservers - Update WHOIS - Domain WHOIS Lookup
Order Handling
Get Orders - Get Order Statuses - Add Order - Accept Order - Pending Order - Cancel Order - Fraud Order - Delete Order
Payments/Billing
Get Invoice - Get Payment Methods - Create Invoice - Update Invoice - Add Billable Item - Add Invoice Payment
Add Transaction - Add Credit - Capture Payment
Miscellaneous
Get Activity Log - Get Admin Details - Update Admin Notes - Get Currencies - Get Email Templates
Get To-Do Items - Get To-Do Item Statuses - Get Staff Online - Get Stats - Encrypt Password - Decrypt Password