Get order¶
GET
https://api.mollie.com/v2/orders/*id*
Retrieve a single order by its ID.
Parameters¶
Replace id
in the endpoint URL by the order’s ID, for example ord_8wmqcHMN4U
.
Access token parameters¶
If you are using organization access tokens or are creating an
OAuth app, the testmode
query string parameter is also available.
boolean
optional
|
Set this to true to retrieve a test mode order. |
Response¶
200
application/hal+json
string
|
Indicates the response contains an order object. Will always contain order for this endpoint. |
||||||||
string
|
The order’s unique identifier, for example ord_vsKJpSsabw . |
||||||||
string
|
The profile the order was created on, for example pfl_v9hTwCvYqw . |
||||||||
string|null
|
The payment method last used when paying for the order. | ||||||||
string
|
The mode used to create this order. Possible values: |
||||||||
amount object
|
The total amount of the order, including VAT and discounts. | ||||||||
amount object
optional
|
The amount captured, thus far. The captured amount will be settled to your account. For orders that have the status |
||||||||
amount object
optional
|
The total amount refunded, thus far. | ||||||||
string
|
The status of the order. One of the following values:
See Order status changes for details on the orders’ statuses. |
||||||||
boolean
|
Whether or not the order can be (partially) canceled. | ||||||||
object
|
The person and the address the order is billed to. See below. | ||||||||
boolean
|
If set to true during order creation, we restrict the payment methods available to your customer
to methods from the billing country only.
|
||||||||
date
optional
|
The date of birth of your customer, if available. | ||||||||
string
|
Your order number that was used when creating the order. | ||||||||
object
|
The person and the address the order is billed to. See below. | ||||||||
string
|
The locale used during checkout. Note that the locale may have been changed by your customer during checkout. Can be any ISO 15897 locale. Example values: |
||||||||
mixed
|
Data provided during the order creation. | ||||||||
string|null
|
The URL your customer will be redirected to after completing or canceling the payment process. Note The URL will be |
||||||||
string
optional
|
The URL Mollie will call as soon an important status change on the order takes place. | ||||||||
datetime
|
The order’s date and time of creation, in ISO 8601 format. | ||||||||
datetime
optional
|
The date and time the order will expire, in ISO 8601 format. Note that you have until this date to fully ship the order. For some payment methods, such as Klarna Pay later this means that you will lose the authorization and not be settled for the amounts of the unshipped order lines. The expiry period for orders is 28 days. |
||||||||
datetime
optional
|
If the order is expired, the time of expiration will be present in ISO 8601 format. | ||||||||
datetime
optional
|
If the order has been paid, the time of payment will be present in ISO 8601 format. | ||||||||
datetime
optional
|
If the order has been authorized, the time of authorization will be present in ISO 8601 format. | ||||||||
datetime
optional
|
If the order has been canceled, the time of cancellation will be present in ISO 8601 format. | ||||||||
datetime
optional
|
If the order is completed, the time of completion will be present in ISO 8601 format. | ||||||||
object
optional
|
An object with the requested embedded resources, such as payments, that belong to this order.
|
||||||||
object
|
An object with several URL objects relevant to the order. Every URL object will contain an
|
Order line details¶
The order lines contain the actual things the your customer bought.
string
|
Always orderline . |
||||
string
|
The order line’s unique identifier, for example odl_dgtxyl . |
||||
string
|
The ID of the order the line belongs too, for example ord_kEn1PlbGa . |
||||
string
|
The type of product bought, for example, a physical or a digital product. Will be one of the following values:
|
||||
string
|
A description of the order line, for example LEGO 4440 Forest Police Station. | ||||
string
|
Status of the order line. One of the following values:
|
||||
boolean
|
Whether or not the order line can be (partially) canceled. | ||||
int
|
The number of items in the order line. | ||||
int
|
The number of items that are shipped for this order line. | ||||
amount object
|
The total amount that is shipped for this order line. | ||||
int
|
The number of items that are refunded for this order line. | ||||
amount object
|
The total amount that is refunded for this order line. | ||||
int
|
The number of items that are canceled in this order line. | ||||
amount object
|
The total amount that is canceled in this order line. | ||||
int
|
The number of items that can still be shipped for this order line. | ||||
int
|
The number of items that can still be refunded for this order line. | ||||
int
|
The number of items that can still be canceled for this order line. | ||||
amount object
|
The price of a single item including VAT in the order line. | ||||
amount object
optional
|
Any discounts applied to the order line. | ||||
amount object
|
The total amount of the line, including VAT and discounts. | ||||
string
|
The VAT rate applied to the order line, for example "21.00" for 21%. The vatRate is passed as a string
and not as a float to ensure the correct number of decimals are passed. |
||||
amount object
|
The amount of value-added tax on the line. | ||||
string
optional
|
The SKU, EAN, ISBN or UPC of the product sold. | ||||
datetime
|
The order line’s date and time of creation, in ISO 8601 format. | ||||
object
|
An object with several URL objects relevant to the order line. Every URL object will contain an
|
Addresses¶
In the Orders API, the address objects identify both the address and the person the order is billed or shipped to.
These properties can be found in the billingAddress
and shippingAddress
address objects.
string
optional
|
The person’s organization, if applicable. |
string
optional
|
The title of the person. |
string
|
The given name (first name) of the person. |
string
|
The family name (surname) of the person. |
string
|
The email address of the person. |
phone number
optional
|
The phone number of the person. Will be in the E.164 format. For example
+31208202070 . |
string
|
See Address object for details on these fields. |
Example¶
1 2 | curl -X GET https://api.mollie.com/v2/orders/ord_kEn1PlbGa?embed=payments,refunds \
-H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
|
1 2 3 4 | <?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
$order = $mollie->orders->get("ord_kEn1PlbGa", ["embed" => "payments,refunds"]);
|
1 2 3 | mollie_client = Client()
mollie_client.set_api_key('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')
order = mollie_client.orders.get('ord_stTC2WHAuS')
|
1 2 3 4 5 6 7 | require 'mollie-api-ruby'
Mollie::Client.configure do |config|
config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM'
end
order = Mollie::Order.get('ord_stTC2WHAuS')
|
1 2 3 4 5 6 | const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });
(async () => {
const order = await mollieClient.orders.get('ord_stTC2WHAuS');
})();
|
Response¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | HTTP/1.1 200 OK
Content-Type: application/hal+json
{
"resource": "order",
"id": "ord_kEn1PlbGa",
"profileId": "pfl_URR55HPMGx",
"method": "ideal",
"amount": {
"value": "1027.99",
"currency": "EUR"
},
"status": "created",
"isCancelable": true,
"metadata": null,
"createdAt": "2018-08-02T09:29:56+00:00",
"expiresAt": "2018-08-30T09:29:56+00:00",
"mode": "live",
"locale": "nl_NL",
"billingAddress": {
"organizationName": "Mollie B.V.",
"streetAndNumber": "Keizersgracht 313",
"postalCode": "1016 EE",
"city": "Amsterdam",
"country": "nl",
"givenName": "Luke",
"familyName": "Skywalker",
"email": "luke@skywalker.com"
},
"shopperCountryMustMatchBillingCountry": false,
"consumerDateOfBirth": "1993-10-21",
"orderNumber": "18475",
"shippingAddress": {
"organizationName": "Mollie B.V.",
"streetAndNumber": "Keizersgracht 313",
"postalCode": "1016 EE",
"city": "Amsterdam",
"country": "nl",
"givenName": "Luke",
"familyName": "Skywalker",
"email": "luke@skywalker.com"
},
"redirectUrl": "https://example.org/redirect",
"lines": [
{
"resource": "orderline",
"id": "odl_dgtxyl",
"orderId": "ord_pbjz8x",
"name": "LEGO 42083 Bugatti Chiron",
"sku": "5702016116977",
"type": "physical",
"status": "created",
"metadata": null,
"isCancelable": false,
"quantity": 2,
"quantityShipped": 0,
"amountShipped": {
"value": "0.00",
"currency": "EUR"
},
"quantityRefunded": 0,
"amountRefunded": {
"value": "0.00",
"currency": "EUR"
},
"quantityCanceled": 0,
"amountCanceled": {
"value": "0.00",
"currency": "EUR"
},
"shippableQuantity": 0,
"refundableQuantity": 0,
"cancelableQuantity": 0,
"unitPrice": {
"value": "399.00",
"currency": "EUR"
},
"vatRate": "21.00",
"vatAmount": {
"value": "121.14",
"currency": "EUR"
},
"discountAmount": {
"value": "100.00",
"currency": "EUR"
},
"totalAmount": {
"value": "698.00",
"currency": "EUR"
},
"createdAt": "2018-08-02T09:29:56+00:00",
"_links": {
"productUrl": {
"href": "https://shop.lego.com/nl-NL/Bugatti-Chiron-42083",
"type": "text/html"
},
"imageUrl": {
"href": "https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$",
"type": "text/html"
}
}
},
{
"resource": "orderline",
"id": "odl_jp31jz",
"orderId": "ord_pbjz8x",
"name": "LEGO 42056 Porsche 911 GT3 RS",
"sku": "5702015594028",
"type": "physical",
"status": "created",
"metadata": null,
"isCancelable": false,
"quantity": 1,
"quantityShipped": 0,
"amountShipped": {
"value": "0.00",
"currency": "EUR"
},
"quantityRefunded": 0,
"amountRefunded": {
"value": "0.00",
"currency": "EUR"
},
"quantityCanceled": 0,
"amountCanceled": {
"value": "0.00",
"currency": "EUR"
},
"shippableQuantity": 0,
"refundableQuantity": 0,
"cancelableQuantity": 0,
"unitPrice": {
"value": "329.99",
"currency": "EUR"
},
"vatRate": "21.00",
"vatAmount": {
"value": "57.27",
"currency": "EUR"
},
"totalAmount": {
"value": "329.99",
"currency": "EUR"
},
"createdAt": "2018-08-02T09:29:56+00:00",
"_links": {
"productUrl": {
"href": "https://shop.lego.com/nl-NL/Porsche-911-GT3-RS-42056",
"type": "text/html"
},
"imageUrl": {
"href": "https://sh-s7-live-s.legocdn.com/is/image/LEGO/42056?$PDPDefault$",
"type": "text/html"
}
}
}
],
"_embedded": {
"payments": [
{
"resource": "payment",
"id": "tr_ncaPcAhuUV",
"mode": "live",
"createdAt": "2018-09-07T12:00:05+00:00",
"amount": {
"value": "1027.99",
"currency": "EUR"
},
"description": "Order #1337 (Lego cars)",
"method": null,
"metadata": null,
"status": "open",
"isCancelable": false,
"locale": "nl_NL",
"profileId": "pfl_URR55HPMGx",
"orderId": "ord_kEn1PlbGa",
"sequenceType": "oneoff",
"redirectUrl": "https://example.org/redirect",
"_links": {
"self": {
"href": "https://api.mollie.com/v2/payments/tr_ncaPcAhuUV",
"type": "application/hal+json"
},
"checkout": {
"href": "https://www.mollie.com/payscreen/select-method/ncaPcAhuUV",
"type": "text/html"
},
"dashboard": {
"href": "https://www.mollie.com/dashboard/org_123456789/payments/tr_ncaPcAhuUV",
"type": "text/html"
},
"order": {
"href": "https://api.mollie.com/v2/orders/ord_kEn1PlbGa",
"type": "application/hal+json"
}
}
}
],
"refunds": [
{
"resource": "refund",
"id": "re_vD3Jm32wQt",
"amount": {
"value": "329.99",
"currency": "EUR"
},
"status": "pending",
"createdAt": "2019-01-15T15:41:21+00:00",
"description": "Required quantity not in stock, refunding one photo book.",
"orderId": "ord_kEn1PlbGa",
"paymentId": "tr_mjvPwykz3x",
"settlementAmount": {
"value": "-329.99",
"currency": "EUR"
},
"lines": [
{
"resource": "orderline",
"id": "odl_dgtxyl",
"orderId": "ord_kEn1PlbGa",
"name": "LEGO 42056 Porsche 911 GT3 RS",
"sku": "5702015594028",
"type": "physical",
"status": "completed",
"isCancelable": false,
"quantity": 1,
"unitPrice": {
"value": "329.99",
"currency": "EUR"
},
"vatRate": "21.00",
"vatAmount": {
"value": "57.27",
"currency": "EUR"
},
"totalAmount": {
"value": "329.99",
"currency": "EUR"
},
"createdAt": "2019-01-15T15:22:45+00:00",
"_links": {
"productUrl": {
"href": "https://shop.lego.com/nl-NL/Porsche-911-GT3-RS-42056",
"type": "text/html"
},
"imageUrl": {
"href": "https://sh-s7-live-s.legocdn.com/is/image/LEGO/42056?$PDPDefault$",
"type": "text/html"
}
}
}
],
"_links": {
"self": {
"href": "https://api.mollie.com/v2/payments/tr_mjvPwykz3x/refunds/re_vD3Jm32wQt",
"type": "application/hal+json"
},
"payment": {
"href": "https://api.mollie.com/v2/payments/tr_mjvPwykz3x",
"type": "application/hal+json"
},
"order": {
"href": "https://api.mollie.com/v2/orders/ord_kEn1PlbGa",
"type": "application/hal+json"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.mollie.com/v2/orders/ord_pbjz8x",
"type": "application/hal+json"
},
"checkout": {
"href": "https://www.mollie.com/payscreen/order/checkout/pbjz8x",
"type": "text/html"
},
"dashboard": {
"href": "https://www.mollie.com/dashboard/org_123456789/orders/ord_pbjz8x",
"type": "text/html"
},
"documentation": {
"href": "https://docs.mollie.com/reference/v2/orders-api/get-order",
"type": "text/html"
}
}
}
|