v6

latestOpenAPI 3.1.02026-07-311856741.1 MB
refunds
public

Create Refund

Create a refund.

Scopes: refunds:write

post/v1/refunds/

Request body

metadataobject

Key-value object allowing you to store additional information.

The key must be a string with a maximum length of 40 characters. The value must be either:

  • A string with a maximum length of 500 characters
  • An integer
  • A floating-point number
  • A boolean

You can store up to 50 key-value pairs.

order_idstring uuid4 required
reason'duplicate' | 'fraudulent' | 'customer_request' | 'service_disruption' | 'satisfaction_guarantee' | 'other' required

Reason for the refund.

amountinteger required

Amount to refund in cents. Minimum is 1.

commentstring nullable

An internal comment about the refund.

revoke_benefitsboolean

Should this refund trigger the associated customer benefits to be revoked?

Note: Only allowed in case the order is a one-time purchase. Subscriptions automatically revoke customer benefits once the subscription itself is revoked, i.e fully canceled.

Response

Refund created.

created_atstring date-time required

Creation timestamp of the object.

modified_atstring date-time nullable required

Last modification timestamp of the object.

idstring uuid4 required

The ID of the object.

metadataMetadataOutputType required
status'pending' | 'succeeded' | 'failed' | 'canceled' required
reason'duplicate' | 'fraudulent' | 'customer_request' | 'service_disruption' | 'satisfaction_guarantee' | 'dispute_prevention' | 'other' required
amountinteger required
tax_amountinteger required
currencystring required
organization_idstring uuid4 required
order_idstring uuid4 required
subscription_idstring uuid4 nullable required
customer_idstring uuid4 required
revoke_benefitsboolean required

Example response

{
  "dispute": {
    "amount": 1000,
    "tax_amount": 200,
    "currency": "usd",
    "reason": "fraudulent",
    "order_id": "57107b74-8400-4d80-a2fc-54c2b4239cb3",
    "payment_id": "42b94870-36b9-4573-96b6-b90b1c99a353"
  }
}