Cancel Charge
POST https://api.e-guma.ch/v1/vouchers/{code}/cancel_charge.json?apikey={api-key}
Parameters
coderequired | 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-keyrequired |
POST Data
amount_in_centsrequired | The amount to deduct from the voucher. Can't be higher than the open amount on the voucher. |
payment_idoptional | If you set a payment_id for Charge Voucher, provide the same payment_id to cancel the charging. |
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_charge.json?apikey=510e32c594d84816a4af9df1
{
"amount_in_cents":5000
}
{
"code":"JWCPP7QV25S4",
"balance_in_cents":40000
}
Updated over 2 years ago