Skip to main content

Resolve Unconfirmed Refund

POST 

/api/purple-dot/refunds/:refund/resolve

Closes a refund Purple Dot never confirmed (uncertain: true, listed in the refund preview's pending_refunds) with what the merchant found after checking the Purple Dot Merchant Portal. Runs under the same per-order lock as sending a refund, so it cannot race a retry or a late confirmation.

Required scope: inventory:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

  • resolution: refunded records the refund as completed with the lines and shipping as sent: status succeeded, a note on the sales order and a Refund row in the connection's Activity, the same as a confirmed refund. A later retry (by refund_id or the same request) answers from this record and never re-sends.
  • resolution: not_refunded sets status not_refunded: its units and shipping are released, so a new refund can be sent; it drops off the dashboard's Needs attention list, and retrying it by refund_id is refused.

Both record who resolved it and the note in resolution and in Activity.

Body fields:

  • resolution (string, required): refunded or not_refunded.
  • note (string, optional, max 1000).

Response: the refund (same shape as Create Refund) with resolution = {outcome, user_id, user_name, note, resolved_at}; response_code is null for a refund resolved by hand.

Errors (422 with message, error_code, refund_id):

  • refund_not_pending: the refund is no longer unconfirmed (Purple Dot confirmed it meanwhile, it was already resolved, or Purple Dot rejected it). Nothing was changed.
  • not_purple_dot: the order is no longer linked to a Purple Dot connection.
  • purple_dot_error: a refund for the same order is being sent right now; wait, then try again.
  • invalid_lines: the refund no longer exists.
  • Validation (422 errors): resolution missing or not one of the two values; note too long.

Authentication: Requires a Bearer token. Requires the sales_orders.update permission (the same as issuing a refund).

Request​

Responses​

OK

Response Headers
    Content-Type