Guides
Refunds
Complete guide for creating refunds with FNE Client
This guide shows you how to create refunds for your certified invoices with FNE Client.
Overview
A refund is a document that cancels or reduces the amount of a previously certified invoice. To create a refund, you must have the UUID of the original invoice and the UUIDs of the items to refund.
Important: Save UUIDs
To create a refund, you must have saved:
To create a refund, you must have saved:
- Invoice UUID (
invoice.id) from the original invoice - Item UUIDs (
item.id) of the items to refund
Automatic Storage
FNE Client can automatically store certifications in the fne_certifications table:
For more information, see the Automatic Certification Storage guide.
Create a Full Refund
A full refund refunds the entire invoice:
Create a Partial Refund
A partial refund refunds only certain items or a partial quantity:
Response Structure
A refund response has a different structure from an invoice:
Check if it's a Refund
Model Integration
Use the CertifiableRefund trait:
Error Handling
Best Practices
- Always save UUIDs: When certifying an invoice, always save the invoice UUID and item UUIDs. Use automatic storage for convenience.
- Check quantities: Ensure the refunded quantity does not exceed the original quantity
- Handle partial refunds: You can create multiple refunds for the same invoice
- Store references: Save the refund reference (starts with "A") for traceability
Complete Example
Next Steps
- Automatic Certification Storage - Store certifications automatically
- Error Handling - Handle errors efficiently
- ERP → FNE Mapping - Transform your ERP data to FNE
- Examples - Check out more code examples
Need help? Check out the complete documentation or open an issue on GitHub.
