Last updated

View and Change Orders


Learn about the details of the calls that let you view and edit your orders.

For each call, you can find a description, technical details, and sample requests and responses.


Check the Details of an Order

Use the Order Management API to check the details of an order.

Retrieve Order Details

To check the order details, send a GET request to the following endpoint:

{apiUrl}/ordermanagement/v1/orders/{order_id}

Path Parameter:

  • order_id: The identifier received in a successful response when placing a new order.

Success Response:

{
  "order_id": "7849fd84-47dc-4919-a7ce-xxxxxxxxxx",
  "status": "CAPTURED",
  "fraud_status": "ACCEPTED",
  "order_amount": 200,
  "original_order_amount": 200,
  "captured_amount": 200,
  "refunded_amount": 0,
  "remaining_authorized_amount": 0,
  "purchase_currency": "PLN"
}

Error Response:

{
  "error_code": "INVALID_ORDER_ID",
  "error_messages": ["Order ID must be a valid UUID."],
  "correlation_id": "dd482985-2e0f-415d-9f30-74ce93e7e68e"
}

Update Order Amount

Use the Order Management API to update the total amount of an order before it is captured, canceled, or expired.

Update Order Amount

Send a PATCH request to:

{apiUrl}/ordermanagement/v1/orders/{order_id}/authorization

Request Body:

{
  "order_amount": 6000,
  "description": "",
  "order_lines": [
    {
      "type": "physical",
      "reference": "123050",
      "name": "Tomatoes",
      "quantity": 10,
      "quantity_unit": "kg"
    }
  ]
}

Error Response:

{
  "error_code": "NOT_ALLOWED",
  "error_messages": ["Update not allowed."],
  "correlation_id": "a3183112-74bc-44ac-9453-51af2577d717"
}

Update Merchant References

Use this API to update the merchant order ID.

Update Merchant References

Send a PATCH request to:

{apiUrl}/ordermanagement/v1/orders/{order_id}/merchant-references

Request Body:

{
  "merchant_reference1": "15632423",
  "merchant_reference2": "special order"
}

Error Response:

{
  "error_code": "NO_SUCH_ORDER",
  "error_messages": [
    "Order cannot be found. Merchant references cannot be updated."
  ],
  "correlation_id": "17c50e6c-c79d-4174-9369-4b58bca2d2ab"
}

Update Customer Address

Use the Kustom Order Management API to update your customer's shipping address.

Update Shipping Address

Send a PATCH request to:

{apiUrl}/ordermanagement/v1/orders/{order_id}/customer-details

Request Body:

{
  "shipping_address": {
    "street_address": "123 Fake St",
    "postal_code": "12345",
    "city": "New York",
    "region": "NY",
    "country": "US"
  }
}

Error Response:

{
  "error_code": "NOT_ALLOWED",
  "error_messages": [
    "Billing address cannot be updated for user account order. Customer details cannot be updated."
  ],
  "correlation_id": "b1fbf280-ea6e-4aee-a6ea-58b4b458ef47"
}

Add Shipping Information to an Order

Use this API to add shipping details to an order for tracking.

Add Shipping Information

Send a POST request to:

{apiUrl}/ordermanagement/v1/orders/{order_id}/shipping-info

Request Body:

{
  "shipping_info": [
    {
      "return_shipping_company": "DHL US",
      "return_tracking_number": "93456415674545679888",
      "return_tracking_uri": "http://shipping.example/findmypackage?93456415674545679888",
      "shipping_company": "DHL US",
      "shipping_method": "Home",
      "tracking_number": "63456415674545679874",
      "tracking_uri": "http://shipping.example/findmypackage?63456415674545679874"
    }
  ]
}

Error Response:

{
  "error_code": "NO_SUCH_ORDER",
  "error_messages": [
    "Order 7849fd84-47dc-4919-a7ce-47b9f46156f cannot be found. Shipping info cannot be added to order."
  ],
  "correlation_id": "f072554f-ef99-4b21-85da-633355aab998"
}

Cancel an Order

Use the Order Management API to cancel an uncaptured order.

Cancel Order

Send a POST request to:

{apiUrl}/ordermanagement/v1/orders/{order_id}/cancel

Error Response:

{
  "error_code": "CANCEL_NOT_ALLOWED",
  "error_messages": ["Order has previous captures. Cancel not possible."],
  "correlation_id": "95ccbcb1-8963-4569-b721-1a354"
}

Acknowledge Kustom Checkout Orders

Use the Order Management API to acknowledge Kustom Checkout orders.

Acknowledge Order

Send a POST request to:

{apiUrl}/ordermanagement/v1/orders/{order_id}/acknowledge

Error Response:

{
  "error_code": "NO_SUCH_ORDER",
  "error_messages": ["Order cannot be found. Acknowledgement not possible."],
  "correlation_id": "c56002ca-81ee-436a-b213-093e5afe75d3"
}

Ready to send these requests? See the API reference for further details.