Allocations
The Data Object implementation also allows for allocating funds to alternative channels. These allocations can be flat amounts or percentages of the transaction total. You can also nominate which channel incurs our charges.
Allocation Object Fields
Key | Type | Description |
---|---|---|
channels | integer | The ID of the allocation channel |
currencies | string | The currency of the allocation channel |
total | integer | The total in cents or as a percentage to be allocated |
operator | string | Either "flat" or "percent" |
Additional Request Fields
Key | Type | Description |
---|---|---|
charge_channel | integer | The ID of the channel to deduct TMT's charges from. If not included, this will default to the main transaction channel |
Examples
£10.00 of a total of $220.00 is being allocated to a channel with the ID: 23.
TMT's charges for the transaction will be deducted from this channel and not the master channel
{
booking_id: '0',
channels: 2,
currencies: 'USD',
total: '22000',
...
allocations: [{
channels: 23,
currencies: 'GBP',
operator: 'flat',
total: 1000
}],
charge_channel: 23
}
5% of a total of $220.00 is being allocated to a channel with the ID: 23.
TMT's charges for the transaction will be deducted from this channel and not the master channel
{
booking_id: '0',
channels: 2,
currencies: 'USD',
total: '22000',
...
allocations: [{
channels: 23,
currencies: 'GBP',
operator: 'percent',
total: 5
}],
charge_channel: 23
}
£10.00 of a total of $220.00 is being allocated to a channel with the ID: 23.
TMT's charges for the transaction will be deducted from the master channel with id = 2. There is no need to indicate this via the request as TMT payments are deducted from the master channel by default.
{
booking_id: '0',
channels: 2,
currencies: 'USD',
total: '22000',
...
allocations: [{
channels: 23,
currencies: 'GBP',
operator: 'flat',
total: 1000
}]
}
Notes
- Allocations are only permitted via the Data Object implementation
- Allocation data can be protected from tampering via the verify option
- If you are using the verify option, ensure you order allocation objects the same in the verification as the instantiation
- The channel that incurs TMT's charges must be left with sufficient funds to cover the cost of the charges.
- The total of all allocations + TMT's charges must not be greater than the transaction total.
- If you are setting the transactionType option to "authorize", you cannot include allocations.