Step 3: Apply the Loyalty Card for Payment

If the customer wants to spend the card balance for this buy, the system needs to prepare this. The endpoint for this is POST /api/v2/Smart/Transactions/{id}/preTransaction:

POST /api/v2/Smart/Transactions/STX_KJXJDUN542NR3WMRHRVU5WWM6ZQEA2/preTransaction HTTP/1.1
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Accept: application/json

If everything is fine, the API responds with 200 OK and some details:

Example Response
HTTP/1.1 200 OK
Content-Type: application/json
"missing_sum": 296,
"bonus_products": []

This means, €2.96 are remaining after redeeming as much card credit as applicable.

Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent).

If bonus balance would be redeemed, there would be special bonus products. This is explained detail in the reference section about spending bonus.

The loyalty card is not used so far, since the transaction is not started yet.