Skip to main content
POST
/
charges
/
{id}
/
refund
Refund a specific voucher charge
curl --request POST \
  --url https://vouchers.api.jtl-software.com/v1/charges/{id}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "10.53",
  "currency": "EUR"
}
'
{
  "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"
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with Client Credentials Flow (see: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials).

You can request only a subset of specific scopes for your client, however the available scopes for each client are defined through the client groups in the UI.

Within your token request, you can also send the optional parameter client_type (string with a max length of 32 chars). This value is only used for internal statistics.

Path Parameters

id
string
required

Body

application/json

Voucher refund request body

amount
string
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
Required string length: 4 - 9
Pattern: ^\d+\.\d{2}$
Example:

"10.53"

currency
string
required

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

Required string length: 3
Example:

"EUR"

Response

OK

id
string
read-only

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

Example:

"cff8784e5eb28b9b04860"

voucher_id
string
read-only

Voucher primary identification key (see voucher -> id)

Example:

"cff8784e34b28b9b04860"

client_id
string
read-only

Client primary identification key (see client -> id)

Example:

"cff8784e5eb28b81ca02a"

type
enum<string>

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

Available options:
charge,
recharge,
refund
Example:

"refund"

amount
string

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
Required string length: 4 - 9
Pattern: ^\d+\.\d{2}$
Example:

"10.53"

order_number
string

Order or invoice number of the transaction

Example:

"ORDER-62642"

created_at
string<RFC3339>
read-only

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

Example:

"2017-07-21T17:32:28+00:00"

updated_at
string<RFC3339>
read-only

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

Example:

"2017-07-21T17:32:28+00:00"