Standalone payments API

Live and test environment

Ecsters REST resources for the live and test environment reside under different host addresses:

Live: https://secure.ecster.se/rest/public/v1/
Test: https://labs.ecster.se/rest/public/v1/

Identification methods

Electronic identification

Ecster allows merchant to identify the consumer by using an electronic identity.

Valid electronic identity methods:

Identity document Security Description
SE_BANKID Strong Swedish BankID
SE_BANKID_MOBILE Strong Swedish mobile BankID
NONE None used when consumer does not want to identify himself/herself. Consumer will get restricted access to payment methods and can, for example, not supply a separate shipping address. Also, Ecster will not return any consumer information on a successfully created ticket

 

Ecster REST API supports electronic id from 3rd parties. 

Information about identification levels:
  • A consumer identified using a strong identification method will have full access to payment options and stored consumer information, for example existing accounts and contact information.
  • A consumer identified using a weak identification method will have limited access to payment options and stored consumer information.
  • A consumer that is not identified (none) will have locked down access to payment options, i.e. cannot make purchases for any type of credit, and cannot access any stored consumer information.

When you initialise an electronic identification you will recieve a response with a property that contains information on how the identification is going.

See here for property values.

Physical identification

Ecster allows merchant to identify the consumer by a physical identity document.

Valid physical identity document:

Identity document Security Description
PASSPORT Strong Swedish passport
DRIVERS_LICENSE Strong Swedish drivers license
ID_CARD Strong Swedish id card
ZIP_CODE Weak NationalId and zip code
NONE None Used when consumer does not want to identify himself/herself. Consumer will get restricted access to payment methods and can, for example, not supply a separate shipping address. Also, Ecster will not return any consumer information on a successfully created ticket
 Information about identification levels:
  • A consumer identified using a strong identification method will have full access to payment options and stored consumer information, for example existing accounts and contact information.
  • A consumer identified using a weak identification method will have limited access to payment options and stored consumer information.
  • A consumer that is not identified (none) will have locked down access to payment options, i.e. cannot make purchases on any type of credit, and cannot access stored consumer information at all.

Signature methods

Electronic signature

Ecster allows consumer to sign an agreement by using an electronic identity.

Valid electronic sign methods:

Identity document Security Description
SE_BANKID Strong Swedish BankID
SE_BANKID_MOBILE Strong Swedish mobile BankID

 

When you initialise an electronic signature you will recieve a response with a property that contains information on how the signature is going. 

See here for property values. 

Physical signature

Ecster allows consumers to sign with a physical signature with a valid physical identity document.

Valid physical identity document:

Identity document Security Description
PASSPORT Strong Swedish passport
DRIVERS_LICENSE   Strong Swedish drivers license
ID_CARD Strong Swedish id card
ZIP_CODE Weak NationalId and zip code
NONE None used when consumer does not want to identify himself/herself. Consumer will get restricted access to payment methods and can, for example, not supply a separate shipping address. Also, Ecster will not return any consumer information on a successfully created ticket

Parameters and Properties

Below you'll find Ecster's custom properties for payment, order and transaction types.

orderSubtypeProperties

PARTPAYMENT_SE_1
Prameter Description
method (string, 1) “PARTPAYMENT”
submethod (string, 1) “PARTPAYMENT_SE_1”
termId (int, 1) account/payment term to use
accountName (string, 1)  
startFee (amount, 1)  
adminFee (amount, 1)  
perMonth (amount, 1)  
payments (int, 1)  
creditCost (amount, 1)  
raise (boolean, 1) true if raise on existing account, false otherwise
new (boolean, 1) true if new account, false otherwise
accountNumber (string, 1, size max 20) masked account number
caseNumber (string, 0-1) Returned if order status is PENDING_DECISION.
currentCreditLimit (amount, 0-1) Returned if order status is READY. Reflects the consumer’s credit limit
after order is processed.
previousCreditLimit (amount, 0-1) Returned when order involves an approved limit raise.
Reflects consumer’s credit limit prior to limit raise.
availableAmount (amount, 0-1) Reflects how much the order amount can be increased without a need for raise.
Only returned for orders in status READY and openReservation set to true.
openReservation (boolean, 1) Indicates if update of cart amount or change of payment option is allowed.
true if update is allowed, false otherwise.
directDebit (boolean, 0-1) Indicates if order will be implicitly debited when order status is READY.
INVOICE_SE_1
Parameter Description
method (string, 1) “INVOICE”
 submethod (string, 1)  “INVOICE_SE_1”
 dueDays (int, 1)  Days until invoice is due.
 directDebit (boolean, 0-1)  Indicates if order will be implicitly debited when order status is READY.

 

CARD_1
Parameter Description
method (string, 1) “CARD”
 submethod (string, 1)  “CARD_1”
 cardBrand (string, 1)  card brand
 cardName (string, 1) masked card number

 

paymentSubmethodTerms

PARTPAYMENT_SE_1
Parameter Description
termId (string, 1)  
type (int, 1) internal term type
name (string, 1) name of term. Usually a short description: “5 avbetalningar, 0% ränta”
interestRate (percent, 1)  
effectiveRate (percent, 1)  effective interest rate. Only present if amount is provided in request.
currency (currency , 1)  currency for term
adminFee (amount, 1)  administration fee paid each month
startFee (amount, 1) start fee for the term. Paid during the whole installment tim
minAmount (amount, 1) minimum amount that this payment term can be applied to
maxAmount (amount, 1) maximum amount that this payment term can be applied to
minBilling (amount, 1) minimum billing amount
payments (int, 0-1) number of payments
perMonth (amount, 0-1) amount to pay per month for this term
description (string, 0-1) size max 2000): description
totalAmount (amount, 0-1) if amount provided in request, the sum of requested amount and credit cost
creditLimit (amount, 1) if amount provided in request, reflects the predicted credit if create order results in a new account
termRank (int, 1) specifies rank of term. A lower value represents the most suitable choice of term
termProductType (string, 1) specifies to which product type the term is associated *
termsPdfUrl (string, 1) url to terms in pdf format
termsHtmlUrl (string, 0-1) url to terms in html format
secciPdfUrl (string, 1) url to secci in pdf format

 

* How to use termProductType

Each term is associated with a termProductType which is the identifier of an Ecster product for part payment. An Ecster product is often designated to be applied for by different user categories, e.g. public, internal, students. Thus, each term having an associated Ecster product enables you to filter terms accordingly to the current user category. E.g. if you want to hide internal terms for public use simply filter on termProductType. To do this, you will need to know the value of your Ecster products. This can be provided by Ecster.

paymentSubmethodProperties

PARTPAYMENT_SE_1
Parameter Description
termId (int, 1) connected account term. Also returned by Ecster in call get account terms 
currency (currency , 1) currency for term
startFee (amount, 1) start fee for term
adminFee (amount, 1) administrative fee for term
interestRate (percent, 1) interest rate on account 
effectiveRate (percent, 1)  effective interest rate. Only present if amount is provided in request.
perMonth (amount, 1) amount to pay each month
payments (int, 0-1) number of payments
creditCost (amount, 1) total cost for credit on purchase
totalAmount (amount, 1) total amount, i.e. sum of the cart amount and credit cost
raise (boolean, 1) true if raise, false otherwise
new (boolean, 1) true if new account, false otherwise
accountType (string, 1) account type identifier
accountName (string, 1) name of account, for example “Ecsterkonto”
termsName (string, 1) name of term, using consumer’s locale
termsDescription (string, 1) description of term, using consumer’s locale
currentCreditLimit (amount, 0-1) current credit limit. Only on existing account
usedAmount (amount, 0-1) used amount. Only on existing account
availableAmount (amount, 0-1) available amount. Only on existing account
accountNumber (string, 0-1) masked account number. Only on existing account
accountRank (int, 1) ** reflects fastest conversion choice where a lower value means fastest conversion
termRank (int, 1)  specifies rank of term. A lower value represents the most suitable choice of term
newCreditLimit (amount, 0-1) credit limit after raise or on new account. Only on raise and new account
termProductType (string, 1) * specifies which product type the payment methods term is associated
termsPdfUrl (string, 0-1) url to terms in pdf format
termsHtmlUrl (string, 0-1) url to terms in html format
secciPdfUrl (string, 0-1) url to secci in pdf format

 

* How to use termProductType

Each payment option is associated with a termProductType which is the identifier of an Ecster product for part payment. An Ecster product is often designated to be applied for by different user categories, e.g. publicinternalstudents. Thus, each payment option having an associated Ecster product enables you to filter payment options according to the current user category. E.g. if you want to hide internal payment options for public use simply filter on termProductType. To do this, you will need to know the value of your Ecster products. This can be provided by Ecster.

** How to interpret accountRank and termRank

All PARTPAYMENT payment options will have rank information according to expected conversion easability, i.e. least effort to complete order, for both consumer and merchant. This is reflected by two properties:

  • accountRank - only considers the actual account, not the term. Can be a new account or an existing (determined by property new). A lower value indicates a better choice. Note: all payment options having property new set to true will have same accountRank regardless of termProductType.
  • termRank - considers the term. Terms are ranked within a payment option having the same accountRank and termProductType. A lower value indicates a more popular choice.

Combining these two properties will suggest the best payment option for consumer given the cart amount.

  1. If neccessary, filter payment options according to termProductType. See section ‘How to use termProductType’.
  2. Identify all payment options having the lowest accountRank.
  3. Present all terms for all payment options in step 2, ordered by termRank.

The usage of these propeties is optional.

INVOICE_SE_1
Parameter Description
dueDays (int, 1) days until invoice is due
invoiceFee (amount, 1) invoice fee
termsPdfUrl (string, 0-1)  url to terms in pdf format
termsHtmlUrl (string, 0-1) url to terms in html format

orderSubtypeParameters

PARTPAYMENT_SE_1
Paramter Description
issueCard (boolean, 0-1) true if consumer will recieve a card if order is approved, false otherwise. default value: determined by merchant property setting
openReservation (boolean, 0-1) true if order’s cart amount or/and payment option may be updated before debit, false otherwise. Default value: false
directDebit (boolean, 0-1) true if order automatically should be fully debited when order status becomes READY. Order will implicitly be changed to FULLY_DELIVERED after debit. Value true only valid if openReservation is false. If false, an explicit debit transaction must be done. Default value: false.

 

INVOICE_SE_1
Parameter Description
directDebit (boolean, 0-1) true if order automatically should be fully debited when order status becomes READY. Order will implicitly be changed to FULLY_DELIVERED after debit. If false, an explicit debit transaction must be done. Default value: false

transactionSubtypeProperties

INVOICE_SE_1
Parameter Description
dueDate (date, 1): Date for invoice is due
ocr (string, 1) OCR number
invoiceNumber (string, 1) Invoicenumber

Identification API

Initialize

By using this call you initialize an identification with an electronic identification.

Request parameters Description
type (string, 1) Type of electronic id used, “SE_BANKID”, “SE_BANKID_MOBILE”
nationalId (nationalid, 0-1) Id on consumer

JSON example

Post /v1/identification/eid

Request

Headers

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

Body

{
    "type": "SE_BANKID_MOBILE",
    "nationalId": "SE830101-0000"
}

Response 200 OK

Body

{
    "id": "sQrQ88SlCaGPkZm4hhj6",
    "status": "OUTSTANDING_TRANSACTION",
    "startURL": "bankid:///?autostarttoken=DUMMY-AUTOSTART",
    "pollTime": 15000
}

Data types

= Mandatory
= Optional
type transactiontype

type of electronic id used

nationalId string

Id on consumer

Response

In the response you will recieve the following:

Response parameters Description
id (string, 1) identifier for this identification
status (string, 1) status of identification
startURL (string, 1) URL used to activate chosen eid client on consumer’s computer or mobile device. Only relevant when application and eid client reside on same device
pollTime (int, 1) time to wait until next poll, in milliseconds
name (name, 0-1) will be supplied when status is COMPLETE
nationalId (nationalid, 0-1) will be supplied when status is COMPLETE

 

Response parameter status will tell you what you should do next. 

Collect

Use this call to collect status on the identification process.

Query parameters Description
id (string, 1) identifier of identification to collect. Use id returned from Initialize electronic identification and Collect electronic identification.

 

See response parameter pollTime to know when you should do your next collect call until you recieve status = complete.

JSON example

Get /v1/identification/eid/<id>

Request

Headers

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

Query parameters

id string

identifier of identification to collect. Use id returned from Initialize electronic identification and Collect electronic identification.

Body

Response 200 OK

Body

{
    "id": "ai9FNMSxUV7TRqR8ST37",
    "status": "COMPLETE",
    "pollTime": 1500,
    "name": {
        "firstName": "Havanna",
        "lastName": "Månsson"
    },
    "nationalId": "SE550518-5149"
}

Data types

= Mandatory
= Optional

Response

In the response you will recieve the following:

Response parameters Description
id (string, 1) identifier for this identification
status (string, 1) status of identification
startURL (string, 1) URL used to activate chosen eid client. Only relevant when application and eid client reside on same device
pollTime (int, 1) time to wait until next poll, in milliseconds
name (name, 0-1) will be supplied when status is COMPLETE
nationalId (nationalid, 0-1) will be supplied when status is COMPLETE

 

The response parameter status will tell you what you should do next. 

Authentication-statuses

Status value Description
OUTSTANDING_TRANSACTION – Identification process started, client has not yet eId recieved order
– Proceed with Collect
NO_CLIENT – Client has not yet recieved eId order
– Continue with Collect
STARTED – Client started, yet not initialized with a usable ID
– Continue with Collect
USER_SIGN – Usable ID found in client, awaiting consumer PIN
– Continue with Collect
COMPLETE – Client has entered correct PIN, consumer information available
– No further Collect requests needed
EXPIRED_TRANSACTION – Client process timeout
– No further Collect requests should be made
CERTIFICATE_ERROR – Consumer has entered wrong PIN, consumer’s eId is revoked, consumer’s eId is invalid
– No further Collect requests should be made
USER_CANCEL – Consumer has decided to cancel identication order.
– No further Collect requests should be made
CANCELLED – Identication order was cancelled.
– No further Collect requests should be made
START_FAILED – Consumer’s client failed to start.
– No further Collect requests should be made
TECHNICAL_ERROR – Identification process failed.
– No further Collect requests should be made

Pre-checkout API

Fetch available payment and identification methods

Merchant can display available payment methods. For each payment method available identification methods are provided.

Supplying request parameters will filter payment and identification methods accordingly.
Query parameters Description
locale (string, 1) affects presentation regarding language and formatting. Filtering is not performed using locale.
nationality (string, 1) filter both payment methods and identification methods. Nationality refers to the presumed/known nationality of the consumer.
currency (string, 1) will filter available payment methods.
amount (amount, 0-1) will filter both payment methods and identification methods.
inPerson (boolean, 1) true if both consumer and merchant sales person are present, false otherwise

Get request

To get available payment and identification methods, send the above paramters, locale, nationality, currency, amount and inPerson via a server-side call to our REST API.

JSON example

Get /v1/paymentmethods?locale=<locale>&nationality=<nationality>&currency=<currency>&amount=<amount>&inPerson=<inPerson>

Request

Headers

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

Query parameters

locale string

locale. Used for localizing resources

nationality string

consumer nationality

currency string

currency. Format is ISO 4217

amount amount

Filter payment and identification methods not available for amount

inPerson boolean

true if both consumer and merchant sales person are present, false otherwise (e.g. ecommerce consumer).

Body

Response 200 OK

Body

{
  "paymentMethods": [
    {
      "name": "INVOICE",
      "description": "Betalning med faktura",
      "subMethods": [
        "INVOICE_SE_1"
      ],
      "identificationMethods": [
        "SE_BANKID",
        "ZIP_CODE",
        "SE_BANKID_MOBILE"
      ]
    },
    {
      "name": "PARTPAYMENT",
      "description": "Kontobetalning",
      "subMethods": [
        "PARTPAYMENT_SE_1"
      ],
      "identificationMethods": [
        "SE_BANKID",
        "ZIP_CODE",
        "SE_BANKID_MOBILE"
      ]
    }
  ],
  "localizedInfo": []
}

Data types

= Mandatory
= Optional
locale string

locale. Used for localizing resources

nationality string

consumer nationality

currency string

currency. Format is ISO 4217

amount amount

Filter payment and identification methods not available for amount

inPerson boolean

true if both consumer and merchant sales person are present, false otherwise (e.g. ecommerce consumer).

Get available payment method terms

Get available payment method terms for the merchant from Ecster.

Supplying request parameters will show available payment terms and calculate specific terms if parameter amount is applied
Query parameter Description
locale (string, 1) affects presentation regarding language and formatting
nationality (string, 0-1) consumer nationality
paymentMethod (string, 0-1) see custom object specification (e.g. “PARTPAYMENT”) here
amount (amount, 0-1) if provided, calculated term information will be returned
currency (currency, 0-1) mandatory if amount specified

Get request

To get available payment method terms, send the above paramters, locale, nationality, paymentMethod, currency and amount via a server-side call to our REST API. 

JSON example

Get /v1/paymentmethods/terms?locale=sv-SE&nationality=SE&paymentMethod=PARTPAYMENT&amount=3000000& currency=SEK

Request

Headers

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

Query parameters

locale string

locale. Used for localizing resources

nationality string

consumer nationality

currency string

currency. Format is ISO 4217

amount amount

Filter payment and identification methods not available for amount

inPerson boolean

true if both consumer and merchant sales person are present, false otherwise (e.g. ecommerce consumer).

Body

Response 200 OK

Body

{
  "method": "PARTPAYMENT",
  "submethod": "PARTPAYMENT_SE_1",
  "nationality": "SE",
  "properties": {
    "termId": "1",
    "type": 3,
    "name": "MultiCard MasterCard",
    "interestRate": 0,
    "currency": "SEK",
    "adminFee": 1500,
    "startFee": 0,
    "minAmount": 0,
    "maxAmount": 100000000,
    "payments": 1,
    "perMonth": 3001500,
    "description": ".",
    "effectiveRate": 60,
    "creditCost": 1500,
    "minBilling": 15000,
    "termProductType": "MCARD001",
    "termsPdfUrl": "https://url/rest/public/v1/content/se/sv/terms/pdf/",
    "secciPdfUrl": "https://url/rest/se/sv/secci/pdf/MCARD001?amount=3000000",
    "totalAmount": 3001500,
    "creditLimit": 3200000
  },
  "localizedTerms": [
    {
      "id": "startFee",
      "text": "uppläggningsavgift",
      "value": "0",
      "unit": "kr"
    },
    {
      "id": "adminFee",
      "text": "administrativ avgift",
      "value": "15",
      "unit": "kr"
    },
    {
      "id": "interestRate",
      "text": "ränta",
      "value": "0",
      "unit": "%"
    },
    {
      "id": "payments",
      "text": "antal betalningar",
      "value": "1"
    },
    {
      "id": "perMonth",
      "text": "betalning per månad",
      "value": "30 015",
      "unit": "kr"
    },
    {
      "id": "effectiveRate",
      "text": "effektivränta",
      "value": "0,6",
      "unit": "%"
    },
    {
      "id": "creditCost",
      "text": "kreditkostnad",
      "value": "15",
      "unit": "kr"
    },
    {
      "id": "totalAmount",
      "text": "totalt att betala",
      "value": "30 015",
      "unit": "kr"
    }
  ]
}

Data types

= Mandatory
= Optional
locale string

locale. Used for localizing resources

nationality string

consumer nationality

currency string

currency. Format is ISO 4217

amount amount

Filter payment and identification methods not available for amount

inPerson boolean

true if both consumer and merchant sales person are present, false otherwise (e.g. ecommerce consumer).

Create ticket API

By creating a ticket you will act in the name of an identified or unidentified consumer. The ticket contains information about the consumer and is used in subsequent calls to Ecster.

Create ticket

By using this call you create a ticket .

Request parameters Description
identification (object, 1) Object
  method (string, 1)  id method: “SE_BANKID”, “SE_BANKID_MOBILE”, “ZIP_CODE”, “PASSPORT”, “DRIVERS_LICENSE”, “ID_CARD”, “NONE”
  identifier (string, 0-1) Object describing identification method
    SE_BANKID (string, 1) Using id from Collect electronic identification
    SE_BANKID_MOBILE (string, 1)  Using id from Collect electronic identification
     ZIP_CODE (string, 1)  consumer’s zip code
    PASSPORT (string, 1) passport number
    DRIVERS_LICENSE (string, 1) number on driver license
    ID_CARD (string, 1) number on identification card
  month (string, 0-1) mandatory for methods “PASSPORT”, “DRIVERS_LICENSE”, “ID_CARD”
  year (string, 0-1) mandatory for methods “PASSPORT”, “DRIVERS_LICENSE”, “ID_CARD”
  locale (locale, 1) locale for consumer
  nationalId (nationalid, 0-1) nationalId of person to create ticket for. Mandatory for every type except “NONE”
  inPerson (boolean, 1) true if both consumer and merchant sales person are present, false otherwise (e.g. ecommerce consumer)

JSON example

Post /v1/identification/tickets

Request

Headers

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

Body

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

Response 201 Created

Body

{
    "id": "Tblafe9Ctyh7HnYFN3Rn",
    "validTo": "2018-10-10T14:15:36+02:00",
    "consumer": {
        "nationalId": "SE121212-1212",
        "name": {
            "firstName": "Fred",
            "lastName": "Lundqvist"
        },
        "address": {
            "line1": "Kärrgatan 1",
            "city": "Norsborg",
            "zip": "145 60",
            "country": "SE"
        },
        "contactInfo": {
            "email": "consumer@mail.se",
            "cellular": {
                "number": "070000000"
            },
            "phone": {
                "number": "08-000000"
            }
        }
    }
}

Data types

= Mandatory
= Optional

Response

In the response you will recieve the following:

Response parameters Description
id (string, 1) ticket for this identification
validTo (timestamp, 1) ticket is valid until this time
consumer (consumer, 0-1) not returned when “NONE”, returned otherwise. Contain information only when identified using strong identification

Create order API

Create an order with a specific cart on a specified consumer with a determined payment option.

  1. Call get payment option to collect which payment options the specific consumer can choose from
  2. Create order with the id to which payment option consumer want to use

Get available payment options

By using this call you get available payment options for a specific consumer.

Query parameters Description
ticket (string, 1) ticket used to identify consumer
amount (amount, 1) amount on order
currency (currency, 1) currency on cart
availableCredit (amount, 0-1) available credit on account, both on a new account and an existing. If not set, a default available credit will be set automatically
invoiceFee (amount, 0-1) name of row

JSON example

Get /v1/paymentoptions/?ticket=<ticket>&amount=<amount>&currency=<currency>&availableCredit=<availableCredit>&invoiceFee=<invoiceFee>

Request

Headers

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

Query parameters

ticket string

ticket used to identify consumer

amount amount

Filter payment and identification methods not available for amount

currency string

currency. Format is ISO 4217

availableCredit amount

available credit on account, both on a new account and an existing. If not set, a default available credit will be set automatically

invoiceFee amount

Which invoice fee do you want to apply on the invoice. Only applicable on payment method INVOICE

Body

Response 200 OK

Body

[
  {
    "id": "jW4vHGUifGNge2LS9rsO",
    "paymentMethod": "PARTPAYMENT",
    "paymentSubmethod": "PARTPAYMENT_SE_1",
    "name": "Delbetala",
    "allowAlternateRecipient": true,
    "localizedTerms": [
      {
        "id": "newCreditLimit",
        "text": "Ny kreditgräns",
        "value": "2 000",
        "unit": "kr"
      },
      {
        "id": "termsDescription",
        "text": "Description",
        "value": "Text"
      },
      {
        "id": "baseTerms",
        "text": "",
        "value": "Grundkrav för att ansöka om ett konto.\r\n\r\n* Minst 18 år\r\n* Inga betalningsanmärkningar\r\n* Stadigvarande inkomst av tjänst eller aktiv näringsverksamhet\r\n\r\nInformera kunden om att Ecster AB, 556993-2311, kommer att inhämta en kreditupplysning."
      }
    ],
    "properties": {
      "totalAmount": 32900,
      "termsDescription": "Description",
      "currency": "SEK",
      "startFee": 0,
      "adminFee": 2900,
      "interestRate": 0,
      "effectiveRate": 20262,
      "perMonth": 32900,
      "payments": 1,
      "creditCost": 2900,
      "raise": false,
      "new": true,
      "accountName": "Ecster",
      "termsName": "Köp nu betala nästa månad",
      "termProductType": "MCARD004",
      "accountType": "MCARD004",
      "newCreditLimit": 200000,
      "termsPdfUrl": "https://secure1.ft.ecster.se/rest/public/v1/content/consumer/documents/se/sv/terms/pdf/MCARD004",
      "secciPdfUrl": "https://secure1.ft.ecster.se/rest/public/v1/content/consumer/documents/se/sv/secci/pdf/MCARD004?amount=30000",
      "termsHtmlUrl": "/docs/notImplemented.html",
      "accountRank": 1,
      "termRank": 1,
      "termId": 4
    }
  },
  {
    "id": "fMgQprkxML2n5YqjKVSL",
    "paymentMethod": "INVOICE",
    "paymentSubmethod": "INVOICE_SE_1",
    "name": "Faktura",
    "allowAlternateRecipient": true,
    "localizedTerms": [
      {
        "id": "dueDays",
        "text": "Antal förfallodagar",
        "value": "14"
      },
      {
        "id": "invoiceFee",
        "text": "Fakturaavgift",
        "value": "30",
        "unit": "kr"
      },
      {
        "id": "termsDescription",
        "text": "Beskrivning",
        "value": "Betala om 14 dagar"
      }
    ],
    "properties": {
      "termsDescription": "Betala om 14 dagar",
      "termsHtmlUrl": "/docs/notImplemented.html",
      "dueDays": 14,
      "invoiceFee": 3000
    }
  }
]

Data types

= Mandatory
= Optional

Response

In the response you will recieve the following:

Response parameters Description
object (object, 0-*) Payment options
  id (string, 1) payment method reference - used in create order to determine how the order is paid for
  paymentMethod (string, 1) “PARTPAYMENT”, “INVOICE”
 

paymentSubmethod (string, 1)

“PARTPAYMENT_SE_1”, “INVOICE_SE_1”
   name (string, 1) name of payment method
  allowAlternateRecipient (boolean, 1) indicates if an alternate recipient can be provided when creating order
  properties (paymentSubmethodProperties, 1) properties specified by submethod
  localizedTerms (object, 0-*) Formatted and localized headings and values for presentation pusposes. See section Localized info/terms for usage.
    id (string, 1) part number on row
    text (string, 1) description on row
    value (string, 1) e.g st, kg 
    unit (string, 0-1) discount on this row. Can not be negative for the total row amount (quantity * unitAmount)

Create order

By using this call you create an order.

Request parameters Description
ticket (string, 1) Ticket used to identify consumer.
paymentOption (string, 1) How order should be paid. Use id returned in get available payment options.
cart (cart, 1) Object describing a cart.
  amount (amount, 1) Total amount on this cart. Must match amount on ticket. Amount must match the sum of the amounts and discounts in cart rows.
  currency (currency, 1) Currency on cart.
  rows (row, 1-*) Object describing a row in a cart or on an order.
    name (string, 1) Name of row.
    quantity (double, 1)  
    unitAmount (amount, 1) Unit amount is including vat amount.
    vatRate (percent, 1) Vat rate, sent as integer including two decimals, i.e. 6,75% is represented by 675.
    partNumber (string, 0-1) Part number on row.
    description (string, 0-1) Description on row.
    unit (string, 0-1) e.g kg, st
    discountAmount (amount, 0-1) Discount on this row. Can not be negative for the total row amount (quantity * unitAmount).
  serials (string, 0-*)  
   fee (boolean, 0-1) true if this row is a fee. Default false.
   provided (boolean, 1, read-only) true if row has been added by Ecster. Will be set to true when invoice fee has been added automatically, else false.
orderReference (string, 0-1, size max 64) Merchant order reference.
contactInfo (contactInfo) Object describing contact information for consumer. At least one of email/cellular must be provided.
   email (string, 0-1)  
   cellular (object, 0-1) Object decsribing cellular phone number with country code.
    country (string, 1) Country code for cellular. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
    number (string, 1) Cellular phone number. Specify number including area code but without country code.
  phone (object, 0-1) Object describing phone number with country code.
    country (string, 1) Country code for phone. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
    number (string, 1) Phone number. Specify number including area code but without country code.
recipient (recipient, 0-1) Object describing a recipient. Order should be delivered to this recipient. May only be provided if allowed by payment option, see allowAlternateRecipient in Get available payment options for consumer .
  name (name, 1) Object describing a name.
    firstName (string, 1)  
    lastName (string, 1)  
    title (string, 0-1)  
  adress (address, 1) Object describing an address.
    line1 (string, 0-1) Street name and number. Applicable for all addresses except German("DE") and Austria("AT").
    streetName (string, 0-1) Applicable for addresses in German("DE") and Austria("AT").
    streetNumber (string, 0-1) Applicable for addresses in German("DE") and Austria("AT").
    line2 (string, 0-1) C/O address, Company address field. Applicable for all addresses.
    city (string, 0-1)  
    zip (string, 0-1)  
    province (string, 0-1) Used when applicable for e.g. Region, State, Province. Mandatory for United States ("US").
    country (string, 0-1) ISO 3166-1 alpha-2 format.
  contactInfo (contactInfo) Object describing contact information for consumer. At least one of email/cellular must be provided.
    email (string, 0-1)  
    cellular (object, 0-1) Object decsribing cellular phone number with country code.
      country (string, 0-1) Country code for cellular. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Cellular phone number. Specify number including area code but without country code.
    phone (object, 0-1) Object describing phone number with country code.
      country (string, 0-1) Country code for phone. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Phone number. Specify number including area code but without country code.
notificationURL (string, 0-1, size max 256) Where async OEN should be sent.
platform (object, 0-1)  E-Commerce platform information
        reference (string, 1) Reference provided by Ecster
        info (string, 0-1) Platform name and version
salesPerson (salesPerson, 0-1) Object describing sales person contact information. Mandatory if inPersonset to true when creating ticket.    
  reference (string, 0-1) Salesperson identifier, if provided can be used for tracking.
  nationalId (nationalid, 0-1) National id of sales person.
  name (name, 1) Object describing a name.
    firstName (string, 1)  
    lastName (string, 1)  
    title (string, 0-1)  
  contactInfo (contactInfo) Object describing contact information for consumer. At least one of email/cellular must be provided.   
    email (string, 0-1)  
    cellular (object, 0-1) Object decsribing cellular phone number with country code
      country (string, 0-1) Country code for cellular. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Cellular phone number. Specify number including area code but without country code.
    phone (object, 0-1) Object describing phone number with country code.
      country (string, 0-1) Country code for phone. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Phone number. Specify number including area code but without country code.
parameters (orderSubtypeParameters, 0-1) See spec for orderSubtypeParameters object here
  PARTPAYMENT_SE_1  
    issueCard (boolean, 0-1) true if consumer will recieve a card if order is approved, false otherwise. default value: determined by merchant property setting.
    openReservation (boolean, 0-1) true if order’s cart amount or/and payment option may be updated before debit, false otherwise. Default value: false.   
    directDebit (boolean, 0-1) true if order automatically should be fully debited when order status becomes READY. Order will implicitly be changed to FULLY_DELIVERED after debit. Value true only valid if openReservation is false. If false, an explicit debit transaction must be done. Default value: false.
  INVOICE_SE_1     
    directDebit (boolean, 0-1) true if order automatically should be fully debited when order status becomes READY. Order will implicitly be changed to FULLY_DELIVERED after debit. If false, an explicit debit transaction must be done. Default value: false.
tags (string, 0-*) Provide tags for statistics purposes.

JSON example

Post /v1/orders

Request

Headers

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

Body

{
  "ticket":"BzIJWInJwPEq8Iynwdmm",
  "paymentOption":"EzLQgkUdpKOgasobxV8x",
  "cart":{
    "amount": 30000,
    "currency":"SEK",
    "rows":[{
      "name":"Vit T-shirt",
      "quantity":1.0,  "unitAmount": 30000,
      "vatRate":2500,
      "partNumber":"00012",
      "description":"Vit bomull",
      "unit":"st",
      "discountAmount":0,
      "serials":[],
      "fee":false,
      "provided":false
    }],
    "message":"TestMessage"
  },
  "contactInfo":{
    "email":"user@ecster.se",
    "cellular":{
      "country":"46",
      "number":"700000000"
    },
    "phone":{
      "country":"46",
      "number":"700000000"
    }
  },
  "orderReference":"order100100",
  "notificationURL":"https://ecster.se/osn/orders/",
  "parameters":{
    "issueCard":false,
    "openReservation":true,
    "directDebit":false
  },
  "recipient":{
    "name":null,
    "address":null,
    "contactInfo":null
  },
  "salesPerson":{
    "nationalId":null,
    "reference":"65385415",
    "name":{
      "firstName":"Hans",
      "lastName":"Persson",
      "title":"Salesman"
    },
    "address":null,
    "contactInfo":{
      "email":"user@mail.com",
      "cellular":{
        "country":"46",
        "number":"700000000"
      },
      "phone":{
        "country":"46",
        "number":"80000000"
      }
    }
  },
  "tags":["testTagType1:testTagMsg1","testTagType2:testTagMsg2"],
  "platform":{
    "reference":"123e4567-e89b-12d3-a456-426655440000",
    "info":"platformInfo"
  }
}

Response 201 Created

Body

{
    "order": {
        "id": "eRrFrn0w8QNpuFaz9NWf",
        "merchantId": "56684964",
        "status": "READY",
        "properties": {
            "method": "PARTPAYMENT",
            "submethod": "PARTPAYMENT_SE_1",
            "startFee": 25000,
            "adminFee": 1500,
            "perMonth": 3300,
            "payments": 35,
            "creditCost": 85150,
            "raise": false,
            "new": false,
            "accountNumber": "98523427****7404",
            "previousCreditLimit": 200000,
            "availableAmount": 170000,
            "openReservation": true,
            "directDebit": false
        },
        "created": "2018-12-20T11:08:53+01:00",
        "amount": 30000,
        "currency": "SEK",
        "debitedAmount": 0,
        "creditedAmount": 0,
        "orderReference": "order100100",
        "consumer": {
            "nationalId": "SE790211-0688",
            "name": {
                "firstName": "Yasmine",
                "lastName": "Månsson"
            },
            "address": {
                "line1": "Bennets V 22 Iii",
                "city": "Norrköping",
                "zip": "603 52",
                "country": "SE"
            },
            "contactInfo": {
                "email": "user@ecster.se",
                "cellular": {
                    "number": "0700000000"
                },
                "phone": {
                    "number": "0700000000"
                }
            }
        },
        "transactions": [
            {
                "id": "4zj7nu1g45NfAbEPo3oi",
                "type": "ORIGINAL",
                "created": "2018-12-20T11:08:53+01:00",
                "amount": 30000,
                "rows": [
                    {
                        "name": "Vit T-shirt",
                        "quantity": 1,
                        "unitAmount": 30000,
                        "vatRate": 2500,
                        "partNumber": "00012",
                        "description": "Vit bomull",
                        "unit": "st",
                        "discountAmount": 0,
                        "serials": [],
                        "fee": false
                    }
                ],
                "message": "TestMessage",
                "merchantId": "56684964"
            }
        ],
        "tags": [
            "testTagType1:testTagMsg1",
            "testTagType2:testTagMsg2"
        ],
        "agreementPdfUrl": "https://labs.ft.ecster.se/rest/public/v1/content/consumer/documents/se/sv/agreement/pdf/MTU0NTMwMDgzMzc4MzpSRGtIZHZvRXp4dWJQVlMyZXdySlNxX3lHYkU/eRrFrn0w8QNpuFaz9NWf",
        "localizedInfo": [
            {
                "id": "decisionMessage",
                "text": "",
                "value": "Ansökan är beviljad."
            }
        ],
        "debitConsentPdfUrl": "https://labs.ft.ecster.se/rest/public/v1/content/consumer/documents/se/sv/debitconsent/pdf/eRrFrn0w8QNpuFaz9NWf",
        "debitConsentInfo": {
            "text": "I och med denna underskrift godkänner jag att nedanstående butik debiterar mitt kontonummer hos Ecster AB.\r\n\r\nInköpställe\r\nButik: API testbutik 1\r\nOrg.nr: 550505-5555\r\n\r\nSpecifikation\r\nOrdernummer: orderReferenceDefValue\r\nKontonr: 9852 3427 6624 7404\r\nKreditgräns:\r\nInköpsbelopp: 300 kr\r\nBet per månad: 33 kr\r\nRänta: 8,90%\r\nUppl.avg: 250 kr\r\nAdmin.avg: 15 kr\r\nAntal bet: 35\r\nEffektivränta: 236,80%\r\nTotalt att betala: 1 151,5 kr\r\n\r\nDebitering godkännes\r\nNamn: Yasmine Månsson\r\nPersonnr: 790211-0688\r\nOrt: \r\nDatum: 2018-12-20\r\nUnderskrift: ...................................\r\nID-typ: \r\n\r\n",
            "localizedInfo": []
        }
    }
}

Data types

= Mandatory
= Optional

Response

In the response you will recieve the following:

Response parameters Description
order (order, 1) See custom object section here 

Update order API

This call handle updates for a specific order.

Update order

By using this call you update a specific order with the request parameters below:

Query parameters Description
orderId (string, 1) Id on order.
Request parameters Description
ticket (string, 1) Ticket used to identify consumer.
paymentOption (string, 1) How order should be paid. Use id returned in get available payment options.
cart (cart, 1) Object describing a cart.
  amount (amount, 1) Total amount on this cart. Must match amount on ticket. Amount must match the sum of the amounts and discounts in cart rows.
  currency (currency, 1) Currency on cart.
  rows (row, 1-*) Object describing a row in a cart or on an order.
    name (string, 1) Name of row.
    quantity (double, 1)  
    unitAmount (amount, 1) Unit amount is including vat amount.
    vatRate (percent, 1) Vat rate, sent as integer including two decimals, i.e. 6,75% is represented by 675.
    partNumber (string, 0-1) Part number on row.
    description (string, 0-1) Description on row.
    unit (string, 0-1) e.g kg, st
    discountAmount (amount, 0-1) Discount on this row. Can not be negative for the total row amount (quantity * unitAmount).
  serials (string, 0-*)  
   fee (boolean, 0-1) true if this row is a fee. Default false.
   provided (boolean, 1, read-only) true if row has been added by Ecster. Will be set to true when invoice fee has been added automatically, else false.
orderReference (string, 0-1, size max 64) Merchant order reference.
contactInfo (contactInfo) Object describing contact information for consumer. At least one of email/cellular must be provided.
   email (string, 0-1)  
   cellular (object, 0-1) Object decsribing cellular phone number with country code.
    country (string, 1) Country code for cellular. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
    number (string, 1) Cellular phone number. Specify number including area code but without country code.
  phone (object, 0-1) Object describing phone number with country code.
    country (string, 1) Country code for phone. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
    number (string, 1) Phone number. Specify number including area code but without country code.
recipient (recipient, 0-1) Object describing a recipient. Order should be delivered to this recipient. May only be provided if allowed by payment option, see allowAlternateRecipient in Get available payment options for consumer .
  name (name, 1) Object describing a name:
    firstName (string, 1)  
    lastName (string, 1)  
    title (string, 0-1)  
  adress (address, 1) Object describing the address:
    line1 (string, 0-1) Street name and number. Applicable for all addresses except German("DE") and Austria("AT").
    streetName (string, 0-1) Applicable for addresses in German("DE") and Austria("AT").
    streetNumber (string, 0-1) Applicable for addresses in German("DE") and Austria("AT").
    line2 (string, 0-1) C/O address, Company address field. Applicable for all addresses.
    city (string, 0-1)  
    zip (string, 0-1)  
    province (string, 0-1)  Used when applicable for e.g. Region, State, Province. Mandatory for United States ("US").
    country (string, 0-1)  ISO 3166-1 alpha-2 format.
  contactInfo (contactInfo) Object describing contact information for consumer. At least one of email/cellular must be provided.
    email (string, 0-1)  
    cellular (object, 0-1) Object decsribing cellular phone number with country code:
      country (string, 0-1) Country code for cellular. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Cellular phone number. Specify number including area code but without country code.
    phone (object, 0-1) Object describing phone number with country code.
      country (string, 0-1) Country code for phone. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Phone number. Specify number including area code but without country code.
notificationURL (string, 0-1, size max 256) Where async OEN should be sent.
salesPerson (salesPerson, 0-1) Object describing sales person contact information. Mandatory if inPersonset to true when creating ticket.    
  reference (string, 0-1) Sales person identifier, if provided can be used for tracking.
  nationalId (nationalid, 0-1) National id of sales person.
  name (name, 1) Object describing a name:
    firstName (string, 1)  
    lastName (string, 1)  
    title (string, 0-1)  
  contactInfo (contactInfo) Object describing contact information for consumer. At least one of email/cellular must be provided.   
    email (string, 0-1)  
    cellular (object, 0-1) Object decsribing cellular phone number with country code.
      country (string, 0-1) Country code for cellular. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Cellular phone number. Specify number including area code but without country code.
    phone (object, 0-1) Object describing phone number with country code.
      country (string, 0-1) Country code for phone. Specify country code with “+”, e.g. “+46” or “0046” for Sweden.
      number (string, 0-1) Phone number. Specify number including area code but without country code.
parameters (orderSubtypeParameters, 0-1) See spec for orderSubtypeParameters object here
  PARTPAYMENT_SE_1  
    issueCard (boolean, 0-1) true if consumer will recieve a card if order is approved, false otherwise. default value: determined by merchant property setting.
    openReservation (boolean, 0-1) true if order’s cart amount or/and payment option may be updated before debit, false otherwise. Default value: false.   
    directDebit (boolean, 0-1) true if order automatically should be fully debited when order status becomes READY. Order will implicitly be changed to FULLY_DELIVERED after debit. Value true only valid if openReservation is false. If false, an explicit debit transaction must be done. Default value: false.
  INVOICE_SE_1     
    directDebit (boolean, 0-1) true if order automatically should be fully debited when order status becomes READY. Order will implicitly be changed to FULLY_DELIVERED after debit. If false, an explicit debit transaction must be done. Default value: false.
tags (string, 0-*) Provide tags for statistics purposes.

JSON example

Put /v1/orders/eRrFrn0w8QNpuFaz9NWf

Request

Headers

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

Query parameters

id string (read-only)

Ecster’s internal order reference. Must be supplied in subsequent order administration requests

Body

{
  "ticket":"BzIJWInJwPEq8Iynwdmm",
  "cart":{
    "amount": 30000,
    "currency":"SEK",
    "rows":[{
      "name":"Vit T-shirt",
      "quantity":1.0,  "unitAmount": 30000,
      "vatRate":2500,
      "partNumber":"00012",
      "description":"Vit bomull",
      "unit":"st",
      "discountAmount":0,
      "serials":[],
      "fee":false,
      "provided":false
    }],
    "message":"TestMessage"
  },
  "contactInfo":{
    "email":"user@ecster.se",
    "cellular":{
      "country":"46",
      "number":"70000000"
    }
  },
  "orderReference":"order100100",
  "notificationURL":"https://ecster.se/osn/orders/",
  "parameters":{
    "issueCard":false,
    "openReservation":true,
    "directDebit":false
  },
  "recipient":{
    "name":null,
    "address":null,
    "contactInfo":null
  },
  "salesPerson":{
    "nationalId":null,
    "reference":"65385415",
    "name":{
      "firstName":"Hans",
      "lastName":"Persson",
      "title":"Salesman"
    },
    "address":null,
    "contactInfo":{
      "email":"user@mail.com",
      "cellular":{
        "country":"46",
        "number":"700000000"
      },
      "phone":{
        "country":"46",
        "number":"80000000"
      }
    }
  },
  "tags":["testTagType1:testTagMsg1","testTagType2:testTagMsg2"],
  "platform":{
    "reference":"123e4567-e89b-12d3-a456-426655440000",
    "info":"platformInfo"
  }
}

Response 201 Created

Body

{
    "order": {
        "id": "eRrFrn0w8QNpuFaz9NWf",
        "merchantId": "56684964",
        "status": "READY",
        "properties": {
            "method": "PARTPAYMENT",
            "submethod": "PARTPAYMENT_SE_1",
            "startFee": 25000,
            "adminFee": 1500,
            "perMonth": 3300,
            "payments": 35,
            "creditCost": 85150,
            "raise": false,
            "new": false,
            "accountNumber": "98523427****7404",
            "previousCreditLimit": 200000,
            "availableAmount": 170000,
            "openReservation": true,
            "directDebit": false
        },
        "created": "2018-12-20T11:08:53+01:00",
        "amount": 30000,
        "currency": "SEK",
        "debitedAmount": 0,
        "creditedAmount": 0,
        "orderReference": "order100100",
        "consumer": {
            "nationalId": "SE790211-0688",
            "name": {
                "firstName": "Yasmine",
                "lastName": "Månsson"
            },
            "address": {
                "line1": "Bennets V 22 Iii",
                "city": "Norrköping",
                "zip": "603 52",
                "country": "SE"
            },
            "contactInfo": {
                "email": "user@ecster.se",
                "cellular": {
                    "number": "0700000000"
                }
        },
        "transactions": [
            {
                "id": "4zj7nu1g45NfAbEPo3oi",
                "type": "ORIGINAL",
                "created": "2018-12-20T11:08:53+01:00",
                "amount": 30000,
                "rows": [
                    {
                        "name": "Vit T-shirt",
                        "quantity": 1,
                        "unitAmount": 30000,
                        "vatRate": 2500,
                        "partNumber": "00012",
                        "description": "Vit bomull",
                        "unit": "st",
                        "discountAmount": 0,
                        "serials": [],
                        "fee": false
                    }
                ],
                "message": "TestMessage",
                "merchantId": "56684964"
            }
        ],
        "tags": [
            "testTagType1:testTagMsg1",
            "testTagType2:testTagMsg2"
        ],
        "agreementPdfUrl": "https://labs.ft.ecster.se/rest/public/v1/content/consumer/documents/se/sv/agreement/pdf/MTU0NTMwMDgzMzc4MzpSRGtIZHZvRXp4dWJQVlMyZXdySlNxX3lHYkU/eRrFrn0w8QNpuFaz9NWf",
        "localizedInfo": [
            {
                "id": "decisionMessage",
                "text": "",
                "value": "Ansökan är beviljad."
            }
        ],
        "debitConsentPdfUrl": "https://labs.ft.ecster.se/rest/public/v1/content/consumer/documents/se/sv/debitconsent/pdf/eRrFrn0w8QNpuFaz9NWf",
        "debitConsentInfo": {
            "text": "I och med denna underskrift godkänner jag att nedanstående butik debiterar mitt kontonummer hos Ecster AB.\r\n\r\nInköpställe\r\nButik: API testbutik 1\r\nOrg.nr: 550505-5555\r\n\r\nSpecifikation\r\nOrdernummer: orderReferenceDefValue\r\nKontonr: 9852 3427 6624 7404\r\nKreditgräns:\r\nInköpsbelopp: 300 kr\r\nBet per månad: 33 kr\r\nRänta: 8,90%\r\nUppl.avg: 250 kr\r\nAdmin.avg: 15 kr\r\nAntal bet: 35\r\nEffektivränta: 236,80%\r\nTotalt att betala: 1 151,5 kr\r\n\r\nDebitering godkännes\r\nNamn: Yasmine Månsson\r\nPersonnr: 790211-0688\r\nOrt: \r\nDatum: 2018-12-20\r\nUnderskrift: ...................................\r\nID-typ: \r\n\r\n",
            "localizedInfo": []
        }
    }
}

Data types

= Mandatory
= Optional

Response

In the response you will recieve the following:

Response parameters Description
order (order, 1) See custom object section here 

Sign agreement API

Sign agreement

By using this call you sign an agreement.

Query parameters Description
orderId (string, 1) id on order
Request parameters Description
signatureType (string, 1) Which agreement type ("ACOUNT_AGREEMENT")
identification (object, 1) Object describing a cart
  method (string, 1) total amount on this cart. Must match amount on ticket. Amount must match the sum of the amounts and discounts in cart rows.
    electronical (string, 1) "SE_BANKID", SE_BANKID_MOBILE

JSON example

Post /v1/orders/sQrQ88SlCaGPkZn56rttZ/signatures

Request

Headers

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

Body

{
  "identification": {
    "method": "SE_BANKID_MOBILE"
  },
  "signatureType": "ACCOUNT_AGREEMENT"
}

Response 201 Created

Body

{
    "id": "sQrQ88SlCaGPkZm4hhj6",
    "status": "OUTSTANDING_TRANSACTION",
    "startURL": "bankid:///?autostarttoken=DUMMY-AUTOSTART",
    "pollTime": 5000
}

Data types

= Mandatory
= Optional
signatureType string

Which agreement you will sign

identification

Which identification method is used

method string

“SE_BANKID”, “SE_BANKID_MOBILE”

Response

In the response you will recieve the following:

Response parameters Description
id (string, 1) identifier for this identification
status (string, 1) status of signature
startURL (string, 0-1) URL used to activate chosen eid client. Only relevant when application and eid client reside on same device
pollTime (int, 0-1) time to wait until next poll, in milliseconds


Response parameter status will tell you what you should do next.

Request test account