Skip to content

Create Voucher Type

POST {api-url}/createVoucherType?ns={community}

Create a new voucher type to classify and restrict pockets of funds.

FieldTypeRequirementDescription
VoucherTypeStringRequiredA unique identifier string for the voucher type.
GroupStringOptionalThe retailer group to automatically link the voucher type to.
DisplayNameStringOptionalA user-facing display name.
LockedStringOptionalIf 1, vouchers created under this type are locked.
AutoLockStringOptionalIf 1, vouchers automatically lock after a transaction.
VSettleStringOptionalIf 1, vouchers regenerate their voucher number after spending.
VAccumulateStringOptionalIf 1, funds accumulate into a single voucher pocket.
WithdrawFeeStringOptionalA fixed withdrawal fee in cents.
TransactionOverridesStringOptionalTilde-separated list of TTs allowed to bypass standard restrictions. ~2~ = /settleVoucher settles to cash balance (otherwise regenerates), ~4~ = spend anywhere, ~6~ = allow cash withdrawal, ~26~ = allow transferring to another voucher type.
IsCardStringOptionalA frontend filtering flag. Set to true for 1-to-1 card types (e.g., individual gift cards) to hide them from general UI dropdowns and prevent clutter (true or false).
VMetadataStringOptionalUsed for basket restrictions. Use Contains[A||B] to require a match, or Contains![A||B] to reject specific items passed in a /pay payload’s Metadata.
MetadataStringOptionalAny other detail to store with this transaction.
{
"VoucherType": "168Cash",
"Group": "",
"DisplayName": "Celbux Cash",
"Locked": "0",
"AutoLock": "0",
"VSettle": "1",
"VAccumulate": "1",
"VMetadata": "",
"ThirdParty": "",
"PIN": "",
"WithdrawFee": "1000",
"TransactionOverrides": "~4~6~26~",
"IsCard": "false",
"Metadata": ""
}
Terminal window
curl -X POST '{api-url}/createVoucherType?ns={community}' \
-H 'Authorization: bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"VoucherType":"168Cash","Group":"","DisplayName":"Celbux Cash","Locked":"0","AutoLock":"0","VSettle":"1","VAccumulate":"1","VMetadata":"","ThirdParty":"","PIN":"","WithdrawFee":"1000","TransactionOverrides":"~4~6~26~","IsCard":"false","Metadata":""}'