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
NameDescriptionTypeAdditional 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

Sample:
{
  "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

Sample:
<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
NameDescriptionTypeAdditional 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

Sample:
{
  "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

1

CardNotFound

The given customer card was not found

2

ClientNotFound

The given Client was not found in the system

3

CashierCardInvalid

The given cashier card was not found or is not an cashier card

4

ChoosenCardIsCreditCard

The choosen card is a credit card and not a prepaid card. Only prepaid cards can be charged.

5

CardLocked

The given card is locked.

6

PaymentMethodNotSupported

The given payment method is not supported

Error Formats

application/json, text/json

Sample:
{
  "Data": null,
  "ApplicationErrorCode": 6,
  "ApplicationMessage": "PaymentMethodNotSupported"
}