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.
...
...
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.
...
...
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
...
...
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 | ||||
---|---|---|---|---|
| ||||
{
"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 | ||
---|---|---|
| ||
{
"orderId": "fdfQQ33gdgWfgGoP642"
} |
...
Demo Environment
- MerchantId: 1
- Url: https://externalapistaging.pei.is/api/orders
...
- Contact customer support for information about the production environment
...
Example output:
Code Block | ||
---|---|---|
| ||
[
{
"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
- Used to get a specific Order
- HTTP Verb: GET
- URL: https://externalapistaging.pei.is/api/orders/ffmPoSnWFUjs0W9u45es0elUKBnpFRSf
Example output:
...
language | js |
---|
...
. Documentation can be found api.pei.is.