v1

latestOpenAPI 3.0.22026-07-223907721.1 MB
Vouchers

Recharge a voucher

Use this call to recharge a voucher. This can be used for example for customer cards. Please note that this call is not used for cancelations of previously charges.

post/vouchers/recharge

Request body

codestring

The vouchers code you want to recharge (not necessary if id is set)

idstring

The vouchers id you want to recharge (not necessary if code is set)

amountstring required

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
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)

order_numberstring required

Order or invoice number of the transaction for this recharge

Example request

{
  "code": "test",
  "id": "4ZH83T0ACUUC14CW",
  "amount": "10.53",
  "currency": "EUR",
  "order_number": "ORDER-62642"
}

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": "recharge",
  "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"
}