Get a list of payment scenarios
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::getlist($client, array(
4 "filter" => "SELECT id FROM tm.paymentscenario WHERE typeid=2701",
5 "includearchived" => true,
6 "lastupdatesince" => "2014-09-26 15:24:36",
7));
8
9// The parameters array is optional, it can be omitted when empty.
10$result = Paymentscenarios::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Ticketsales\PaymentscenariosList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\PaymentScenario) (16) {
6 ["id"]=>
7 int(0)
8 ["typeid"]=>
9 int(0)
10 ["name"]=>
11 string(4) "VISA"
12 ["bankaccountbeneficiary"]=>
13 string(16) "Ticketmatic BVBA"
14 ["bankaccountbic"]=>
15 string(8) "KREDBEBB"
16 ["bankaccountnumber"]=>
17 string(19) "BE12 3456 7890 1234"
18 ["internalremark"]=>
19 string(74) "For websales only, box office uses different scenario with different fees."
20 ["ordermailtemplateid_expiry"]=>
21 int(0)
22 ["ordermailtemplateid_overdue"]=>
23 int(0)
24 ["ordermailtemplateid_paymentinstruction"]=>
25 int(0)
26 ["paymentmethods"]=>
27 array(3) {
28 [0]=>
29 int(0)
30 [1]=>
31 int(0)
32 [2]=>
33 int(0)
34 }
35 ["shortdescription"]=>
36 string(52) "Will charge your VISA credit card. Note: fees apply."
37 ["visibility"]=>
38 string(4) "FULL"
39 ["isarchived"]=>
40 bool(false)
41 ["createdts"]=>
42 object(\DateTime) (3) {
43 ["date"]=>
44 string(26) "2014-09-26 15:24:36.000000"
45 ["timezone_type"]=>
46 int(3)
47 ["timezone"]=>
48 string(3) "UTC"
49 }
50 ["lastupdatets"]=>
51 object(\DateTime) (3) {
52 ["date"]=>
53 string(26) "2014-09-26 15:24:36.000000"
54 ["timezone_type"]=>
55 int(3)
56 ["timezone"]=>
57 string(3) "UTC"
58 }
59 }
60 }
61}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/paymentscenarios"
4)
5
6result, err := paymentscenarios.Getlist(client, &ticketmatic.PaymentScenarioQuery{
7 Filter: "SELECT id FROM tm.paymentscenario WHERE typeid=2701",
8 Includearchived: true,
9 Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10})
11
12// The query object is optional, it can be omitted when empty.
13result, err := paymentscenarios.Getlist(client, nil)
Response
1result := paymentscenarios.&List{
2 Data: []*ticketmatic.PaymentScenario{
3 &ticketmatic.PaymentScenario{
4 Id: 123,
5 Typeid: 2701,
6 Name: "VISA",
7 Bankaccountbeneficiary: "Ticketmatic BVBA",
8 Bankaccountbic: "KREDBEBB",
9 Bankaccountnumber: "BE12 3456 7890 1234",
10 Internalremark: "For websales only, box office uses different scenario with different fees.",
11 OrdermailtemplateidExpiry: 345,
12 OrdermailtemplateidOverdue: 234,
13 OrdermailtemplateidPaymentinstruction: 123,
14 Paymentmethods: []int64{
15 23,
16 45,
17 12,
18 },
19 Shortdescription: "Will charge your VISA credit card. Note: fees apply.",
20 Visibility: "FULL",
21 Isarchived: false,
22 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
23 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
24 },
25 },
26}
Request
1GET /api/1/{accountname}/settings/ticketsales/paymentscenarios HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "typeid": 2701,
9 "name": "VISA",
10 "bankaccountbeneficiary": "Ticketmatic BVBA",
11 "bankaccountbic": "KREDBEBB",
12 "bankaccountnumber": "BE12 3456 7890 1234",
13 "internalremark": "For websales only, box office uses different scenario with different fees.",
14 "ordermailtemplateid_expiry": 345,
15 "ordermailtemplateid_overdue": 234,
16 "ordermailtemplateid_paymentinstruction": 123,
17 "paymentmethods": [ 23, 45, 12 ],
18 "shortdescription": "Will charge your VISA credit card. Note: fees apply.",
19 "visibility": "FULL",
20 "isarchived": false,
21 "createdts": "2014-09-26 15:24:36",
22 "lastupdatets": "2014-09-26 15:24:36"
23 }
24 ]
25}
Parameters
Field | Description |
---|---|
filter | Filter the returned items by specifying a query on the public datamodel that returns the ids. Example value:"SELECT id FROM tm.paymentscenario WHERE typeid=2701" |
includearchived | If this parameter is true, archived items will be returned as well. Example value:true |
lastupdatesince | All items that were updated since this timestamp will be returned. Timestamp should be passed in "2014-09-26 15:24:36" |
Type reference: PaymentScenarioQuery
Result fields
This call returns an object with an array of objects in the data
field.
Field | Description |
---|---|
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" |
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" |
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 "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 |
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" |
This type can have custom fields.
Type reference: PaymentScenario[]