Skip to main content
POST
/
v1
/
platform
/
businesses
/
{business_id}
/
invoices
/
refunds
Create refund (full or partial)
curl --request POST \
  --url https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/invoices/refunds/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "method": "CASH",
  "completed_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "amount_cents": 2,
  "memo": "<string>",
  "reference_number": "<string>",
  "processor": "<string>",
  "refund_processing_fee_cents": 0,
  "document": {
    "file": "<string>",
    "document_type": "refund",
    "upload_source": "<string>",
    "metadata": "<unknown>",
    "tags": "<unknown>"
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "refunded_amount": 123,
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_name": "<string>",
  "allocations": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "allocation_type": "invoice",
      "amount": 123,
      "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "invoice_number": "<string>",
      "invoice_outstanding_balance_cents": 123,
      "target_description": "<string>",
      "description": "<string>",
      "allocation_date": "2023-11-07T05:31:56Z"
    }
  ],
  "refund_payments": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "refunded_amount": 123,
      "refund_processing_fee": 123,
      "reconciled_bank_transactions": [
        {
          "bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "bank_transaction_date": "2023-11-07T05:31:56Z",
          "bank_transaction_amount_cents": 123,
          "bank_transaction_direction": "<string>",
          "reconciled_amount_cents": 123,
          "reconciliation_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "reconciled_at": "2023-11-07T05:31:56Z",
          "currency": "<string>",
          "payment_type": "<string>",
          "bank_account_name": "<string>",
          "notes": "<string>"
        }
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "external_id": "<string>",
      "completed_at": "2023-11-07T05:31:56Z",
      "method": "BANK_TRANSFER",
      "processor": "<string>",
      "transaction_tags": "<unknown>",
      "memo": "<string>",
      "metadata": "<unknown>"
    }
  ],
  "document": {
    "url": "<string>",
    "expires_in": 123,
    "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "file_name": "<string>",
    "file_size": 123,
    "mime_type": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "status": "pending",
  "completed_at": "2023-11-07T05:31:56Z",
  "is_dedicated": true,
  "memo": "<string>",
  "reference_number": "<string>",
  "metadata": "<unknown>",
  "currency": "EUR"
}

Authorizations

Authorization
string
header
required

Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>

Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.

Path Parameters

business_id
string<uuid>
required

Business UUID provided by Thred (unique identifier for the business)

Body

Serializer for creating simple refunds

invoice_id
string<uuid>
required

Invoice to refund

method
enum<string>
required

Payment method for the refund

  • CASH - Cash
  • CHECK - Check
  • CREDIT_CARD - Credit Card
  • DEBIT_CARD - Debit Card
  • ACH - ACH
  • BANK_TRANSFER - Bank Transfer
  • PAYPAL - PayPal
  • STRIPE - Stripe
  • OTHER - Other
Available options:
CASH,
CHECK,
CREDIT_CARD,
DEBIT_CARD,
ACH,
BANK_TRANSFER,
PAYPAL,
STRIPE,
OTHER
completed_at
string<date-time>
required

When the refund was completed

external_id
string
required

Required external identifier for idempotency (unique per business)

Required string length: 1 - 255
amount_cents
integer

Optional: Partial refund amount in cents. If not provided, refunds full amount.

Required range: x >= 1
memo
string

Optional description

Minimum string length: 1
reference_number
string

Optional reference number

Required string length: 1 - 100
processor
string

Payment processor (e.g., STRIPE)

Required string length: 1 - 100
refund_processing_fee_cents
integer
default:0

Processing fee for the refund in cents

Required range: x >= 0
document
object

Refund specific document upload payload.

Response

Serializer for refunds (simple response). All amounts in cents.

id
string<uuid>
required

Unique refund identifier

refunded_amount
integer
required

Total refunded amount in cents

customer_id
string<uuid>
required

UUID of the customer receiving the refund

customer_name
string
required

Customer display name

allocations
object[]
required
refund_payments
object[]
required
document
object
required

Latest document linked to this refund

created_at
string<date-time>
required

Refund creation timestamp

updated_at
string<date-time>
required

Last update timestamp

external_id
string

Your unique identifier for this refund (used for idempotency)

Maximum string length: 255
status
enum<string>

Refund status (pending, processing, paid, failed, cancelled)

  • pending - Pending
  • processing - Processing
  • paid - Paid
  • failed - Failed
  • cancelled - Cancelled
Available options:
pending,
processing,
paid,
failed,
cancelled
completed_at
string<date-time> | null

Timestamp when refund was fully paid

is_dedicated
boolean

Whether this is a dedicated refund (true/false)

memo
string

Description or reason for the refund

reference_number
string

Reference number for tracking

Maximum string length: 100
metadata
any

Custom key-value pairs for additional context

currency
enum<string>

Three-letter ISO 4217 currency code (EUR, GBP, USD)

  • EUR - Euro
  • GBP - British Pound
  • USD - US Dollar
  • SEK - Swedish Krona
  • NOK - Norwegian Krone
  • DKK - Danish Krone
  • ISK - Icelandic Króna
  • MYR - Malaysian Ringgit
  • SGD - Singapore Dollar
Available options:
EUR,
GBP,
USD,
SEK,
NOK,
DKK,
ISK,
MYR,
SGD