Modify an existing payment scenario

Content

Resource URL

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

Example

Request

 1use Ticketmatic\Endpoints\Settings\Ticketsales\Paymentscenarios;
 2
 3$result = Paymentscenarios::update($client, $id, 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    "feedescription" => "+ 1€",
19    "internalremark" => "For websales only, box office uses different scenario with different fees.",
20    "logo" => "logos/paypal.svg",
21    "mailorganization" => true,
22    "ordermailtemplateid_expiry" => 345,
23    "ordermailtemplateid_overdue" => 234,
24    "ordermailtemplateid_paymentinstruction" => 123,
25    "overdueparameters" => array(
26        "daysaftercreation" => 14,
27    ),
28    "paymentmethods" => array(
29        23,
30        45,
31        12,
32    ),
33    "shortdescription" => "Will charge your VISA credit card. Note: fees apply.",
34    "visibility" => "FULL",
35));

Response

 1object(\Ticketmatic\Model\PaymentScenario) (22) {
 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  ["feedescription"]=>
30  string(6) "+ 1€"
31  ["internalremark"]=>
32  string(74) "For websales only, box office uses different scenario with different fees."
33  ["logo"]=>
34  string(16) "logos/paypal.svg"
35  ["mailorganization"]=>
36  bool(true)
37  ["ordermailtemplateid_expiry"]=>
38  int(0)
39  ["ordermailtemplateid_overdue"]=>
40  int(0)
41  ["ordermailtemplateid_paymentinstruction"]=>
42  int(0)
43  ["overdueparameters"]=>
44  object(\Ticketmatic\Model\PaymentscenarioOverdueParameters) (1) {
45    ["daysaftercreation"]=>
46    int(0)
47  }
48  ["paymentmethods"]=>
49  array(3) {
50    [0]=>
51    int(0)
52    [1]=>
53    int(0)
54    [2]=>
55    int(0)
56  }
57  ["shortdescription"]=>
58  string(52) "Will charge your VISA credit card. Note: fees apply."
59  ["visibility"]=>
60  string(4) "FULL"
61  ["isarchived"]=>
62  bool(false)
63  ["createdts"]=>
64  object(\DateTime) (3) {
65    ["date"]=>
66    string(26) "2014-09-26 15:24:36.000000"
67    ["timezone_type"]=>
68    int(3)
69    ["timezone"]=>
70    string(3) "UTC"
71  }
72  ["lastupdatets"]=>
73  object(\DateTime) (3) {
74    ["date"]=>
75    string(26) "2014-09-26 15:24:36.000000"
76    ["timezone_type"]=>
77    int(3)
78    ["timezone"]=>
79    string(3) "UTC"
80  }
81}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/paymentscenarios"
 4)
 5
 6result, err := paymentscenarios.Update(client, id, &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    Feedescription: "+ 1€",
22    Internalremark: "For websales only, box office uses different scenario with different fees.",
23    Logo: "logos/paypal.svg",
24    Mailorganization: true,
25    OrdermailtemplateidExpiry: 345,
26    OrdermailtemplateidOverdue: 234,
27    OrdermailtemplateidPaymentinstruction: 123,
28    Overdueparameters: &ticketmatic.PaymentscenarioOverdueParameters{
29        Daysaftercreation: 14,
30    },
31    Paymentmethods: []int64{
32        23,
33        45,
34        12,
35    },
36    Shortdescription: "Will charge your VISA credit card. Note: fees apply.",
37    Visibility: "FULL",
38})

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    Feedescription: "+ 1€",
18    Internalremark: "For websales only, box office uses different scenario with different fees.",
19    Logo: "logos/paypal.svg",
20    Mailorganization: true,
21    OrdermailtemplateidExpiry: 345,
22    OrdermailtemplateidOverdue: 234,
23    OrdermailtemplateidPaymentinstruction: 123,
24    Overdueparameters: &ticketmatic.PaymentscenarioOverdueParameters{
25        Daysaftercreation: 14,
26    },
27    Paymentmethods: []int64{
28        23,
29        45,
30        12,
31    },
32    Shortdescription: "Will charge your VISA credit card. Note: fees apply.",
33    Visibility: "FULL",
34    Isarchived: false,
35    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
36    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
37}

Request

 1PUT /api/1/{accountname}/settings/ticketsales/paymentscenarios/{id} 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    "feedescription": "+ 1€",
18    "internalremark": "For websales only, box office uses different scenario with different fees.",
19    "logo": "logos/paypal.svg",
20    "mailorganization": true,
21    "ordermailtemplateid_expiry": 345,
22    "ordermailtemplateid_overdue": 234,
23    "ordermailtemplateid_paymentinstruction": 123,
24    "overdueparameters": {
25        "daysaftercreation": 14
26    },
27    "paymentmethods": [ 23, 45, 12 ],
28    "shortdescription": "Will charge your VISA credit card. Note: fees apply.",
29    "visibility": "FULL"
30}

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    "feedescription": "+ 1€",
19    "internalremark": "For websales only, box office uses different scenario with different fees.",
20    "logo": "logos/paypal.svg",
21    "mailorganization": true,
22    "ordermailtemplateid_expiry": 345,
23    "ordermailtemplateid_overdue": 234,
24    "ordermailtemplateid_paymentinstruction": 123,
25    "overdueparameters": {
26        "daysaftercreation": 14
27    },
28    "paymentmethods": [ 23, 45, 12 ],
29    "shortdescription": "Will charge your VISA credit card. Note: fees apply.",
30    "visibility": "FULL",
31    "isarchived": false,
32    "createdts": "2014-09-26 15:24:36",
33    "lastupdatets": "2014-09-26 15:24:36"
34}

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 }
feedescription
mlstring 
(required)

A very short description of the fee that is applicable.

Example value:"+ 1€"
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."
logo
string 
(required)

Logo url

Example value:"logos/paypal.svg"
mailorganization
bool 
(required)

Send mail to organization if known

Example value:true
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 }
feedescription

A very short description of the fee that is applicable.

Example value:"+ 1€"
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."
logo
string

Logo url

Example value:"logos/paypal.svg"
mailorganization
bool

Send mail to organization if known

Example value:true
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