v1

latestOpenAPI 3.0.22026-07-223907721.1 MB
Charges

Refund a specific voucher charge

This call is used to (partial) refund a specific charge that was previously done on a voucher (for example if a customer returns goods to the store).

post/charges/{id}/refund

Path parameters

idstring required

Request body

amountstring required

Amount in the currency of this voucher. Must be send as string in the following pattern:

  • Greater or equal than 0.01
  • Less than the Charge Amount
  • Up to five digits before the decimal point
  • The decimal point (.)
  • Exactly two digits after the decimal point
currencystring required

The three-character ISO-4217 currency code - https://en.wikipedia.org/wiki/ISO_4217#Active_codes (must match the currency of the voucher)

Example request

{
  "amount": "10.53",
  "currency": "EUR"
}

Response

OK

idstring

Primary identification key - will be used in voucher-charge calls

voucher_idstring

Voucher primary identification key (see voucher -> id)

client_idstring

Client primary identification key (see client -> id)

type'charge' | 'recharge' | 'refund'

Type of this charge. Can either be "charge", "recharge" or "refund"

amountstring

Amount in the currency of this voucher. Must be send as string in the following pattern:

  • Up to five digits before the decimal point
  • The decimal point (.)
  • Exactly two digits after the decimal point
order_numberstring

Order or invoice number of the transaction

created_atstring RFC3339

created_at - datetime in RFC3339 format, see https://tools.ietf.org/html/rfc3339

updated_atstring RFC3339

updated_at - datetime in RFC3339 format, see https://tools.ietf.org/html/rfc3339

Example response

{
  "id": "cff8784e5eb28b9b04860",
  "voucher_id": "cff8784e34b28b9b04860",
  "client_id": "cff8784e5eb28b81ca02a",
  "type": "refund",
  "amount": "10.53",
  "order_number": "ORDER-62642",
  "created_at": "2017-07-21T17:32:28+00:00",
  "updated_at": "2017-07-21T17:32:28+00:00"
}