Cancel Redemption

This request can be called several times, until the redemption is fully cancelled.

POST https://api.e-guma.ch/v1/vouchers/{code}/cancel_redemption.json?apikey={api-key}

Parameters

code
required

The alphanumeric code of the voucher. The code has 12 characters. You can pass the code with (e.g. ABCD-ABCD-ABCD) or without (e.g. ABCDABCDABCD) dashes.

api-key
required

POST Data

redeem_token
required

The token returned from the redeem-request.

amount_in_cents
required

The amount to be canceled. It has to be equal or smaller than the amount of the redemption.

Return

code

The same voucher code as you provided as parameter

balance_in_cents

The new balance

Example

POST https://api.e-guma.ch/v1/vouchers/JWCPP7QV25S4/cancel_redemption.json?apikey=510e32c594d84816a4af9df1
{
  "redeem_token": "b83d60f5-dbe6-4ada-92f2-0ed2b3ccdc66"
  "amount_in_cents":5000
}
{
  "code":"JWCPP7QV25S4",
  "balance_in_cents":40000
}