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

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

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

Parameters

FieldDescription
filter
string

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
bool

If this parameter is true, archived items will be returned as well.

Example value:true
lastupdatesince
timestamp

All items that were updated since this timestamp will be returned. Timestamp should be passed in YYYY-MM-DD hh:mm:ss format.

Example value:"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.

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"
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"
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
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[]