PaymentscenarioAvailability
A PaymentscenarioAvailability configures in what saleschannels a payment scenario is available.
It can also further refine the availability based on a script written in JavaScript.
More information about writing order scripts can be found here.
Fields
Field | Description |
---|---|
saleschannels int[] (required) | The payment scenario will be available for these saleschannels. It this is empty the payment scenario will not be available. Example value:[ 14 ] |
script string (required) | A Javascript that needs to return a boolean. It has the current order and saleschannel available. More info Example value:"return order.tickets.length>3;" |
usescript bool (required) | Indicates if the script will be used. Example value:true |
Example
1{
2 "saleschannels": [ 14 ],
3 "script": "return order.tickets.length>3;",
4 "usescript": true
5}