Add credit
CreditIn¶
Description: Adds a credit entry to the user's account. Only positive values are accepted. This operation does not affect the actual balance, but is used for credit tracking.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| login | int | Yes | User login ID to assign credit |
| amount | double | Yes | Credit amount to add (must be >= 0) |
| comment | string | Yes | Description or reason for the credit |
| order | int | No | Optional order ID to track this credit operation |
Request Example¶
{
"login": 123456,
"amount": 300.00,
"comment": "Credit for promotion"
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| data | string | Returns "OK" if successful |
Response Example¶
{
"data": "OK"
}
⚠️ If a negative amount is provided, the operation will be rejected:
{ "error": "INVALID_DATA", "message": "Amount must be greater than or equal to 0" }