Refunds

Creates a new refund for an order

post/refunds

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

RefundRequest required
order, string required

Order ID to refund

amount, integer nullable

Amount to refund in cents, at most what is still refundable (omit for full refund)

reason, string nullable

Reason for the refund

notes, string nullable

Internal notes about the refund

Response

Refund created

Refund required
id, string required
object, string required
amount, integer required
currency, string required
reason, string nullable required
status, string required
created_at, string required
provider, string required
livemode, boolean required

false for a refund of a test purchase, which moved no money.

metadata, object required
order, string required

Changes

    • breaking

      the request property order became required

    • warning

      the amount request property's min was set to 1.00

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    6 more changes in this revision