Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To use our OrderAPI API for Pins you have to authenticate. See our Authentication document for instructions on how authentication works.

OrderAPI This API is a REST service and has the following capabilities:

...

HTTP Verb: POST

Schema:

...

Name

...

Data Type

...

Required

...

Description

...

Example

...

MerchantId

...

Integer

...

Yes

...

A unique ID that Greiðslumiðlun provides

...

55879

...

SuccessReturnUrl

...

String

...

No

...

A URL that the buyer will be redirected to when he finishes the purchase. If no URL is provided then the buyer will be redirected to a receipt page.

...

http://someshop.com/Success

...

CancelReturnUrl

...

String

...

No

...

A URL that the buyer will be redirected to if he cancels the purchase. If there is no URL provided then the cancel button will not be displayed to the buyer.

...

http://someshop.com/Cancel

...

Buyer

...

Buyer

...

Encapsulation of the buyers information. See documentation below.

...

Buyer:

...

Name

...

Data Type

...

Required

...

Description

...

Example

...

Buyer.Name

...

String

...

Yes

...

Name of buyer

...

John Johnson

...

Buyer.Ssn

...

String

...

No

...

Ssn of buyer

...

0102882849

...

Buyer.Email

...

String

...

Yes

...

Email of buyer

...

someemail@somedomain.com

...

Buyer.MobileNumber

...

String

...

No

...

Cellphone of buyer

...

1234567

SubscriptionOptions: Only required if Order is a subscription

...

Name

...

Data Type

...

Required

...

Description

...

Example

...

SubscriptionOptions.StartDate

...

String

...

Yes

...

Subscription start date. Format: dd-mm-yyyy

...

28.6.2015

...

SubscriptionOptions.Frequency

...

String

...

Yes

...

'Week' for weekly subscriptions 'Month' for montly subscriptions

...

Week

...

SubscriptionOptions.FrequencyInterval

...

Integer

...

Yes

...

Number of weeks/months between due dates

...

5

...

SubscriptionOptions.Cycles

...

String

...

Yes

...

How many due dates there should be in the subscription

...

7

...

Example input:

Code Block
languagejava
themeConfluence
{
  "merchantId": 0,
  "buyer": {
    "name": "Jack Johnson",
    "ssn": "0000000009",
    "email": "example@example.com",
    "mobileNumber": "1234567"
  },
  "amount": 15000,
  "reference": "REF155",
  "subscriptionOptions": {
    "startDate": "2016-05-12",
    "frequencyInterval": 2,
    "frequency": "Week",
    "cycles": 5
  },
  "successReturnUrl": "http://www.zombo.com",
  "cancelReturnUrl": "http://www.google.com",
  "postbackUrl": "http://www.msn.com/",
  "items": [
    {
      "code": "SUB555",
      "name": "TV subscription",
      "quantity": 1,
      "unit": "stk.",
      "unitPrice": 5000,
      "amount": 5000
    }
  ]
}

...

Example output:

Code Block
languagejs
{
  "orderId": "fdfQQ33gdgWfgGoP642"
}

...

Demo Environment

  1. MerchantId: 1
  2. Url: https://externalapistaging.pei.is/api/orders

...

  1. Contact customer support for information about the production environment

...

Example output:

Code Block
languagejs
[
  {
    "orderId": "adf153j1kjkjgdg",
    "merchantId": 1,
    "buyer": {
      "name": "John",
      "ssn": "0000000001",
      "email": "example@example.com",
      "mobileNumber": "1234567"
    },
    "amount": 10000,
    "reference": "abc123",
    "subscriptionOptions": {
      "startDate": "2016-06-21",
      "frequencyInterval": 1,
      "frequency": "Week",
      "cycles": 5
    },
    "successReturnUrl": "http://www.example.com",
    "cancelReturnUrl": "http://www.example.com",
    "postbackUrl": "http://www.example.com",
    "items": [
      {
        "code": "123abc",
        "name": "Some Item",
        "quantity": 1,
        "unit": "KG",
        "unitPrice": 300,
        "amount": 1000
      }
    ],
    "isConfirmed": true
  }
]

...

Get Order

  1. Used to get a specific Order
  2. HTTP Verb: GET
  3. URL: https://externalapistaging.pei.is/api/orders/ffmPoSnWFUjs0W9u45es0elUKBnpFRSf

Example output:

...

languagejs

...

. Documentation can be found api.pei.is.