Refund order

Create a refund against an order. Multiple refunds are supported, but the total refunded quantity cannot exceed the original order quantity for each item. IMPORTANT: Refund prices and tax amounts are automatically calculated from the order. If the order had discounts applied, refunds will reflect the discounted prices (the actual amount paid). Do not send price or tax fields in the refund request - only itemId and quantity are required.

Authentication

AuthorizationBearer
This authentication type can be used to directly call the service.
OR
X-API-KEYstring
This authentication type is supported by using the provided API key for the merchant account.

Path parameters

connectionIdstringRequired>=36 characters
represents the ID of a connection. It is used as a unique identifier for the connection
orderIdstringRequired
the id of the order to refund against

Request

This endpoint expects an object.
batchIdstringOptional
Optional batch ID for grouping refunds
itemslist of objectsOptional

represents the items of the refund request, if an empty lists or no lists is passed it is assumed the entire order will be refunded. IMPORTANT: Prices and tax amounts are automatically calculated from the order. If the order had discounts, refunds will use the discounted prices (actual amount paid).

returnedDatestring or nullOptionalformat: "date-time"

include only if this return is a change to a previously filed sales tax return, will trigger an Amended Sales Tax Return. (Not typically recommended to include.)

Response

Created
connectionIdstring>=36 characters
represents the ID of a connection. It is used as a unique identifier for the connection
itemslist of objects
batchIdstring
Batch ID for grouping refunds
createdDatestringformat: "date-time"
represents the time when the refund was created.
returnedDatestringformat: "date-time"
represents the time when the refund took effect.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error