Create a new payment scenario

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/paymentscenarios

Example

Request

 1use Ticketmatic\Endpoints\Settings\Ticketsales\Paymentscenarios;
 2
 3$result = Paymentscenarios::create($client, array(
 4    "typeid" => 2701,
 5    "name" => "VISA",
 6    "availability" => array(
 7        "saleschannels" => array(
 8            14,
 9        ),
10        "usescript" => false,
11    ),
12    "bankaccountbeneficiary" => "Ticketmatic BVBA",
13    "bankaccountbic" => "KREDBEBB",
14    "bankaccountnumber" => "BE12 3456 7890 1234",
15    "expiryparameters" => array(
16        "daysaftercreation" => 28,
17    ),
18    "internalremark" => "For websales only, box office uses different scenario with different fees.",
19    "ordermailtemplateid_expiry" => 345,
20    "ordermailtemplateid_overdue" => 234,
21    "ordermailtemplateid_paymentinstruction" => 123,
22    "overdueparameters" => array(
23        "daysaftercreation" => 14,
24    ),
25    "paymentmethods" => array(
26        23,
27        45,
28        12,
29    ),
30    "shortdescription" => "Will charge your VISA credit card. Note: fees apply.",
31    "visibility" => "FULL",
32));

Response

 1object(\Ticketmatic\Model\PaymentScenario) (19) {
 2  ["id"]=>
 3  int(0)
 4  ["typeid"]=>
 5  int(0)
 6  ["name"]=>
 7  string(4) "VISA"
 8  ["availability"]=>
 9  object(\Ticketmatic\Model\PaymentscenarioAvailability) (2) {
10    ["saleschannels"]=>
11    array(1) {
12      [0]=>
13      int(0)
14    }
15    ["usescript"]=>
16    bool(false)
17  }
18  ["bankaccountbeneficiary"]=>
19  string(16) "Ticketmatic BVBA"
20  ["bankaccountbic"]=>
21  string(8) "KREDBEBB"
22  ["bankaccountnumber"]=>
23  string(19) "BE12 3456 7890 1234"
24  ["expiryparameters"]=>
25  object(\Ticketmatic\Model\PaymentscenarioExpiryParameters) (2) {
26    ["daysaftercreation"]=>
27    int(0)
28  }
29  ["internalremark"]=>
30  string(74) "For websales only, box office uses different scenario with different fees."
31  ["ordermailtemplateid_expiry"]=>
32  int(0)
33  ["ordermailtemplateid_overdue"]=>
34  int(0)
35  ["ordermailtemplateid_paymentinstruction"]=>
36  int(0)
37  ["overdueparameters"]=>
38  object(\Ticketmatic\Model\PaymentscenarioOverdueParameters) (1) {
39    ["daysaftercreation"]=>
40    int(0)
41  }
42  ["paymentmethods"]=>
43  array(3) {
44    [0]=>
45    int(0)
46    [1]=>
47    int(0)
48    [2]=>
49    int(0)
50  }
51  ["shortdescription"]=>
52  string(52) "Will charge your VISA credit card. Note: fees apply."
53  ["visibility"]=>
54  string(4) "FULL"
55  ["isarchived"]=>
56  bool(false)
57  ["createdts"]=>
58  object(\DateTime) (3) {
59    ["date"]=>
60    string(26) "2014-09-26 15:24:36.000000"
61    ["timezone_type"]=>
62    int(3)
63    ["timezone"]=>
64    string(3) "UTC"
65  }
66  ["lastupdatets"]=>
67  object(\DateTime) (3) {
68    ["date"]=>
69    string(26) "2014-09-26 15:24:36.000000"
70    ["timezone_type"]=>
71    int(3)
72    ["timezone"]=>
73    string(3) "UTC"
74  }
75}
76

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/paymentscenarios"
 4)
 5
 6result, err := paymentscenarios.Create(client, &ticketmatic.PaymentScenario{
 7    Typeid: 2701,
 8    Name: "VISA",
 9    Availability: &ticketmatic.PaymentscenarioAvailability{
10        Saleschannels: []int64{
11            14,
12        },
13        Usescript: false,
14    },
15    Bankaccountbeneficiary: "Ticketmatic BVBA",
16    Bankaccountbic: "KREDBEBB",
17    Bankaccountnumber: "BE12 3456 7890 1234",
18    Expiryparameters: &ticketmatic.PaymentscenarioExpiryParameters{
19        Daysaftercreation: 28,
20    },
21    Internalremark: "For websales only, box office uses different scenario with different fees.",
22    OrdermailtemplateidExpiry: 345,
23    OrdermailtemplateidOverdue: 234,
24    OrdermailtemplateidPaymentinstruction: 123,
25    Overdueparameters: &ticketmatic.PaymentscenarioOverdueParameters{
26        Daysaftercreation: 14,
27    },
28    Paymentmethods: []int64{
29        23,
30        45,
31        12,
32    },
33    Shortdescription: "Will charge your VISA credit card. Note: fees apply.",
34    Visibility: "FULL",
35})

Response

 1result := &ticketmatic.PaymentScenario{
 2    Id: 123,
 3    Typeid: 2701,
 4    Name: "VISA",
 5    Availability: &ticketmatic.PaymentscenarioAvailability{
 6        Saleschannels: []int64{
 7            14,
 8        },
 9        Usescript: false,
10    },
11    Bankaccountbeneficiary: "Ticketmatic BVBA",
12    Bankaccountbic: "KREDBEBB",
13    Bankaccountnumber: "BE12 3456 7890 1234",
14    Expiryparameters: &ticketmatic.PaymentscenarioExpiryParameters{
15        Daysaftercreation: 28,
16    },
17    Internalremark: "For websales only, box office uses different scenario with different fees.",
18    OrdermailtemplateidExpiry: 345,
19    OrdermailtemplateidOverdue: 234,
20    OrdermailtemplateidPaymentinstruction: 123,
21    Overdueparameters: &ticketmatic.PaymentscenarioOverdueParameters{
22        Daysaftercreation: 14,
23    },
24    Paymentmethods: []int64{
25        23,
26        45,
27        12,
28    },
29    Shortdescription: "Will charge your VISA credit card. Note: fees apply.",
30    Visibility: "FULL",
31    Isarchived: false,
32    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
33    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
34}

Request

 1POST /api/1/{accountname}/settings/ticketsales/paymentscenarios HTTP/1.1
 2Content-Type: application/json
 3
 4{
 5    "typeid": 2701,
 6    "name": "VISA",
 7    "availability": {
 8        "saleschannels": [ 14 ],
 9        "usescript": false
10    },
11    "bankaccountbeneficiary": "Ticketmatic BVBA",
12    "bankaccountbic": "KREDBEBB",
13    "bankaccountnumber": "BE12 3456 7890 1234",
14    "expiryparameters": {
15        "daysaftercreation": 28
16    },
17    "internalremark": "For websales only, box office uses different scenario with different fees.",
18    "ordermailtemplateid_expiry": 345,
19    "ordermailtemplateid_overdue": 234,
20    "ordermailtemplateid_paymentinstruction": 123,
21    "overdueparameters": {
22        "daysaftercreation": 14
23    },
24    "paymentmethods": [ 23, 45, 12 ],
25    "shortdescription": "Will charge your VISA credit card. Note: fees apply.",
26    "visibility": "FULL"
27}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "typeid": 2701,
 7    "name": "VISA",
 8    "availability": {
 9        "saleschannels": [ 14 ],
10        "usescript": false
11    },
12    "bankaccountbeneficiary": "Ticketmatic BVBA",
13    "bankaccountbic": "KREDBEBB",
14    "bankaccountnumber": "BE12 3456 7890 1234",
15    "expiryparameters": {
16        "daysaftercreation": 28
17    },
18    "internalremark": "For websales only, box office uses different scenario with different fees.",
19    "ordermailtemplateid_expiry": 345,
20    "ordermailtemplateid_overdue": 234,
21    "ordermailtemplateid_paymentinstruction": 123,
22    "overdueparameters": {
23        "daysaftercreation": 14
24    },
25    "paymentmethods": [ 23, 45, 12 ],
26    "shortdescription": "Will charge your VISA credit card. Note: fees apply.",
27    "visibility": "FULL",
28    "isarchived": false,
29    "createdts": "2014-09-26 15:24:36",
30    "lastupdatets": "2014-09-26 15:24:36"
31}

Request body fields

FieldDescription
typeid
int 
(required)

Type for the payment scenario. Can be ‘Immediate payment’ (2701), ‘Mollie bank transfer’ (2702), ‘Regular bank transfer’ (2703), ‘Deferred online payment’ (2704), ‘Deferred other’ (2705).

Example value:2701
name
mlstring 
(required)

Name of the payment scenario

Example value:"VISA"
availability

Rules that define in what conditions this payment scenario is available

Example value:{ "saleschannels": [ 14 ], "usescript": false }
bankaccountbeneficiary
string

Beneficiary for the bank account number. Only used for type 2703 (Regular bank transfer)

Example value:"Ticketmatic BVBA"
bankaccountbic
string

BIC code for the bank account number. Only used for type 2703 (Regular bank transfer)

Example value:"KREDBEBB"
bankaccountnumber
string

Bank account number to be used. Only used for type 2703 (Regular bank transfer)

Example value:"BE12 3456 7890 1234"
expiryparameters

Rules that define when an order becomes expired. Not used for type 2701.

Example value:{ "daysaftercreation": 28 }
internalremark
string

An internal remark, which is never shown to customers. Can be used to distinguish identically named payment scenarios.

For example: You could have two VISA scenarios, one for the web sales and one for the box office, each will have different fee configurations. Both will be named VISA, this field can be used to distinguish them.

Example value:"For websales only, box office uses different scenario with different fees."
ordermailtemplateid_expiry
int 
(required)

Link to the order mail template that will be sent when the order is expired. Can be 0 to indicate that no mail should be sent. Not used for type 2701.

Example value:345
ordermailtemplateid_overdue
int 
(required)

Link to the order mail template that will be sent when the order is overdue. Can be 0 to indicate that no mail should be sent. Not used for type 2701.

Example value:234
ordermailtemplateid_paymentinstruction
int 
(required)

Link to the order mail template that will be sent as payment instruction. Can be 0 to indicate that no mail should be sent. Not used for type 2701.

Example value:123
overdueparameters

Rules that define when an order becomes overdue. Not used for type 2701.

Example value:{ "daysaftercreation": 14 }
paymentmethods
int[] 
(required)

Set of payment methods that are linked to this payment scenario. Depending on the type, this field has different usage.

Example value:[ 23, 45, 12 ]
shortdescription

Short description of the payment scenario, will be shown to customers

Example value:"Will charge your VISA credit card. Note: fees apply."
visibility
string 
(required)

Parameter that sets the visibility of this scenario, can be either ‘FULL’ or ‘API’.

Example value:"FULL"

Type reference: PaymentScenario

Result fields

FieldDescription
id
int

Unique ID

Example value:123
typeid
int

Type for the payment scenario. Can be ‘Immediate payment’ (2701), ‘Mollie bank transfer’ (2702), ‘Regular bank transfer’ (2703), ‘Deferred online payment’ (2704), ‘Deferred other’ (2705).

Example value:2701
name

Name of the payment scenario

Example value:"VISA"
availability

Rules that define in what conditions this payment scenario is available

Example value:{ "saleschannels": [ 14 ], "usescript": false }
bankaccountbeneficiary
string

Beneficiary for the bank account number. Only used for type 2703 (Regular bank transfer)

Example value:"Ticketmatic BVBA"
bankaccountbic
string

BIC code for the bank account number. Only used for type 2703 (Regular bank transfer)

Example value:"KREDBEBB"
bankaccountnumber
string

Bank account number to be used. Only used for type 2703 (Regular bank transfer)

Example value:"BE12 3456 7890 1234"
expiryparameters

Rules that define when an order becomes expired. Not used for type 2701.

Example value:{ "daysaftercreation": 28 }
internalremark
string

An internal remark, which is never shown to customers. Can be used to distinguish identically named payment scenarios.

For example: You could have two VISA scenarios, one for the web sales and one for the box office, each will have different fee configurations. Both will be named VISA, this field can be used to distinguish them.

Example value:"For websales only, box office uses different scenario with different fees."
ordermailtemplateid_expiry
int

Link to the order mail template that will be sent when the order is expired. Can be 0 to indicate that no mail should be sent. Not used for type 2701.

Example value:345
ordermailtemplateid_overdue
int

Link to the order mail template that will be sent when the order is overdue. Can be 0 to indicate that no mail should be sent. Not used for type 2701.

Example value:234
ordermailtemplateid_paymentinstruction
int

Link to the order mail template that will be sent as payment instruction. Can be 0 to indicate that no mail should be sent. Not used for type 2701.

Example value:123
overdueparameters

Rules that define when an order becomes overdue. Not used for type 2701.

Example value:{ "daysaftercreation": 14 }
paymentmethods
int[]

Set of payment methods that are linked to this payment scenario. Depending on the type, this field has different usage.

Example value:[ 23, 45, 12 ]
shortdescription

Short description of the payment scenario, will be shown to customers

Example value:"Will charge your VISA credit card. Note: fees apply."
visibility
string

Parameter that sets the visibility of this scenario, can be either ‘FULL’ or ‘API’.

Example value:"FULL"
isarchived
bool

Whether or not this item is archived

createdts
timestamp

Created timestamp

Example value:"2014-09-26 15:24:36"
lastupdatets
timestamp

Last updated timestamp

Example value:"2014-09-26 15:24:36"

Type reference: PaymentScenario