To search a Payment Customer the model PaymentCustomersDTO needs to be passed to the method paymentCustomersGet(count, offset, fields, q, sort) of the class PaymentCustomersApi.

It response the PaymentCustomersList.

Query parameters can be used to more precisely specify what a request should return. You can change the amount of results needed, choose the fields that you need or even add a custom condition as a parameter.

All parameters are optional.

Available parameters

NameTypeDescriptionSampleNotes

count

integerThe number of items to returncount=10

offset

integer

The offset from the result list (in list [1,2,3,4] offset=2 will return [3,4])

offset=80
fieldsstringList of fields included in the result. Nested properties can be accessed with this notation: prop1.prop2 (if not specified, default fields set will be returned)

qstring

A query string to restrict the returned items to given conditions. The query string must consist of any combination of single expressions in the form property:condition. A condition may contain:

wildcard "*" for any number of characters,

wildcard "?" for one character,

ranges in the form [value TO value],

Single expressions may be combined by "AND", "OR", "NOT" operators and parenthesis '(', ')' for grouping.

Property names can be nested like \"prop1.prop2\". Example: (NOT customer.name:meier*) AND (customer.age:[30 TO 40] OR customer.age:[50 TO 60])

q=contact.surname:Mustermann

q=contact.surname:Mustermann%20OR%20contact.forename%3AJohn

The query string SCHULD be url encoded
sortstringString with comma separated pairs of field:order (e.g. contact.surname:asc,contact.comapnyname:desc). Result set will be sorted by included fields.sort=created:descThe sort string SCHULD  be url encoded

Api

Endpoint
GET https://connect.secucard.com/api/v2/Payment/Customers
Header

Accept:application/json
Content-Type:application/json
Accept-Charset:utf-8
Authorization:Bearer {{access_token}}

Response

Sample

{
    "count": 10848,
    "data": [
		{
            "object": "payment.customers",
            "id": "PCU_24AQMUZKP2NC28QJN0ZAVFGU4GJ3A2",
            "contract": {
                "object": "payment.contracts",
                "id": "PCR_M32....PAH"
            },
            "contact": {
                "forename": "John",
                "surname": "Doe",
                "companyname": "Example Inc.",
                "name": "John Doe",
                "salutation": "Mr.",
                "title": "Dr.",
                "address": {
                    "street": "Example Street",
                    "street_number": "6a",
                    "postal_code": "01234",
                    "city": "Examplecity",
                    "country": "Germany"
                },
                "email": "example@example.com",
                "mobile": "0049-987-654321",
                "phone": "0049-123-456789",
                "dob": "1901-02-03T00:00:00+01:00"
            },
            "created": "2019-09-18T17:00:55+02:00"
        },
        {
            "object": "payment.customers",
            "id": "PCU_XXXX",
            "contract": {
                "object": "payment.contracts",
                "id": "PCR_XXXX"
            },
            "contact": {
                "forename": "Max",
                "surname": "Mustermann",
                "name": "Max Mustermann",
                "address": {
                    "street": "test-street",
                    "street_number": "4",
                    "postal_code": "84030",
                    "city": "Landshut"
                },
                "email": "test@email.com"
            },
            "created": "2019-07-30T14:12:58+02:00"
        }
   ]
}

Properties

NameTypeDescriptionSampleNotes
countIntegerNumber of existing payment customers10848The number of all available entities you can get.
This is not equal the number you got (dis is by default limited to 10 entries)
dataList<Model\PaymentCustomersProductModel>Payment customers model
See PaymentCustomersProductModel

PHP

https://github.com/secuconnect/secuconnect-php-sdk-demo/blob/master/src/payment/customer/searchForCustomer.php

NodeJS

https://github.com/secuconnect/secuconnect-js-sdk-demo/blob/master/nodejs/src/payment/customer/searchForCustomer.js