Create ticket

When creating a ticket you will act in the name of an identified or unidentified consumer.

Operation enables merchant to:
  • Creating an order in Ecsters REST-API
  • Identified with a strong identification method Ecster returns information about the consumer before the purshace is complete

When you call create ticket you have to send in the identification object that will decide what you can do in later calls.

Attributes on identification object:   
  • method: id method: “SE_BANKID”, “SE_BANKID_MOBILE”, “ZIP_CODE”, “PASSPORT”, “DRIVERS_LICENSE”, “ID_CARD”, “NONE”
  • identifer:  verification data. Provide relevant info for method:
    • SE_BANKID/SE_BANKID_MOBILE:
      • Using Ecster: id from Collect electronic identification_
      • Using 3rd party: provide identification reference enabling traceability.
    • ZIP_CODE: consumer’s zip code
    • PASSPORT: passport number
    • DRIVERS_LICENSE: number on driver license
    • ID_CARD: number on identification card
  • month: mandatory for methods “PASSPORT”, “DRIVERS_LICENSE”, “ID_CARD”.
  • year: mandatory for methods “PASSPORT”, “DRIVERS_LICENSE”, “ID_CARD”.
  • locale: locale for consumer.
  • nationalId: nationalId of person to create ticket for. Mandatory for every type except “NONE”.
  • inPerson: true if both consumer and merchant sales person are present, false otherwise (e.g. ecommerce consumer)

In the identification object you have attribute inPerson which reflects the consumer identification scenario, e.g. if both consumer and merchant sales person are present or if consumer acts without sales person.

Value of inPerson will affect which identificationMethods that are valid when creating ticket. E.g. setting inPerson to false will not allow physical identity documents, e.g. PASSPORT, DRIVERS_LICENSE, ID_CARD…

Depending how it is set will also affect if parameters in subsequent calls in the order flow are mandatory or not. See section Create order.

Value of inPerson will also affect the ticket validity length.

  • true implies POS scenario, ticket valid time is ten hours
  • false implies ECOM scenario, ticket valid time is thirty minutes

1. Create ticket request

To create ticket, send the above attributes,  via a server-side call to our REST API. You’ll find the complete REST API reference here.

POST https://api.ecster.com/v1/identification/tickets

x-api-key: njdfdsdkjfl5598503mnfkfe
x-merchant-key: 86969769
Content-Type: application/json

{
  "identification":{
    "method":"SE_BANKID_MOBILE",
    "identifier":"SE_BANKID_MOBILE"
  },
  "locale":{
    "language":"sv",
    "country":"SE"
  },
  "nationalId": "SE530516-9756",
  "inPerson":false
}

Handle the response

You can either get OK response, or an error.

The response contains following information:

  • id: ticket for this identification
  • validTo: ticket is valid until this time
  • consumer: not returned when “NONE”, always returned otherwise. Will contain contact information only if consumer is identified using strong identification

Below you have an example of the response from request obove.

Status: 201 created

{
    "id": "eYBtAD0wTZIzDWkVpGhe",
    "validTo": "2018-04-18T11:06:16+02:00",
    "consumer": {
        "nationalId": "SE530516-9756",
        "name": {
            "firstName": "Algot",
            "lastName": "Henriksson"
        },
        "address": {
            "line1": "Alsike, Årby",
            "city": "Västerås",
            "zip": "724 62",
            "country": "SE"
        },
        "contactInfo": {
            "email": "algot@testson.com",
            "cellular": {
                "number": "070-1111111"
            },
            "phone": {
                "number": "018-111111"
            }
        }
    }
}
Request test account