Create Refund
Create Refund
Create a full or partial refund for a completed collection. Specify amount, reason, and recipient. POST /refunds.
POST
Create Refund
Documentation Index
Fetch the complete documentation index at: https://docs.fyatu.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Issue a full or partial refund for a completed collection. The refund amount is debited from your business wallet and credited to the payer’s Fyatu account. Important: Each collection can only be refunded once. Choose between a full refund or a partial refund at the time of processing.Path Parameters
| Parameter | Type | Description |
|---|---|---|
collectionId | string | The collection ID to refund |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | Refund mode: FULL (default) or PARTIAL |
amount | number | Conditional | Required for PARTIAL mode. Refund amount in USD |
reason | string | No | Reason code (default: CUSTOMER_REQUEST). See available reasons |
Refund Modes
| Mode | Description | Amount Required |
|---|---|---|
FULL | Refunds the entire net amount automatically | No |
PARTIAL | Refunds a specific amount you specify | Yes |
Use
FULL mode to avoid calculation errors. The system automatically determines the maximum refundable amount (net amount after fees).Refund Reason Codes
Use one of these predefined reason codes in thereason field:
| Code | Description |
|---|---|
DUPLICATE_PAYMENT | Duplicate payment |
FRAUDULENT | Fraudulent transaction |
CUSTOMER_REQUEST | Customer requested refund (default) |
ORDER_CANCELLED | Order was cancelled |
PRODUCT_NOT_DELIVERED | Product/service not delivered |
PRODUCT_NOT_AS_DESCRIBED | Product/service not as described |
PRICING_ERROR | Pricing or billing error |
OTHER | Other reason |
GET /api/v3/refunds/reasons.
Response
| Field | Type | Description |
|---|---|---|
refundId | string | Unique refund identifier |
collectionId | string | Original collection ID |
amount | number | Refunded amount |
currency | string | Currency code |
reason | string | Reason code |
reasonDescription | string | Human-readable reason description |
status | string | COMPLETED |
recipient | object | Payer who received the refund |
recipient.clientId | string | Payer’s Fyatu client ID |
recipient.name | string | Payer’s name |
createdAt | string | Refund timestamp |
Refund Rules
- Only Completed Collections: Cannot refund pending, expired, or failed payments
- One Refund Per Collection: Each collection can only be refunded once
- Maximum Refundable: Net amount (original amount minus fees)
- Fees Non-Refundable: Processing fees are retained
- Wallet Balance Required: Your business wallet must have sufficient balance
Example Usage
Example Response (Full Refund)
Example Response (Partial Refund)
Amount Exceeds Maximum
If you request a partial refund amount that exceeds the maximum refundable, the API will return an error with the maximum amount:Refund Amount Calculation
| Original Payment | $25.00 |
|---|---|
| Processing Fee | -$0.75 |
| Net Amount (Max Refundable) | $24.25 |
Error Responses
| Error Code | HTTP | Description |
|---|---|---|
RESOURCE_NOT_FOUND | 404 | Collection not found |
INVALID_STATUS | 400 | Collection not in COMPLETED status |
AMOUNT_EXCEEDS_REFUNDABLE | 400 | Requested amount exceeds maximum (includes maxRefundable value) |
ALREADY_REFUNDED | 400 | Collection has already been refunded |
INSUFFICIENT_BALANCE | 402 | Business wallet balance too low |
PAYER_NOT_FOUND | 400 | Payer account no longer exists |
Collection Status After Refund
- Full Refund: Collection status changes to
REFUNDED - Partial Refund: Collection status changes to
PARTIALLY_REFUNDED - Customer Notification: Payer receives notification of the refund
Authorizations
JWT access token obtained from /auth/token
Path Parameters
Collection ID or batch ID
Body
application/json
Refund mode: FULL (auto-calculate) or PARTIAL (specify amount)
Available options:
FULL, PARTIAL Refund amount (required for PARTIAL mode)
Reason code for refund
Available options:
DUPLICATE_PAYMENT, FRAUDULENT, CUSTOMER_REQUEST, ORDER_CANCELLED, PRODUCT_NOT_DELIVERED, PRODUCT_NOT_AS_DESCRIBED, PRICING_ERROR, OTHER 
