> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# POST Refund

> Process a payment refund.

## Refund transaction

`POST /api/transactions/:id/refund`

Process a refund for a completed transaction.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

### Path parameters

**id** `integer` *required*

Transaction ID.

### Body parameters

**reason** `string`

Refund reason.

**amount** `number`

Partial refund amount (omit for full refund).

```json theme={null}
{
  "reason": "Customer requested cancellation",
  "amount": 29.99
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/transactions/1/refund \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Customer requested" }'
```

```json Response theme={null}
{
  "success": true,
  "message": "Refund processed successfully",
  "data": {
    "id": 1,
    "status": "refunded",
    "refundAmount": 29.99,
    "refundedAt": "2026-01-15T14:00:00Z"
  }
}
```

***

## Complete transaction

`POST /api/transactions/:id/complete`

### Path parameters

**id** `integer` *required*

Transaction ID.

Manually mark a pending transaction as completed.

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/transactions/1/complete \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

***

## Update transaction status

`PATCH /api/transactions/:id/status`

### Body parameters

**status** `string` *required*

New transaction status.

```json theme={null}
{
  "status": "completed"
}
```

***

## Payment providers

`GET /api/payment-providers`

List all configured payment providers.

`GET /api/payment-providers/active`

Get active payment providers.

`GET /api/payment-providers/currency-map`

Get currency-to-gateway mapping.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.