Create order refund

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

When using the Orders API, refunds should be made for a specific order.

If you want to refund arbitrary amounts, however, you can also use the Create payment refund endpoint by creating a refund on the payment itself.

If an order line is still in the authorized state, it cannot be refunded. You should cancel it instead. Order lines that are paid, shipping or completed can be refunded.

Access with

API key

Organization access token with refunds.write

OAuth access with refunds.write

Path Params
string
required

Provide the ID of the related order.

Body Params
string
length ≤ 255

The description of the refund that may be shown to your customer, depending on the payment method used.

amount
object

The amount refunded to your customer with this refund. The amount is allowed to be lower than the original payment amount.

Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.

externalReference
object
boolean | null

Whether to create the entity in test mode or live mode.

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.

lines
array of objects
required

A refund can optionally be linked to specific order lines.

The lines will show the quantity, discountAmount, vatAmount, and totalAmount refunded. If the line was partially refunded, these values will be different from the values in response from the Get payment endpoint.

lines*
Responses

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