Get order

Orders API v2
GEThttps://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.

testmode

boolean
optional
Set this to true to retrieve a test mode order.

Response

200 application/hal+json

resource

string
Indicates the response contains an order object. Will always contain order for this endpoint.

id

string
The order’s unique identifier, for example ord_vsKJpSsabw.

profileId

string
The profile the order was created on, for example pfl_v9hTwCvYqw.

method

string|null
The payment method last used when paying for the order.

mode

string

The mode used to create this order.

Possible values: live test

amount

amount object
The total amount of the order, including VAT and discounts.

amountCaptured

amount object
optional

The 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 object
optional
The total amount refunded, thus far.

status

string

The status of the order. One of the following values:

  • created
  • paid
  • authorized
  • canceled
  • shipping
  • completed
  • expired

See Order status changes for details on the orders’ statuses.

isCancelable

boolean
Whether or not the order can be (partially) canceled.

billingAddress

object
The person and the address the order is billed to. See below.

consumerDateOfBirth

date
optional
The date of birth of your customer, if available.

orderNumber

string
Your order number that was used when creating the order.

shippingAddress

object
The person and the address the order is billed to. See below.

locale

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: 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

mixed
Data provided during the order creation.

redirectUrl

string|null

The URL your customer will be redirected to after completing or canceling the payment process.

Note

The URL will be null for recurring orders.

webhookUrl

string
optional
The URL Mollie will call as soon an important status change on the order takes place.

createdAt

datetime
The order’s date and time of creation, in ISO 8601 format.

expiresAt

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.

expiredAt

datetime
optional
If the order is expired, the time of expiration will be present in ISO 8601 format.

paidAt

datetime
optional
If the order has been paid, the time of payment will be present in ISO 8601 format.

authorizedAt

datetime
optional
If the order has been authorized, the time of authorization will be present in ISO 8601 format.

canceledAt

datetime
optional
If the order has been canceled, the time of cancellation will be present in ISO 8601 format.

completedAt

datetime
optional
If the order is completed, the time of completion will be present in ISO 8601 format.

_embedded

object
optional

An object with the requested embedded resources, such as payments, that belong to this order.

payments

Payment object
optional
An array of embedded payment resources.

_links

object

An object with several URL objects relevant to the order. Every URL object will contain an href and a type field.

self

URL object
The API resource URL of the order itself.

checkout

URL object
optional

The 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.

documentation

URL object
The URL to the order retrieval endpoint documentation.

Order line details

The order lines contain the actual things the your customer bought.

resource

string
Always orderline.

id

string
The order line’s unique identifier, for example odl_dgtxyl.

orderId

string
The ID of the order the line belongs too, for example ord_kEn1PlbGa.

type

string

The type of product bought, for example, a physical or a digital product. Will be one of the following values:

  • physical
  • discount
  • digital
  • shipping_fee
  • store_credit
  • gift_card
  • surcharge

name

string
A description of the order line, for example LEGO 4440 Forest Police Station.

status

string

Status of the order line. One of the following values:

  • created
  • authorized
  • paid
  • shipping
  • canceled
  • completed

isCancelable

boolean
Whether or not the order line can be (partially) canceled.

quantity

int
The number of items in the order line.

quantityShipped

int
The number of items that are shipped for this order line.

amountShipped

amount object
The total amount that is shipped for this order line.

quantityRefunded

int
The number of items that are refunded for this order line.

amountRefunded

amount object
The total amount that is refunded for this order line.

quantityCanceled

int
The number of items that are canceled in this order line.

amountCanceled

amount object
The total amount that is canceled in this order line.

shippableQuantity

int
The number of items that can still be shipped for this order line.

refundableQuantity

int
The number of items that can still be refunded for this order line.

cancelableQuantity

int
The number of items that can still be canceled for this order line.

unitPrice

amount object
The price of a single item including VAT in the order line.

discountAmount

amount object
optional
Any discounts applied to the order line.

totalAmount

amount object
The total amount of the line, including VAT and discounts.

vatRate

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.

vatAmount

amount object
The amount of value-added tax on the line.

sku

string
optional
The SKU, EAN, ISBN or UPC of the product sold.

createdAt

datetime
The order line’s date and time of creation, in ISO 8601 format.

_links

object

An object with several URL objects relevant to the order line. Every URL object will contain an href and a type field.

productUrl

string
optional
A link pointing to the product page in your web shop of the product sold.

imageUrl

string
optional
A link pointing to an image of the product sold.

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.

organizationName

string
optional
The person’s organization, if applicable.

title

string
optional
The title of the person.

givenName

string
The given name (first name) of the person.

familyName

string
The family name (surname) of the person.

email

string
The email address of the person.

phone

phone number
optional
The phone number of the person. Will be in the E.164 format. For example +31208202070.

streetAndNumber streetAdditional postalCode city region country

string
See Address object for details on these fields.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/orders/ord_kEn1PlbGa?embed=payments \
    -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"]);
1
2
3
mollie_client = Client()
mollie_client.set_api_key('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')
order = mollie_client.orders.get('ord_stTC2WHAuS')
1
2
3
4
We don't have a Ruby code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation
1
2
3
4
We don't have a Node.js code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation

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
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"
     },
     "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"
                     },
                     "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"
         },
         "documentation": {
             "href": "https://docs.mollie.com/reference/v2/orders-api/get-order",
             "type": "text/html"
         }
     }
 }