Manage order lines

⚠️ We no longer recommend using the Orders API. Please refer to the Payments API instead.

Use this endpoint to update, cancel, or add one or more order lines of a created, pending, or authorized order.

For an already authorized order, updating the order lines will trigger an additional authorization request to the payment method provider.

For example, your customer placed an order that contains two order lines:

  • Order line A contains two items and amounts to €100.00.
  • Order line B contains a discount of 10% applicable to the items in order line A, which amounts to -€10.00.

The order total is €90.00.

You only have one item of type A left, and therefore contact your customer to find another solution. The customer opts to replace one of order line A's items with item C. Item C costs €40.00, however, discount B does not apply to item C.

Using this endpoint, you can create a request to update the order lines, where:

  • Order line A is updated to quantity 1.
  • Order line B is updated to discount amount -€5.00.
  • Order line C is added with amount €40.00.

The updated order totals €85.00.

Access with

API key

Organization access token with orders.write

OAuth access with orders.write

Path Params
string
required

Provide the ID of the related order.

Body Params
operations
array of objects
required

List of operations to be performed on the order's line items.

operations*
boolean

Whether the entity was created in test mode or live mode. This field does not update the mode of the entity.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

Responses

Language
Credentials
Request
Response
Choose an example:
application/hal+json