πŸ”’ Create voucher V3

This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.

This endpoint requires the following scopes: voucher:create.

Create a voucher with a code of your own choosing - the code a shop generated when it sold the voucher, for instance. The voucher starts out with its full value available for redemption.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The payload for a new voucher. The code is supplied by the caller - a shop that sells a voucher generates it on its own side and passes it here. remainingAmount is not part of the payload: a new voucher always starts with its full value, and later changes to the balance are redemptions.

string
required
length ≀ 32

The code the voucher is redeemed with. It must not be in use by another voucher; a code that already exists is rejected.

faceValue
object
required

The value the voucher is issued with. The balance available for redemption starts out at this value. A voucher is worth at most 1000000.00 and carries at most two decimal places; a value outside that is rejected rather than accepted and changed.

string
enum
required

The tax treatment the voucher is redeemed with.

Allowed:
date | null

The first day the voucher can be redeemed. Omit it, or pass null, for a validity that has no start.

date | null

The last day the voucher can be redeemed. Omit it, or pass null, for a voucher that does not expire.

boolean
Defaults to false

When true, only the customer the voucher is bound to may redeem it, so customer has to be supplied as well. Defaults to false, which lets whoever holds the code redeem it.

printSettings
object
customer
object

The customer to bind the voucher to. Every redemption rebinds the voucher to the customer of the document it was redeemed on, so this is a starting point rather than a record of the buyer.

product
object
required

The voucher product the voucher is sold as. It carries the revenue account and the tax settings the voucher is booked with, and redeeming the voucher takes its designation from that product, so a voucher is always issued against one.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Unauthorized

403

Forbidden

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json