v1

latestOpenAPI 3.1.02026-07-2684271522.2 KB
Refunds

Create Refund

Creates a refund for a previously succeeded payment intent and returns the resulting Refund.

The referenced payment intent must have a succeeded status. If amount is omitted, the full amount of the payment intent is refunded. A refund.created event is emitted, and the returned refund's status may still be pending; subsequent status changes are delivered via webhooks.

post/v1/refunds

Request body

Example request

{
  "refund": {
    "payment_intent_id": "fpi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "amount": 2500,
    "reason": "duplicate",
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    }
  }
}

Response

An envelope wrapping a single refund object.

Example response

{
  "refund": {
    "refund_id": "fre_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "payment_intent_id": "fpi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "amount": 2500,
    "created_at": "2026-06-15T14:30:00Z",
    "reason": "duplicate",
    "status": "pending",
    "test_mode": false,
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "reference_id": "obj_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "reference_type": "acquirer_reference_number",
    "reference_status": "available",
    "items": [
      {}
    ],
    "subscription_id": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "invoice_id": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA"
  }
}