Redeem
POST https://api.e-guma.ch/v1/vouchers/{code}/redeem.json?apikey={api-key}Parameters
| Parameter | Description |
|---|---|
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. Please use url_encode for the code as it might contain special characters. |
api-key required |
POST Data
| Parameter | Description |
|---|---|
amount_in_cents required | The voucher can be redeemed in part or whole. |
reference_number optional | An optional alphanumeric reference number can be transmitted. Maximum 1024 characters. |
Return
| code | The same voucher code as you provided as parameter |
| balance_in_cents | The new balance |
| redeem_token | It identifies a redemption and is used to cancel a redemption. |
Example
POST https://api.e-guma.ch/v1/vouchers/JWCPP7QV25S4/redeem.json?apikey=510e32c594d84816a4af9df1{
"amount_in_cents":5000,
"reference_number":"abc-123456"
}{
"code":"JWCPP7QV25S4",
"balance_in_cents":40000,
"redeem_token": "b83d60f5-dbe6-4ada-92f2-0ed2b3ccdc66"
}Updated 7 months ago
