Create Refund

Available on Enterprise Plan

Forwards to TaxCloud POST /connections/{connectionId}/orders/refunds/{orderId}. orderId is a path identifier; an optional items[] in the forwarded body scopes a partial refund (omit for a full refund).

Authentication

X-API-KEYstring
API Key authentication via header

Request

This endpoint expects an object.
merchantIdstringRequired
UUID of the merchant. Must be owned by the calling account. Consumed by the Ziptax layer for routing and not forwarded to TaxCloud.
orderIdstringRequired
Your identifier for the order to refund, as supplied when the order was created. Consumed for routing and not forwarded in the refund payload.
batchIdstringOptional
Optional batch ID for grouping related refunds.
itemslist of objectsOptional

The line items and quantities to refund. Omit (or send an empty array) to refund the entire order.

returnedDatedatetimeOptional

Include only if this return amends a previously filed sales tax return; providing it triggers an Amended Sales Tax Return. Not typically recommended.

Response

TaxCloud response relayed verbatim.
connectionIdstring
The TaxCloud connection the refund was recorded under.
batchIdstring
Batch ID grouping this refund with related refunds, if one was supplied.
createdDatedatetime
RFC3339 datetime the refund was created.
itemslist of objects
The refunded line items, each with the refunded price, quantity, and tax amount.
returnedDatedatetime
RFC3339 datetime the refund took effect.

Errors

400
Merchant Refund Create Body Bad Request Error
401
Merchant Refund Create Body Unauthorized Error
403
Merchant Refund Create Body Forbidden Error
404
Merchant Refund Create Body Not Found Error
413
Merchant Refund Create Body Content Too Large Error
422
Merchant Refund Create Body Unprocessable Entity Error
429
Merchant Refund Create Body Too Many Requests Error
500
Merchant Refund Create Body Internal Server Error
502
Merchant Refund Create Body Bad Gateway Error
504
Merchant Refund Create Body Gateway Timeout Error