Skip to content

Update Voucher Type

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

Update the configuration parameters of an existing voucher type. Providing null for any field will retain its current value and safely merge the update, while providing an empty string "" will explicitly clear the value.

FieldTypeRequirementDescription
VoucherTypeStringRequiredThe unique identifier string for the voucher type.
CommunityStringOptionalUsed to map the voucher type to an overarching community namespace.
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",
"Community": null,
"DisplayName": null,
"VSettle": null,
"VAccumulate": null,
"AutoLock": null,
"Locked": null,
"PIN": null,
"ThirdParty": null,
"VMetadata": null,
"WithdrawFee": null,
"TransactionOverrides": "~4~6~26~",
"IsCard": null,
"Metadata": ""
}
Terminal window
curl -X POST '{api-url}/updateVoucherType?ns={community}' \
-H 'Authorization: bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"VoucherType":"168Cash","Community":null,"DisplayName":null,"VSettle":null,"VAccumulate":null,"AutoLock":null,"Locked":null,"PIN":null,"ThirdParty":null,"VMetadata":null,"WithdrawFee":null,"TransactionOverrides":"~4~6~26~","IsCard":null,"Metadata":""}'