Voucher widget
Sell value vouchers on your website, with a free amount, personal message, delivery by email or post, and payment through your payment provider.
With the voucher widget, visitors buy a value voucher: they choose an amount, write a dedication, choose delivery by email or post, and pay. After payment, the widget shows the voucher as a PDF.
Status: The voucher widget is new. If you want to use it, talk to support beforehand, so that vouchers and payment are set up properly in your installation.
<div data-iw-voucher
data-iw-host="club.iw-erp.de"
data-iw-terms-url="https://www.our-club.org/gutschein-agb"></div>
<script src="https://club.iw-erp.de/frontend_assets/backend/iw_erp_web_ui/voucher.js" async></script>
Shortcode: [iw-voucher host="club.iw-erp.de"]
Amounts, limits, shipping costs and whether postal delivery is possible come from vynst.
Options
| Attribute | Default | Meaning |
|---|---|---|
data-iw-terms-url |
empty | link to the voucher terms and conditions |
data-iw-terms-text |
standard text | text of the terms checkbox |
data-iw-require-terms-consent |
on | terms checkbox is required |
data-iw-redirect-payment |
on | open the payment page automatically |
data-iw-success-redirect-url |
empty | after the purchase, go to this page |
data-iw-locale |
de |
language of the status display |
Set up in vynst
- Switch on Vouchers - Feature enabled (
voucher_feature_enabled). - Set up a payment provider.
- Enter your website under CORS - Permitted origins.
Events
iw:voucher:ready, :validated, :submitted, :payment-opened, :payment-returned and :error.
API
GET /api/invoice/external/voucher/config, POST /api/invoice/external/voucher/purchase, and GET /api/invoice/external/voucher/{token} for the status.