Integration Guide
For online Stores
Configuration
You authenticate to the e-guma API by providing an API key in the request. Store that key in your system.
Redeem a voucher
We recommend providing an input field for vouchers on the checkout page.
Use the Balance Endpoint to verify the entered voucher. The Balance Endpoint returns the voucher code. It’s very important to use the returned voucher code for further actions. The reason for that is the voucher2mobile - ShortCode, which is only temporarily available.
If the field is_redeemable is set to false, show an appropriate message. Don't use the returned message field.
If the voucher is fine, you can determine the amount which has to be redeemed. The user doesn't have to enter the amount. The amount can be calculated like that: min(remaining_amount_to_pay, voucher_balance). In order to redeem the voucher, call the Redeem Endpoint with the calculated amount. An optional reference number can also be transmitted, which we will save and display on our side. Save the voucher code and the redeem_token in your database.
Cancelling the redeemed voucher
If the order has to be canceled, then you also need to cancel the redemption. Use the Cancel Request with the redeemed code and amount for that case.
VAT
If you redeem a voucher don't reduce the VAT. Vouchers are not discount- / promo-codes.
Updated 10 months ago