POST api/ChargeCardCredit
Charges the given credits to a customer card. Bonis are automaticly applied and returned in detail.
Request Information
URI Parameters
None.
Body Parameters
ChargeCardCreditRequestModel| Name | Description | Type | Additional information |
|---|---|---|---|
| ChargeAmount |
The amount of money (excluding bonus) which should be charged |
decimal number |
None. |
| CashierCardNumber |
The number of the cashier card |
string |
None. |
| PaymentMethod |
The payment method as string or int. The value can be obtained via the Payment Method call. |
PaymentMethod |
None. |
| CardNumber |
The card number of the customer card If not available you can use the License Plate instead. |
string |
None. |
| CardUID |
The UID of the customercard, if RFID card This is optional. The prefered identification should be done via the Card Number |
integer |
None. |
| LicensePlate |
The license plate of the customer This is optional. The prefered identification should be done via the Card Number |
string |
None. |
| ClientNumber |
The current Client Number (Unique POS ID number) |
byte |
None. |
Request Formats
application/json, text/json
{
"ChargeAmount": 1.0,
"CashierCardNumber": "sample string 2",
"PaymentMethod": 0,
"CardNumber": "sample string 3",
"CardUID": 1,
"LicensePlate": "sample string 4",
"ClientNumber": 64
}
application/xml, text/xml
<ChargeCardCreditRequestModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CardNumber>sample string 3</CardNumber> <CardUID>1</CardUID> <LicensePlate>sample string 4</LicensePlate> <ClientNumber>64</ClientNumber> <ChargeAmount>1</ChargeAmount> <CashierCardNumber>sample string 2</CashierCardNumber> <PaymentMethod>CashPayment</PaymentMethod> </ChargeCardCreditRequestModel>
Response Information
Resource Description
ChargeCardCreditResponseModel| Name | Description | Type | Additional information |
|---|---|---|---|
| NewCredit |
The new credits stored at the card |
decimal number |
None. |
| ChargementInformation |
Information about the applied boni |
CardChargementBonusInformation |
None. |
Response Formats
application/json, text/json
{
"NewCredit": 1.0,
"ChargementInformation": null
}
Error Handling
HTTP Status Codes
An expected error is indicated through the HTTP Status Code 400. In this case you can read the details about the error in the body of the response. Make sure you always check for the HTTP Status Code 200, since many things can go wrong. Unexpected errors are sended with HTTP Status Code 500 for example.
Application Error Codes
| Code | Name | Description |
|---|---|---|
|
|
CardNotFound |
The given customer card was not found |
|
|
ClientNotFound |
The given Client was not found in the system |
|
|
CashierCardInvalid |
The given cashier card was not found or is not an cashier card |
|
|
ChoosenCardIsCreditCard |
The choosen card is a credit card and not a prepaid card. Only prepaid cards can be charged. |
|
|
CardLocked |
The given card is locked. |
|
|
PaymentMethodNotSupported |
The given payment method is not supported |
Error Formats
application/json, text/json
{
"Data": null,
"ApplicationErrorCode": 6,
"ApplicationMessage": "PaymentMethodNotSupported"
}