Skip to content

Merge Vouchers

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

Use this endpoint to perform a Collapse operation. Collapsing will automatically find all active vouchers on a user’s account matching the provided VoucherType and aggregate their funds into a single, unified voucher pocket.

FieldTypeRequirementDescription
UsernameStringRequiredThe username of the account.
VoucherTypeStringRequiredThe identifier of the voucher type to target.
CommunityStringOptionalExplicitly filter the merge operation to a specific community space.
CurrencyStringOptionalThe currency context for the merge. Defaults to community currency.
CollapseOtherCommunitiesStringOptionalSet to true to siphon and merge funds universally across all communities the user belongs to (restricted to communities the acting bearer token has authorization for).
MetadataStringOptionalAny other detail to store with this transaction.
{
"Username": "27820000000",
"VoucherType": "168Cash",
"Community": "",
"Currency": "ZAR",
"CollapseOtherCommunities": "true",
"Metadata": ""
}
Terminal window
curl -X POST '{api-url}/mergeVouchers?ns={community}' \
-H 'Authorization: bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"Username":"27820000000","VoucherType":"168Cash","Community":"","Currency":"ZAR","CollapseOtherCommunities":"true","Metadata":""}'