POST tokens/{id}/addBalance?balanceToAdd={balanceToAdd} · POS API
POST tokens/{id}/addBalance?balanceToAdd={balanceToAdd}
/tokens/{id}/addBalance?balanceToAdd={balanceToAdd}This allows you to increase the credit on the token by any amount.
*Please form a checksum (see Security-Token) for the ** '{id}_{balanceToAdd}' *(e.g. 'card123_1.99') and enter it in the 'SecurityToken' header.
Parameter
idstringErforderlichEnter the token read from a carrier medium here.
'cardId123'balanceToAdddecimalErforderlich'1.99'Request-Header
DevKey{Your Key}TrackingUnitId{trackingUnitId}SecurityToken{checksum over '{id}_{balanceToWithdraw}'} (in this example via 'card123_1.99')Kontext: tokens
Tokens are arbitrary, but always different, non-repeatable strings, which can be used for identification purposes as well as for of a consumer ('consumer') as well as for the identification of a credit balance ('balance'). As a rule these tokens are stored on any carrier medium and sent to a consumer in the form of a 'customer card' or 'gift card handed over. The consumer will have to present this carrier medium at the POS with his next purchases in order to access the to be able to access credit or to be credited with menio-Rewards.
Originaler Blueprint-Ausschnitt
### POST tokens/{id}/addBalance?balanceToAdd={balanceToAdd} [POST]
This allows you to increase the credit on the token by any amount.
*Please form a checksum (see [Security-Token](#introduction/basic/security-token)) for the ** **'{id}_{balanceToAdd}'** *(e.g. 'card123_1.99') and enter it in the 'SecurityToken' header.
+ Parameters
+ id (string, `'cardId123'`) ... Enter the token read from a carrier medium here.
+ balanceToAdd (decimal, `'1.99'`) . Enter the amount that should be topped up on the credit of this token. Negative amounts are not allowed
+ Request
+ Headers
DevKey: {Your Key}
TrackingUnitId: {trackingUnitId}
SecurityToken: {checksum over '{id}_{balanceToWithdraw}'} (in this example via 'card123_1.99')
+ response 200
{
"oldBalance":1.5
"newBalance":3.49
}
+ response 500
// HTTP-InternalServerError: An unknown problem occurred during processing
{
"ErrorMessage": "some explanation"
"StackTrace": "text"
}
+ response 403
// HTTP-Forbidden: trackingUnitId is not yet activated by the merchant
+ Response 401
// HTTP-Unauthorized: DevKey, trackingUnitId or SecurityToken not specified/wrong
+ response 400
{
"ErrorId":123,
"ErrorText": "Details of the error"
}
// here all possible error codes incl. texts for this resource
// 13001: token unknown
// 13004: token is locked, no further action possible
// 13005: Only positive values are allowed for charging or lifting
// 13006: Limit for lift-off/recharge exceeded
// 13009: adding balance not possible - current charge amount would exceed monthly charge limit
// 13010: adding balance not possible
// 13020: adding balance not possible - not registered user