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.
true
to retrieve a test mode order.Response¶
200
application/hal+json
resource
stringorder
for this endpoint.id
stringord_vsKJpSsabw
.profileId
stringpfl_v9hTwCvYqw
.lines
arrayAn array of order line objects. Each object will have the properties listed below.
resource
stringorderline
.id
stringodl_dgtxyl
.orderId
stringord_kEn1PlbGa
.type
stringThe type of product bought, for example, a physical or a digital product.
Possible values: physical
discount
digital
shipping_fee
store_credit
gift_card
surcharge
name
stringstatus
stringStatus of the order line.
Possible values: created
authorized
paid
shipping
canceled
completed
isCancelable
booleanquantity
intquantityShipped
intamountShipped
amount objectquantityRefunded
intamountRefunded
amount objectquantityCanceled
intamountCanceled
amount objectshippableQuantity
intrefundableQuantity
intcancelableQuantity
intunitPrice
amount objectdiscountAmount
amount objectoptionaltotalAmount
amount objectvatRate
string"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.vatAmount
amount objectsku
stringoptionalcreatedAt
datetime_links
objectAn object with several URL objects relevant to the order line. Every URL object will contain an href
and a
type
field.
productUrl
stringoptionalimageUrl
stringoptionalmethod
stringmode
stringThe mode used to create this order.
Possible values: live
test
amount
amount objectamountCaptured
amount objectoptionalThe amount captured, thus far. The captured amount will be settled to your account.
For orders that have the status authorized
, you must
ship the order to ensure the order amount gets captured.
amountRefunded
amount objectoptionalstatus
stringThe status of the order.
Possible values: created
paid
authorized
canceled
shipping
completed
expired
See Order status changes for details on the orders’ statuses.
isCancelable
booleanbillingAddress
address objectThe person and the address the order is billed to.
Refer to the documentation of the address object for more information on which formats are accepted.
organizationName
stringtitle
stringgivenName
stringfamilyName
stringemail
stringphone
phone numberstreetAndNumber
stringstreetAdditional
stringpostalCode
stringcity
stringregion
stringcountry
stringshopperCountryMustMatchBillingCountry
booleanconsumerDateOfBirth
dateoptionalorderNumber
stringshippingAddress
address objectThe person and the address the order is billed to.
Refer to the documentation of the address object for more information on which formats are accepted.
organizationName
stringtitle
stringgivenName
stringfamilyName
stringemail
stringphone
phone numberstreetAndNumber
stringstreetAdditional
stringpostalCode
stringcity
stringregion
stringcountry
stringlocale
stringThe locale used during checkout. Note that the locale may have been changed by your customer during checkout.
Can be any xx_XX
format ISO 15897 locale. Example values: en_US
nl_NL
nl_BE
fr_FR
fr_BE
de_DE
de_AT
de_CH
es_ES
ca_ES
pt_PT
it_IT
nb_NO
sv_SE
fi_FI
da_DK
is_IS
hu_HU
pl_PL
lv_LV
lt_LT
metadata
mixedredirectUrl
stringThe URL your customer will be redirected to after completing or canceling the payment process.
The URL will be null
for recurring orders.
cancelUrl
stringThe optional redirect URL you provided during payment creation. Consumer that explicitly cancel the order will be
redirected to this URL if provided, or otherwise to the redirectUrl
instead — see above.
Mollie will always give you status updates via webhooks, including for the canceled
status. This parameter is therefore entirely optional, but can be useful when implementing a dedicated
consumer-facing flow to handle order cancellations.
The URL will be null
for recurring orders.
webhookUrl
stringoptionalcreatedAt
datetimeexpiresAt
datetimeoptionalThe date and time the order will expire, in ISO 8601 format. This should be the final date for you 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.
expiredAt
datetimeoptionalpaidAt
datetimeoptionalauthorizedAt
datetimeoptionalcanceledAt
datetimeoptionalcompletedAt
datetimeoptional_embedded
objectoptionalAn object with the requested embedded resources, such as payments, that belong to this order.
payments
Payment objectoptionalrefunds
Refund objectoptional_links
objectAn object with several URL objects relevant to the order. Every URL object will contain an href
and a type
field.
self
URL objectcheckout
URL objectoptionalThe URL your customer should visit to make the payment for the order. This is where you should redirect the customer to after creating the order.
As long as order is still in the created
state, this link can be used by your customer to pay for this order.
You can safely share this URL with your customer.
The URL can also be retrieved and copied from the Mollie Dashboard.
Note
You should use HTTP GET
for the redirect to the checkout URL. Using HTTP POST
for redirection
will cause issues with some payment methods or iDEAL issuers. Use HTTP status code 303 See Other
to force
an HTTP GET
redirect.
Recurring, authorized, paid and finalized orders do not have a checkout URL.
dashboard
URL objectdocumentation
URL objectExample¶
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 4 | mollie_client = Client() mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM") order = mollie_client.orders.get("ord_stTC2WHAuS", embed="payment,refunds") |
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 | const { createMollieClient } = require('@mollie/api-client'); const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' }); 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 126", "postalCode": "1015 CW", "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 126", "postalCode": "1015 CW", "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" } } } |