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:
  • Invoice UUID (invoice.id) from the original invoice
  • Item UUIDs (item.id) of the items to refund
These UUIDs are returned in the response when certifying the original invoice.

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

  1. Always save UUIDs: When certifying an invoice, always save the invoice UUID and item UUIDs. Use automatic storage for convenience.
  2. Check quantities: Ensure the refunded quantity does not exceed the original quantity
  3. Handle partial refunds: You can create multiple refunds for the same invoice
  4. Store references: Save the refund reference (starts with "A") for traceability

Complete Example

Next Steps

Need help? Check out the complete documentation or open an issue on GitHub.