Skip to content
Developer

VoucherExternal

Billing6 EndpointsBilling / VoucherExternal

Returns the configuration.

GET/api/invoice/external/voucher/config

Responses

200Returns voucher configuration for public purchase

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/invoice/external/voucher/config \
  --header 'x-iw-jwt-token: <TOKEN>'

Purchases an item.

POST/api/invoice/external/voucher/purchase

Responses

200Creates a voucher and returns payment redirect URL

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/invoice/external/voucher/purchase \
  --header 'x-iw-jwt-token: <TOKEN>'

Returns the current balance.

GET/api/invoice/external/voucher/balance/{code}

Path parameters

coderequiredstring

Responses

200Balance of a voucher by its code (setting voucher_balance_check_enabled)

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/invoice/external/voucher/balance/42 \
  --header 'x-iw-jwt-token: <TOKEN>'

Redeems credit.

POST/api/invoice/external/voucher/redeem_credit

Responses

200Loads the balance of a voucher code onto the credit of the logged-in customer (setting voucher_customer_credit_enabled)

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/invoice/external/voucher/redeem_credit \
  --header 'x-iw-jwt-token: <TOKEN>'

Returns the PDF document.

GET/api/invoice/external/voucher/pdf/{id}/{token}

Path parameters

idrequiredstring
tokenrequiredstring

Responses

200Returns the Voucher as PDF

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/invoice/external/voucher/pdf/42/42 \
  --header 'x-iw-jwt-token: <TOKEN>'

Returns a single voucher external entry.

GET/api/invoice/external/voucher/{token}

Path parameters

tokenrequiredstring

Responses

200Returns voucher status

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/invoice/external/voucher/42 \
  --header 'x-iw-jwt-token: <TOKEN>'